Module org.eclipse.persistence.jpa
Class ClassAccessor
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.metadata.ORMetadata
-
- org.eclipse.persistence.internal.jpa.metadata.accessors.MetadataAccessor
-
- org.eclipse.persistence.internal.jpa.metadata.accessors.classes.ClassAccessor
-
- Direct Known Subclasses:
EmbeddableAccessor,InterfaceAccessor,MappedSuperclassAccessor
public abstract class ClassAccessor extends MetadataAccessor
INTERNAL: A abstract class accessor. Holds common metadata for entities, embeddables and mapped superclasses. Key notes: - all metadata mapped from XML to this class must be compared in the equals method. - all metadata mapped from XML must be initialized in the initXMLObject method. - all metadata mapped from XML to this class must be handled in the merge method. (merging is done at the accessor/mapping level) - any metadata mapped from XML to this class must be initialized in the initXMLObject method. - methods should be preserved in alphabetical order.- Since:
- TopLink EJB 3.0 Reference Implementation
- Author:
- Guy Pelletier
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
m_project
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedClassAccessor(String xmlElement)INTERNAL:protectedClassAccessor(MetadataAnnotation annotation, MetadataClass cls, MetadataDescriptor descriptor)INTERNAL: Called from MappedSuperclassAccessor.ClassAccessor(MetadataAnnotation annotation, MetadataClass cls, MetadataProject project)INTERNAL:
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddAccessor(MappingAccessor accessor)INTERNAL: Add the accessor to the descriptorprotected voidaddAccessorFields(boolean processingInverse)INTERNAL: Create mappings from the fields directly.protected voidaddAccessorMethods(boolean processingInverse)INTERNAL: Create mappings via the class properties.voidaddAccessors()INTERNAL: Add the accessors from this class accessors java class to the descriptor tied to this class accessor.protected voidaddPotentialEmbeddableAccessor(MetadataClass potentialEmbeddableClass, ClassAccessor embeddingAccessor)INTERNAL Add an embeddable class to the embeddable accessor list if it is indeed an embeddable.protected voidaddPotentialMappedSuperclass(MetadataClass metadataClass, boolean addMappedSuperclassAccessors)INTERNAL: Add mapped superclass accessors to inheriting entities.protected MappingAccessorbuildAccessor(MetadataAnnotatedElement accessibleObject)INTERNAL: Create and return the appropriate accessor based on the accessible object given.protected voidclearMappedSuperclassesAndInheritanceParents()INTERNAL:voidclearPreProcessed()INTERNAL: In some cases the pre-processing may need to be re-done.booleanequals(Object objectToCompare)INTERNAL:booleanexcludeDefaultMappings()INTERNAL: Return true if this class accessor has been set to metadata complete.protected MetadataFieldgetAccessibleField(MappingAccessor accessor)INTERNAL: Return the accessible field for the given mapping accessor.protected MetadataMethodgetAccessibleMethod(MappingAccessor accessor)INTERNAL: Return the accessible method for the given mapping accessor.protected MetadataMethodgetAccessibleVirtualMethod(MappingAccessor accessor)INTERNAL: This method should only be called when using virtual access and presumably for dynamic persistence.StringgetAccessType()INTERNAL: Return the access type of this accessor.protected MetadataAnnotationgetAnnotation(String annotation)INTERNAL: Return the annotation if it exists.List<AssociationOverrideMetadata>getAssociationOverrides()INTERNAL: Used for OX mapping.List<AttributeOverrideMetadata>getAttributeOverrides()INTERNAL: Used for OX mapping.XMLAttributesgetAttributes()INTERNAL: Used for OX mapping.ChangeTrackingMetadatagetChangeTracking()INTERNAL: Used for OX mapping.StringgetClassName()INTERNAL: Used for OX mapping.CloneCopyPolicyMetadatagetCloneCopyPolicy()INTERNAL: Used for OX mappingCopyPolicyMetadatagetCopyPolicy()INTERNAL:CustomCopyPolicyMetadatagetCustomCopyPolicy()INTERNAL: Used for OX mappingMetadataClassgetCustomizerClass()INTERNAL:StringgetCustomizerClassName()INTERNAL: Used for OX mapping.StringgetDescription()INTERNAL: Used for OX mapping.BooleangetExcludeDefaultMappings()INTERNAL: Used for OX mapping.StringgetIdentifier()INTERNAL: To satisfy the abstract getIdentifier() method from ORMetadata.InstantiationCopyPolicyMetadatagetInstantiationCopyPolicy()INTERNAL: Used for OX mappingMetadataClassgetJavaClass()INTERNAL: Return the java class that defines this accessor.StringgetJavaClassName()INTERNAL: Return the java class name that defines this accessor.List<MappedSuperclassAccessor>getMappedSuperclasses()INTERNAL: Return the mapped superclasses associated with this entity accessor.BooleangetMetadataComplete()INTERNAL: Used for OX mapping.NoSqlMetadatagetNoSql()INTERNAL: Used for OX mapping.List<OracleArrayTypeMetadata>getOracleArrayTypes()Returns the list of OracleArrayType instances.List<OracleObjectTypeMetadata>getOracleObjectTypes()Returns the list of OracleObjectType instances.MetadataDescriptorgetOwningDescriptor()INTERNAL: In most cases the owning descriptor is the descriptor associated with this class accessor.List<MetadataDescriptor>getOwningDescriptors()INTERNAL: In most cases the owning descriptors is the single descriptor associated with this class accessor.protected MetadataClassgetParentClass()INTERNAL:StringgetParentClassName()INTERNAL: Used for OX mapping.List<PLSQLRecordMetadata>getPLSQLRecords()INTERNAL: Used for OX mapping.List<PLSQLTableMetadata>getPLSQLTables()INTERNAL: Used for OX mapping.StructMetadatagetStruct()INTERNAL: Used for OX mapping.booleanhasDerivedId()INTERNAL:inthashCode()protected booleanhasParentClass()INTERNAL:booleanignoreAnnotations()INTERNAL: Return true if this class accessor has been set to metadata complete.voidinitXMLClassAccessor(MetadataAccessibleObject accessibleObject, MetadataDescriptor descriptor, MetadataProject project, XMLEntityMappings entityMappings)INTERNAL: This method should be subclassed in those methods that need to do extra initialization.voidinitXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)INTERNAL:booleanisAnnotationPresent(String annotation)INTERNAL: Indicates whether the specified annotation is present on the annotated element for this accessor.booleanisClassAccessor()INTERNAL: Return true if this accessor represents a class.booleanisEmbeddableAccessor()INTERNAL: Return true if this accessor represents an embeddable class.booleanisEntityAccessor()INTERNAL: Return true if this accessor represents an entity class.booleanisMappedSuperclass()INTERNAL: Return whether this ClassAccessor is a MappedSuperclassAccessorbooleanisMetadataComplete()INTERNAL:booleanisPreProcessed()INTERNAL: Return true if this accessor has been pre-processed.booleanisProcessed()INTERNAL: Return true if this accessor has been processed.voidmerge(ORMetadata metadata)INTERNAL: Generic class level merging details for entities, mapped superclasses and embeddables.voidpreProcess()INTERNAL: The pre-process method is called during regular deployment and metadata processing.voidpreProcessForCanonicalModel()INTERNAL: The pre-process for canonical model method is called (and only called) during the canonical model generation.protected voidpreProcessMappedSuperclassMetadata(MappedSuperclassAccessor mappedSuperclass)INTERNAL: Sub classes that support extending mapped superclasses should override this method to control what is pre-processed from a mapped superclass.voidprocess()INTERNAL: This method should be overridden by all class accessors to process their specific class metadata first then call up to this method to process the common metadata.protected abstract voidprocessAccessType()INTERNAL:protected voidprocessAssociationOverride(AssociationOverrideMetadata associationOverride)INTERNAL: Process the association override metadata specified on an entity or mapped superclass.protected voidprocessAssociationOverrides()INTERNAL: Process the association override metadata specified on an entity or mapped superclass.protected voidprocessAttributeOverride(AttributeOverrideMetadata attributeOverride)INTERNAL: Process the attribute override metadata specified on an entity or mapped superclass.protected voidprocessAttributeOverrides()INTERNAL: Process the attribute override metadata specified on an entity or mapped superclass.protected voidprocessChangeTracking()INTERNAL: Process the change tracking setting for this accessor.voidprocessComplexMetadataTypes()Process PL/SQL record and table types, Oracle object array and XMLType types.protected voidprocessCopyPolicy()INTERNAL:protected voidprocessCustomizer()INTERNAL:voidprocessDerivedId(HashSet<ClassAccessor> processing, HashSet<ClassAccessor> processed)INTERNAL: Allows for processing derived ids, either from an Id or MapsId specification.protected voidprocessMappedSuperclassMetadata(MappedSuperclassAccessor mappedSuperclass)INTERNAL Sub classes that support extending mapped superclasses should override this method to control what is processed from a mapped superclass.voidprocessMappingAccessors()INTERNAL: Process the accessors for the given class.protected voidprocessNoSql()INTERNAL: Check for and process a NoSql annotation and configure the correct descriptor type.voidprocessParentClass()INTERNAL: If the user specified a parent class set it on the metadata class for this accessor.protected voidprocessProperties()INTERNAL: Adds properties to the descriptor.protected voidprocessStruct()Check for and process a Struct annotation and configure the correct descriptor type.protected voidprocessVirtualClass()INTERNAL: If this class accessor uses VIRTUAL access and is not accessible, add it to our list of virtual classes that will be dynamically created.protected voidresolveGenericTypes(List<String> genericTypes, MetadataClass parent)INTERNAL: This method resolves generic types.voidsetAssociationOverrides(List<AssociationOverrideMetadata> associationOverrides)INTERNAL: Used for OX mapping.voidsetAttributeOverrides(List<AttributeOverrideMetadata> attributeOverrides)INTERNAL: Used for OX mapping.voidsetAttributes(XMLAttributes attributes)INTERNAL: Used for OX mapping.voidsetChangeTracking(ChangeTrackingMetadata changeTracking)INTERNAL: Used for OX mapping.voidsetClassName(String className)INTERNAL: Used for OX mapping.voidsetCloneCopyPolicy(CloneCopyPolicyMetadata copyPolicy)INTERNAL: set the copy policy metadatavoidsetCustomCopyPolicy(CustomCopyPolicyMetadata copyPolicy)INTERNAL: set the copy policy metadatavoidsetCustomizerClassName(String customizerClassName)INTERNAL: Used for OX mapping.voidsetDescription(String description)INTERNAL: Used for OX mapping.voidsetExcludeDefaultMappings(Boolean excludeDefaultMappings)INTERNAL: Used for OX mapping.voidsetInstantiationCopyPolicy(InstantiationCopyPolicyMetadata copyPolicy)INTERNAL: set the copy policy metadataprotected voidsetIsPreProcessed()INTERNAL:protected voidsetIsProcessed()INTERNAL:voidsetJavaClass(MetadataClass cls)INTERNAL: Set the java class for this accessor.voidsetMetadataComplete(Boolean metadataComplete)INTERNAL: Used for OX mapping.voidsetNoSql(NoSqlMetadata noSql)INTERNAL: Used for OX mapping.voidsetOracleArrayTypes(List<OracleArrayTypeMetadata> oracleArrayTypes)Sets the list of OracleArrayType instances.voidsetOracleObjectTypes(List<OracleObjectTypeMetadata> oracleObjectTypes)Sets the list of OracleObjectType instances.protected voidsetParentClass(MetadataClass parentClass)INTERNAL:voidsetParentClassName(String parentClassName)INTERNAL: Used for OX mapping.voidsetPLSQLRecords(List<PLSQLRecordMetadata> records)INTERNAL: Used for OX mapping.voidsetPLSQLTables(List<PLSQLTableMetadata> tables)INTERNAL: Used for OX mapping.voidsetStruct(StructMetadata struct)INTERNAL: Used for OX mapping.StringtoString()INTERNAL:booleanusesFieldAccess()INTERNAL: Returns true if this class uses field access.booleanusesPropertyAccess()INTERNAL: Returns true if this class uses property access.booleanusesVirtualAccess()INTERNAL: Returns true if this class uses virtual access.-
Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.MetadataAccessor
getAccess, getAccessibleObject, getAccessMethods, getAnnotatedElement, getAnnotatedElementName, getAnnotation, getAttributeName, getConverters, getDefaultAttributeName, getDescriptor, getDescriptorJavaClass, getHashPartitioning, getName, getObjectTypeConverters, getPartitioned, getPartitioning, getPinnedPartitioning, getProperties, getRangePartitioning, getReferencedField, getReferencedField, getReplicationPartitioning, getRoundRobinPartitioning, getSerializedConverters, getStructConverters, getTypeConverters, getUnionPartitioning, getUpperCaseShortJavaClassName, getValue, getValue, getValuePartitioning, hasAccess, hasAccessMethods, initAccess, initXMLAccessor, isAnnotationPresent, processConverters, processCustomConverters, processObjectTypeConverters, processPartitioned, processPartitioning, processPrimaryKeyJoinColumns, processSerializedConverters, processStructConverters, processTable, processTypeConverters, setAccess, setAccessMethods, setConverters, setDescriptor, setHashPartitioning, setName, setObjectTypeConverters, setPartitioned, setPartitioning, setPinnedPartitioning, setProperties, setRangePartitioning, setReplicationPartitioning, setRoundRobinPartitioning, setSerializedConverters, setStructConverters, setTypeConverters, setUnionPartitioning, setValuePartitioning
-
Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
getAccessibleObjectName, getAnnotation, getBoxedType, getDatabaseTypeEnum, getEntityMappings, getFullyQualifiedClassName, getJavaClass, getJavaClassName, getLoader, getLocation, getLogger, getMetadataClass, getMetadataClass, getMetadataClass, getMetadataFactory, getName, getPrimitiveClassForName, getProject, getText, getXMLElement, hasIdentifier, hasText, initXMLClassName, initXMLObject, initXMLObjects, initXMLTextObject, loadedFromAnnotation, loadedFromEclipseLinkXML, loadedFromXML, mergeORObjectLists, mergeORObjects, mergeSimpleObjects, reloadEntity, reloadMappedSuperclass, setAccessibleObject, setEntityMappings, setFieldName, setFieldName, setProject, shouldOverride, valuesMatch, valuesMatch
-
-
-
-
Constructor Detail
-
ClassAccessor
protected ClassAccessor(String xmlElement)
INTERNAL:
-
ClassAccessor
public ClassAccessor(MetadataAnnotation annotation, MetadataClass cls, MetadataProject project)
INTERNAL:
-
ClassAccessor
protected ClassAccessor(MetadataAnnotation annotation, MetadataClass cls, MetadataDescriptor descriptor)
INTERNAL: Called from MappedSuperclassAccessor. We want to avoid setting the class accessor on the descriptor to be the MappedSuperclassAccessor.
-
-
Method Detail
-
addAccessor
protected void addAccessor(MappingAccessor accessor)
INTERNAL: Add the accessor to the descriptor
-
addAccessors
public void addAccessors()
INTERNAL: Add the accessors from this class accessors java class to the descriptor tied to this class accessor. This method is called for every class accessor and is also called from parent class accessors to each of its subclasses of a TABLE_PER_CLASS inheritance strategy. Add accessors is called in the preProcess stage and must not be called until its owning class accessor has processed its access type.
-
addAccessorFields
protected void addAccessorFields(boolean processingInverse)
INTERNAL: Create mappings from the fields directly. If the mustBeExplicit flag is true, then we are processing the inverse of an explicit access setting and for a field to be processed it must have a Access(FIELD) setting.
-
addAccessorMethods
protected void addAccessorMethods(boolean processingInverse)
INTERNAL: Create mappings via the class properties. If the mustBeExplicit flag is true, then we are processing the inverse of an explicit access setting and for a field to be processed it must have a Access(PROPERTY) setting.
-
addPotentialEmbeddableAccessor
protected void addPotentialEmbeddableAccessor(MetadataClass potentialEmbeddableClass, ClassAccessor embeddingAccessor)
INTERNAL Add an embeddable class to the embeddable accessor list if it is indeed an embeddable. This method is overridden in EmbeddableAccessor and is called during pre-process. At the entity level all we want to do is set the owning descriptor whereas for nested embeddables they'll need the list of owning descriptors. Any nested embeddables will be discovered and pre-processed when pre-processing the known list of root embeddables.- See Also:
processStage1()
-
addPotentialMappedSuperclass
protected void addPotentialMappedSuperclass(MetadataClass metadataClass, boolean addMappedSuperclassAccessors)
INTERNAL: Add mapped superclass accessors to inheriting entities. Add new descriptors for these mapped superclasses to the core project.
-
buildAccessor
protected MappingAccessor buildAccessor(MetadataAnnotatedElement accessibleObject)
INTERNAL: Create and return the appropriate accessor based on the accessible object given. Order of checking is important, careful when modifying or adding, check what the isXyz call does to determine if the accessor is of type xyz.
-
clearMappedSuperclassesAndInheritanceParents
protected void clearMappedSuperclassesAndInheritanceParents()
INTERNAL:
-
clearPreProcessed
public void clearPreProcessed()
INTERNAL: In some cases the pre-processing may need to be re-done. Namely, during the canonical model generation between compile rounds.
-
equals
public boolean equals(Object objectToCompare)
INTERNAL:- Overrides:
equalsin classMetadataAccessor
-
hashCode
public int hashCode()
- Overrides:
hashCodein classMetadataAccessor
-
excludeDefaultMappings
public boolean excludeDefaultMappings()
INTERNAL: Return true if this class accessor has been set to metadata complete.
-
getAccessibleField
protected MetadataField getAccessibleField(MappingAccessor accessor)
INTERNAL: Return the accessible field for the given mapping accessor. Validation is performed on the existence of the field.
-
getAccessibleMethod
protected MetadataMethod getAccessibleMethod(MappingAccessor accessor)
INTERNAL: Return the accessible method for the given mapping accessor. Validation is performed on the existence of the method by property name or by the access methods if specified.
-
getAccessibleVirtualMethod
protected MetadataMethod getAccessibleVirtualMethod(MappingAccessor accessor)
INTERNAL: This method should only be called when using virtual access and presumably for dynamic persistence. No method validation is done and either the access methods specified or the default get and set methods for name access will be used.
-
getAccessType
public String getAccessType()
INTERNAL: Return the access type of this accessor. Assumes all access processing has been performed before calling this method.
-
getAnnotation
protected MetadataAnnotation getAnnotation(String annotation)
INTERNAL: Return the annotation if it exists.- Specified by:
getAnnotationin classMetadataAccessor
-
getAssociationOverrides
public List<AssociationOverrideMetadata> getAssociationOverrides()
INTERNAL: Used for OX mapping.
-
getAttributeOverrides
public List<AttributeOverrideMetadata> getAttributeOverrides()
INTERNAL: Used for OX mapping.
-
getAttributes
public XMLAttributes getAttributes()
INTERNAL: Used for OX mapping.
-
getChangeTracking
public ChangeTrackingMetadata getChangeTracking()
INTERNAL: Used for OX mapping.
-
getClassName
public String getClassName()
INTERNAL: Used for OX mapping.
-
getCopyPolicy
public CopyPolicyMetadata getCopyPolicy()
INTERNAL:
-
getCloneCopyPolicy
public CloneCopyPolicyMetadata getCloneCopyPolicy()
INTERNAL: Used for OX mapping
-
getCustomCopyPolicy
public CustomCopyPolicyMetadata getCustomCopyPolicy()
INTERNAL: Used for OX mapping
-
getCustomizerClass
public MetadataClass getCustomizerClass()
INTERNAL:
-
getCustomizerClassName
public String getCustomizerClassName()
INTERNAL: Used for OX mapping.
-
getDescription
public String getDescription()
INTERNAL: Used for OX mapping.
-
getExcludeDefaultMappings
public Boolean getExcludeDefaultMappings()
INTERNAL: Used for OX mapping.
-
getIdentifier
public String getIdentifier()
INTERNAL: To satisfy the abstract getIdentifier() method from ORMetadata.
-
getInstantiationCopyPolicy
public InstantiationCopyPolicyMetadata getInstantiationCopyPolicy()
INTERNAL: Used for OX mapping
-
getJavaClass
public MetadataClass getJavaClass()
INTERNAL: Return the java class that defines this accessor. It may be an entity, embeddable or mapped superclass.- Overrides:
getJavaClassin classMetadataAccessor
-
getJavaClassName
public String getJavaClassName()
INTERNAL: Return the java class name that defines this accessor. It may be an entity, embeddable or mapped superclass.- Overrides:
getJavaClassNamein classMetadataAccessor
-
getMappedSuperclasses
public List<MappedSuperclassAccessor> getMappedSuperclasses()
INTERNAL: Return the mapped superclasses associated with this entity accessor. A call to discoverMappedSuperclassesAndInheritanceParents() should be made before calling this method.- See Also:
preProcess()
-
getMetadataComplete
public Boolean getMetadataComplete()
INTERNAL: Used for OX mapping.
-
getNoSql
public NoSqlMetadata getNoSql()
INTERNAL: Used for OX mapping.
-
setNoSql
public void setNoSql(NoSqlMetadata noSql)
INTERNAL: Used for OX mapping.
-
getOwningDescriptor
public MetadataDescriptor getOwningDescriptor()
INTERNAL: In most cases the owning descriptor is the descriptor associated with this class accessor. Owning descriptors come into play when dealing with embeddable classes and their accessors. Processing certain accessors from an embeddable class requires knowledge of owning descriptors that require metadata settings from processing the embeddable metadata.- See Also:
EmbeddableAccessor
-
getOwningDescriptors
public List<MetadataDescriptor> getOwningDescriptors()
INTERNAL: In most cases the owning descriptors is the single descriptor associated with this class accessor. Owning descriptors come into play when dealing with shared embeddable classes (included nested) and their accessors. Processing certain accessors from an embeddable class requires knowledge of owning descriptors that require metadata settings from processing the embeddable metadata.- See Also:
EmbeddableAccessor
-
getParentClass
protected MetadataClass getParentClass()
INTERNAL:
-
getParentClassName
public String getParentClassName()
INTERNAL: Used for OX mapping.
-
getPLSQLRecords
public List<PLSQLRecordMetadata> getPLSQLRecords()
INTERNAL: Used for OX mapping.
-
getPLSQLTables
public List<PLSQLTableMetadata> getPLSQLTables()
INTERNAL: Used for OX mapping.
-
getStruct
public StructMetadata getStruct()
INTERNAL: Used for OX mapping.
-
hasDerivedId
public boolean hasDerivedId()
INTERNAL:
-
hasParentClass
protected boolean hasParentClass()
INTERNAL:
-
isMappedSuperclass
public boolean isMappedSuperclass()
INTERNAL: Return whether this ClassAccessor is a MappedSuperclassAccessor
-
isMetadataComplete
public boolean isMetadataComplete()
INTERNAL:
-
isPreProcessed
public boolean isPreProcessed()
INTERNAL: Return true if this accessor has been pre-processed.
-
isProcessed
public boolean isProcessed()
INTERNAL: Return true if this accessor has been processed.- Specified by:
isProcessedin classMetadataAccessor
-
ignoreAnnotations
public boolean ignoreAnnotations()
INTERNAL: Return true if this class accessor has been set to metadata complete.
-
initXMLClassAccessor
public void initXMLClassAccessor(MetadataAccessibleObject accessibleObject, MetadataDescriptor descriptor, MetadataProject project, XMLEntityMappings entityMappings)
INTERNAL: This method should be subclassed in those methods that need to do extra initialization.
-
initXMLObject
public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)
INTERNAL:- Overrides:
initXMLObjectin classMetadataAccessor
-
isAnnotationPresent
public boolean isAnnotationPresent(String annotation)
INTERNAL: Indicates whether the specified annotation is present on the annotated element for this accessor. Method checks against the metadata complete flag.- Specified by:
isAnnotationPresentin classMetadataAccessor
-
isClassAccessor
public boolean isClassAccessor()
INTERNAL: Return true if this accessor represents a class.
-
isEmbeddableAccessor
public boolean isEmbeddableAccessor()
INTERNAL: Return true if this accessor represents an embeddable class.
-
isEntityAccessor
public boolean isEntityAccessor()
INTERNAL: Return true if this accessor represents an entity class.
-
merge
public void merge(ORMetadata metadata)
INTERNAL: Generic class level merging details for entities, mapped superclasses and embeddables.- Overrides:
mergein classMetadataAccessor
-
preProcess
public void preProcess()
INTERNAL: The pre-process method is called during regular deployment and metadata processing.
-
preProcessForCanonicalModel
public void preProcessForCanonicalModel()
INTERNAL: The pre-process for canonical model method is called (and only called) during the canonical model generation. The use of this pre-process allows us to remove some items from the regular pre-process that do not apply to the canonical model generation.
-
preProcessMappedSuperclassMetadata
protected void preProcessMappedSuperclassMetadata(MappedSuperclassAccessor mappedSuperclass)
INTERNAL: Sub classes that support extending mapped superclasses should override this method to control what is pre-processed from a mapped superclass. By default it does full pre-processing.- See Also:
EmbeddableAccessor
-
process
public void process()
INTERNAL: This method should be overridden by all class accessors to process their specific class metadata first then call up to this method to process the common metadata.- Specified by:
processin classMetadataAccessor
-
processAccessType
protected abstract void processAccessType()
INTERNAL:
-
processAssociationOverride
protected void processAssociationOverride(AssociationOverrideMetadata associationOverride)
INTERNAL: Process the association override metadata specified on an entity or mapped superclass. For any given class, XML association overrides are always added first (see processAssociationOverrides()).
-
processAssociationOverrides
protected void processAssociationOverrides()
INTERNAL: Process the association override metadata specified on an entity or mapped superclass. Once the association overrides are processed from XML process the association overrides from annotations. This order of processing must be maintained.
-
processAttributeOverride
protected void processAttributeOverride(AttributeOverrideMetadata attributeOverride)
INTERNAL: Process the attribute override metadata specified on an entity or mapped superclass. For any given class, XML attribute overrides are always added first (see processAttributeOverrides()).
-
processAttributeOverrides
protected void processAttributeOverrides()
INTERNAL: Process the attribute override metadata specified on an entity or mapped superclass. Once the attribute overrides are processed from XML process the attribute overrides from annotations. This order of processing must be maintained.
-
processChangeTracking
protected void processChangeTracking()
INTERNAL: Process the change tracking setting for this accessor.
-
processComplexMetadataTypes
public void processComplexMetadataTypes()
Process PL/SQL record and table types, Oracle object array and XMLType types.
-
processCopyPolicy
protected void processCopyPolicy()
INTERNAL:
-
processCustomizer
protected void processCustomizer()
INTERNAL:
-
processDerivedId
public void processDerivedId(HashSet<ClassAccessor> processing, HashSet<ClassAccessor> processed)
INTERNAL: Allows for processing derived ids, either from an Id or MapsId specification. All referenced accessors are processed first to ensure the necessary fields are set before the derived id is processed and circular references are checked.
-
processMappedSuperclassMetadata
protected void processMappedSuperclassMetadata(MappedSuperclassAccessor mappedSuperclass)
INTERNAL Sub classes that support extending mapped superclasses should override this method to control what is processed from a mapped superclass. By default it does full processing.- See Also:
EmbeddableAccessor
-
processMappingAccessors
public void processMappingAccessors()
INTERNAL: Process the accessors for the given class.
-
processNoSql
protected void processNoSql()
INTERNAL: Check for and process a NoSql annotation and configure the correct descriptor type. NOTE: NoSql metadata is supported only on Entity and Embeddable.
-
processParentClass
public void processParentClass()
INTERNAL: If the user specified a parent class set it on the metadata class for this accessor. The parent class is only ever required in a VIRTUAL case when no java class file is available (otherwise we look at the class for the parent).
-
processProperties
protected void processProperties()
INTERNAL: Adds properties to the descriptor.
-
processStruct
protected void processStruct()
Check for and process a Struct annotation and configure the correct descriptor type. NOTE: Struct metadata is supported only on Entity and Embeddable.
-
processVirtualClass
protected void processVirtualClass()
INTERNAL: If this class accessor uses VIRTUAL access and is not accessible, add it to our list of virtual classes that will be dynamically created.
-
resolveGenericTypes
protected void resolveGenericTypes(List<String> genericTypes, MetadataClass parent)
INTERNAL: This method resolves generic types. Resolving generic types will be the responsibility of the metadata factory since each factory could have its own means to do so and not respect a generic format on the metadata objects.
-
setAssociationOverrides
public void setAssociationOverrides(List<AssociationOverrideMetadata> associationOverrides)
INTERNAL: Used for OX mapping.
-
setAttributeOverrides
public void setAttributeOverrides(List<AttributeOverrideMetadata> attributeOverrides)
INTERNAL: Used for OX mapping.
-
setAttributes
public void setAttributes(XMLAttributes attributes)
INTERNAL: Used for OX mapping.
-
setChangeTracking
public void setChangeTracking(ChangeTrackingMetadata changeTracking)
INTERNAL: Used for OX mapping.
-
setClassName
public void setClassName(String className)
INTERNAL: Used for OX mapping.
-
setCloneCopyPolicy
public void setCloneCopyPolicy(CloneCopyPolicyMetadata copyPolicy)
INTERNAL: set the copy policy metadata
-
setCustomCopyPolicy
public void setCustomCopyPolicy(CustomCopyPolicyMetadata copyPolicy)
INTERNAL: set the copy policy metadata
-
setCustomizerClassName
public void setCustomizerClassName(String customizerClassName)
INTERNAL: Used for OX mapping.
-
setDescription
public void setDescription(String description)
INTERNAL: Used for OX mapping.
-
setExcludeDefaultMappings
public void setExcludeDefaultMappings(Boolean excludeDefaultMappings)
INTERNAL: Used for OX mapping.
-
setInstantiationCopyPolicy
public void setInstantiationCopyPolicy(InstantiationCopyPolicyMetadata copyPolicy)
INTERNAL: set the copy policy metadata
-
setIsPreProcessed
protected void setIsPreProcessed()
INTERNAL:
-
setIsProcessed
protected void setIsProcessed()
INTERNAL:
-
setJavaClass
public void setJavaClass(MetadataClass cls)
INTERNAL: Set the java class for this accessor. This is currently called after the class loader has changed and we are adding entity listeners.
-
setMetadataComplete
public void setMetadataComplete(Boolean metadataComplete)
INTERNAL: Used for OX mapping.
-
setParentClass
protected void setParentClass(MetadataClass parentClass)
INTERNAL:
-
setParentClassName
public void setParentClassName(String parentClassName)
INTERNAL: Used for OX mapping.
-
setPLSQLRecords
public void setPLSQLRecords(List<PLSQLRecordMetadata> records)
INTERNAL: Used for OX mapping.
-
setPLSQLTables
public void setPLSQLTables(List<PLSQLTableMetadata> tables)
INTERNAL: Used for OX mapping.
-
setStruct
public void setStruct(StructMetadata struct)
INTERNAL: Used for OX mapping.
-
usesFieldAccess
public boolean usesFieldAccess()
INTERNAL: Returns true if this class uses field access. It will first check for an explicit access type specification, otherwise will use the default access as specified on the descriptor for this accessor since we may be processing a mapped superclass.
-
usesPropertyAccess
public boolean usesPropertyAccess()
INTERNAL: Returns true if this class uses property access. It will first check for an explicit access type specification, otherwise will use the default access as specified on the descriptor for this accessor since we may be processing a mapped superclass.
-
usesVirtualAccess
public boolean usesVirtualAccess()
INTERNAL: Returns true if this class uses virtual access. It will first check for an explicit access type specification, otherwise will use the default access as specified on the descriptor for this accessor since we may be processing a mapped superclass.
-
getOracleObjectTypes
public List<OracleObjectTypeMetadata> getOracleObjectTypes()
Returns the list of OracleObjectType instances.
-
setOracleObjectTypes
public void setOracleObjectTypes(List<OracleObjectTypeMetadata> oracleObjectTypes)
Sets the list of OracleObjectType instances.
-
getOracleArrayTypes
public List<OracleArrayTypeMetadata> getOracleArrayTypes()
Returns the list of OracleArrayType instances.
-
setOracleArrayTypes
public void setOracleArrayTypes(List<OracleArrayTypeMetadata> oracleArrayTypes)
Sets the list of OracleArrayType instances.
-
-