public abstract class ClassAccessor extends MetadataAccessor
m_project| Modifier | Constructor and Description |
|---|---|
protected |
ClassAccessor(MetadataAnnotation annotation,
MetadataClass cls,
MetadataDescriptor descriptor)
INTERNAL:
Called from MappedSuperclassAccessor.
|
|
ClassAccessor(MetadataAnnotation annotation,
MetadataClass cls,
MetadataProject project)
INTERNAL:
|
protected |
ClassAccessor(java.lang.String xmlElement)
INTERNAL:
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAccessor(MappingAccessor accessor)
INTERNAL:
Add the accessor to the descriptor
|
protected void |
addAccessorFields(boolean processingInverse)
INTERNAL:
Create mappings from the fields directly.
|
protected void |
addAccessorMethods(boolean processingInverse)
INTERNAL:
Create mappings via the class properties.
|
void |
addAccessors()
INTERNAL:
Add the accessors from this class accessors java class to the descriptor
tied to this class accessor.
|
protected void |
addPotentialEmbeddableAccessor(MetadataClass potentialEmbeddableClass,
ClassAccessor embeddingAccessor)
INTERNAL
Add an embeddable class to the embeddable accessor list if it is
indeed an embeddable.
|
protected void |
addPotentialMappedSuperclass(MetadataClass metadataClass,
boolean addMappedSuperclassAccessors)
INTERNAL:
Add mapped superclass accessors to inheriting entities.
|
protected MappingAccessor |
buildAccessor(MetadataAnnotatedElement accessibleObject)
INTERNAL:
Create and return the appropriate accessor based on the accessible
object given.
|
protected void |
clearMappedSuperclassesAndInheritanceParents()
INTERNAL:
|
void |
clearPreProcessed()
INTERNAL:
In some cases the pre-processing may need to be re-done.
|
boolean |
equals(java.lang.Object objectToCompare)
INTERNAL:
|
boolean |
excludeDefaultMappings()
INTERNAL:
Return true if this class accessor has been set to metadata complete.
|
protected MetadataField |
getAccessibleField(MappingAccessor accessor)
INTERNAL:
Return the accessible field for the given mapping accessor.
|
protected MetadataMethod |
getAccessibleMethod(MappingAccessor accessor)
INTERNAL:
Return the accessible method for the given mapping accessor.
|
protected MetadataMethod |
getAccessibleVirtualMethod(MappingAccessor accessor)
INTERNAL:
This method should only be called when using virtual access and
presumably for dynamic persistence.
|
java.lang.String |
getAccessType()
INTERNAL:
Return the access type of this accessor.
|
protected MetadataAnnotation |
getAnnotation(java.lang.String annotation)
INTERNAL:
Return the annotation if it exists.
|
java.util.List<AssociationOverrideMetadata> |
getAssociationOverrides()
INTERNAL:
Used for OX mapping.
|
java.util.List<AttributeOverrideMetadata> |
getAttributeOverrides()
INTERNAL:
Used for OX mapping.
|
XMLAttributes |
getAttributes()
INTERNAL:
Used for OX mapping.
|
ChangeTrackingMetadata |
getChangeTracking()
INTERNAL:
Used for OX mapping.
|
java.lang.String |
getClassName()
INTERNAL:
Used for OX mapping.
|
CloneCopyPolicyMetadata |
getCloneCopyPolicy()
INTERNAL:
Used for OX mapping
|
CopyPolicyMetadata |
getCopyPolicy()
INTERNAL:
|
CustomCopyPolicyMetadata |
getCustomCopyPolicy()
INTERNAL:
Used for OX mapping
|
MetadataClass |
getCustomizerClass()
INTERNAL:
|
java.lang.String |
getCustomizerClassName()
INTERNAL:
Used for OX mapping.
|
java.lang.String |
getDescription()
INTERNAL:
Used for OX mapping.
|
java.lang.Boolean |
getExcludeDefaultMappings()
INTERNAL:
Used for OX mapping.
|
java.lang.String |
getIdentifier()
INTERNAL:
To satisfy the abstract getIdentifier() method from ORMetadata.
|
InstantiationCopyPolicyMetadata |
getInstantiationCopyPolicy()
INTERNAL:
Used for OX mapping
|
MetadataClass |
getJavaClass()
INTERNAL:
Return the java class that defines this accessor.
|
java.lang.String |
getJavaClassName()
INTERNAL:
Return the java class name that defines this accessor.
|
java.util.List<MappedSuperclassAccessor> |
getMappedSuperclasses()
INTERNAL:
Return the mapped superclasses associated with this entity accessor.
|
java.lang.Boolean |
getMetadataComplete()
INTERNAL:
Used for OX mapping.
|
NoSqlMetadata |
getNoSql()
INTERNAL:
Used for OX mapping.
|
java.util.List<OracleArrayTypeMetadata> |
getOracleArrayTypes()
Returns the list of OracleArrayType instances.
|
java.util.List<OracleObjectTypeMetadata> |
getOracleObjectTypes()
Returns the list of OracleObjectType instances.
|
MetadataDescriptor |
getOwningDescriptor()
INTERNAL:
In most cases the owning descriptor is the descriptor associated with
this class accessor.
|
java.util.List<MetadataDescriptor> |
getOwningDescriptors()
INTERNAL:
In most cases the owning descriptors is the single descriptor associated
with this class accessor.
|
protected MetadataClass |
getParentClass()
INTERNAL:
|
java.lang.String |
getParentClassName()
INTERNAL:
Used for OX mapping.
|
java.util.List<PLSQLRecordMetadata> |
getPLSQLRecords()
INTERNAL:
Used for OX mapping.
|
java.util.List<PLSQLTableMetadata> |
getPLSQLTables()
INTERNAL:
Used for OX mapping.
|
StructMetadata |
getStruct()
INTERNAL:
Used for OX mapping.
|
boolean |
hasDerivedId()
INTERNAL:
|
int |
hashCode() |
protected boolean |
hasParentClass()
INTERNAL:
|
boolean |
ignoreAnnotations()
INTERNAL:
Return true if this class accessor has been set to metadata complete.
|
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.
|
void |
initXMLObject(MetadataAccessibleObject accessibleObject,
XMLEntityMappings entityMappings)
INTERNAL:
|
boolean |
isAnnotationPresent(java.lang.String annotation)
INTERNAL:
Indicates whether the specified annotation is present on the annotated
element for this accessor.
|
boolean |
isClassAccessor()
INTERNAL:
Return true if this accessor represents a class.
|
boolean |
isEmbeddableAccessor()
INTERNAL:
Return true if this accessor represents an embeddable class.
|
boolean |
isEntityAccessor()
INTERNAL:
Return true if this accessor represents an entity class.
|
boolean |
isMappedSuperclass()
INTERNAL:
Return whether this ClassAccessor is a MappedSuperclassAccessor
|
boolean |
isMetadataComplete()
INTERNAL:
|
boolean |
isPreProcessed()
INTERNAL:
Return true if this accessor has been pre-processed.
|
boolean |
isProcessed()
INTERNAL:
Return true if this accessor has been processed.
|
void |
merge(ORMetadata metadata)
INTERNAL:
Generic class level merging details for entities, mapped superclasses
and embeddables.
|
void |
preProcess()
INTERNAL:
The pre-process method is called during regular deployment and metadata
processing.
|
void |
preProcessForCanonicalModel()
INTERNAL:
The pre-process for canonical model method is called (and only called)
during the canonical model generation.
|
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.
|
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.
|
protected abstract void |
processAccessType()
INTERNAL:
|
protected void |
processAssociationOverride(AssociationOverrideMetadata associationOverride)
INTERNAL:
Process the association override metadata specified on an entity or
mapped superclass.
|
protected void |
processAssociationOverrides()
INTERNAL:
Process the association override metadata specified on an entity or
mapped superclass.
|
protected void |
processAttributeOverride(AttributeOverrideMetadata attributeOverride)
INTERNAL:
Process the attribute override metadata specified on an entity or
mapped superclass.
|
protected void |
processAttributeOverrides()
INTERNAL:
Process the attribute override metadata specified on an entity or
mapped superclass.
|
protected void |
processChangeTracking()
INTERNAL:
Process the change tracking setting for this accessor.
|
void |
processComplexMetadataTypes()
Process PL/SQL record and table types, Oracle object array and XMLType types.
|
protected void |
processCopyPolicy()
INTERNAL:
|
protected void |
processCustomizer()
INTERNAL:
|
void |
processDerivedId(java.util.HashSet<ClassAccessor> processing,
java.util.HashSet<ClassAccessor> processed)
INTERNAL:
Allows for processing derived ids, either from an Id or MapsId
specification.
|
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.
|
void |
processMappingAccessors()
INTERNAL:
Process the accessors for the given class.
|
protected void |
processNoSql()
INTERNAL:
Check for and process a NoSql annotation and configure the correct
descriptor type.
|
void |
processParentClass()
INTERNAL:
If the user specified a parent class set it on the metadata class
for this accessor.
|
protected void |
processProperties()
INTERNAL:
Adds properties to the descriptor.
|
protected void |
processStruct()
Check for and process a Struct annotation and configure the correct
descriptor type.
|
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.
|
protected void |
resolveGenericTypes(java.util.List<java.lang.String> genericTypes,
MetadataClass parent)
INTERNAL:
This method resolves generic types.
|
void |
setAssociationOverrides(java.util.List<AssociationOverrideMetadata> associationOverrides)
INTERNAL:
Used for OX mapping.
|
void |
setAttributeOverrides(java.util.List<AttributeOverrideMetadata> attributeOverrides)
INTERNAL:
Used for OX mapping.
|
void |
setAttributes(XMLAttributes attributes)
INTERNAL:
Used for OX mapping.
|
void |
setChangeTracking(ChangeTrackingMetadata changeTracking)
INTERNAL:
Used for OX mapping.
|
void |
setClassName(java.lang.String className)
INTERNAL:
Used for OX mapping.
|
void |
setCloneCopyPolicy(CloneCopyPolicyMetadata copyPolicy)
INTERNAL:
set the copy policy metadata
|
void |
setCustomCopyPolicy(CustomCopyPolicyMetadata copyPolicy)
INTERNAL:
set the copy policy metadata
|
void |
setCustomizerClassName(java.lang.String customizerClassName)
INTERNAL:
Used for OX mapping.
|
void |
setDescription(java.lang.String description)
INTERNAL:
Used for OX mapping.
|
void |
setExcludeDefaultMappings(java.lang.Boolean excludeDefaultMappings)
INTERNAL:
Used for OX mapping.
|
void |
setInstantiationCopyPolicy(InstantiationCopyPolicyMetadata copyPolicy)
INTERNAL:
set the copy policy metadata
|
protected void |
setIsPreProcessed()
INTERNAL:
|
protected void |
setIsProcessed()
INTERNAL:
|
void |
setJavaClass(MetadataClass cls)
INTERNAL:
Set the java class for this accessor.
|
void |
setMetadataComplete(java.lang.Boolean metadataComplete)
INTERNAL:
Used for OX mapping.
|
void |
setNoSql(NoSqlMetadata noSql)
INTERNAL:
Used for OX mapping.
|
void |
setOracleArrayTypes(java.util.List<OracleArrayTypeMetadata> oracleArrayTypes)
Sets the list of OracleArrayType instances.
|
void |
setOracleObjectTypes(java.util.List<OracleObjectTypeMetadata> oracleObjectTypes)
Sets the list of OracleObjectType instances.
|
protected void |
setParentClass(MetadataClass parentClass)
INTERNAL:
|
void |
setParentClassName(java.lang.String parentClassName)
INTERNAL:
Used for OX mapping.
|
void |
setPLSQLRecords(java.util.List<PLSQLRecordMetadata> records)
INTERNAL:
Used for OX mapping.
|
void |
setPLSQLTables(java.util.List<PLSQLTableMetadata> tables)
INTERNAL:
Used for OX mapping.
|
void |
setStruct(StructMetadata struct)
INTERNAL:
Used for OX mapping.
|
java.lang.String |
toString()
INTERNAL:
|
boolean |
usesFieldAccess()
INTERNAL:
Returns true if this class uses field access.
|
boolean |
usesPropertyAccess()
INTERNAL:
Returns true if this class uses property access.
|
boolean |
usesVirtualAccess()
INTERNAL:
Returns true if this class uses virtual access.
|
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, setValuePartitioninggetAccessibleObjectName, 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, valuesMatchprotected ClassAccessor(java.lang.String xmlElement)
public ClassAccessor(MetadataAnnotation annotation, MetadataClass cls, MetadataProject project)
protected ClassAccessor(MetadataAnnotation annotation, MetadataClass cls, MetadataDescriptor descriptor)
protected void addAccessor(MappingAccessor accessor)
public void addAccessors()
protected void addAccessorFields(boolean processingInverse)
protected void addAccessorMethods(boolean processingInverse)
protected void addPotentialEmbeddableAccessor(MetadataClass potentialEmbeddableClass, ClassAccessor embeddingAccessor)
processStage1()protected void addPotentialMappedSuperclass(MetadataClass metadataClass, boolean addMappedSuperclassAccessors)
protected MappingAccessor buildAccessor(MetadataAnnotatedElement accessibleObject)
protected void clearMappedSuperclassesAndInheritanceParents()
public void clearPreProcessed()
public boolean equals(java.lang.Object objectToCompare)
equals in class MetadataAccessorpublic int hashCode()
hashCode in class MetadataAccessorpublic boolean excludeDefaultMappings()
protected MetadataField getAccessibleField(MappingAccessor accessor)
protected MetadataMethod getAccessibleMethod(MappingAccessor accessor)
protected MetadataMethod getAccessibleVirtualMethod(MappingAccessor accessor)
public java.lang.String getAccessType()
protected MetadataAnnotation getAnnotation(java.lang.String annotation)
getAnnotation in class MetadataAccessorpublic java.util.List<AssociationOverrideMetadata> getAssociationOverrides()
public java.util.List<AttributeOverrideMetadata> getAttributeOverrides()
public XMLAttributes getAttributes()
public ChangeTrackingMetadata getChangeTracking()
public java.lang.String getClassName()
public CopyPolicyMetadata getCopyPolicy()
public CloneCopyPolicyMetadata getCloneCopyPolicy()
public CustomCopyPolicyMetadata getCustomCopyPolicy()
public MetadataClass getCustomizerClass()
public java.lang.String getCustomizerClassName()
public java.lang.String getDescription()
public java.lang.Boolean getExcludeDefaultMappings()
public java.lang.String getIdentifier()
public InstantiationCopyPolicyMetadata getInstantiationCopyPolicy()
public MetadataClass getJavaClass()
getJavaClass in class MetadataAccessorpublic java.lang.String getJavaClassName()
getJavaClassName in class MetadataAccessorpublic java.util.List<MappedSuperclassAccessor> getMappedSuperclasses()
preProcess()public java.lang.Boolean getMetadataComplete()
public NoSqlMetadata getNoSql()
public void setNoSql(NoSqlMetadata noSql)
public MetadataDescriptor getOwningDescriptor()
EmbeddableAccessorpublic java.util.List<MetadataDescriptor> getOwningDescriptors()
EmbeddableAccessorprotected MetadataClass getParentClass()
public java.lang.String getParentClassName()
public java.util.List<PLSQLRecordMetadata> getPLSQLRecords()
public java.util.List<PLSQLTableMetadata> getPLSQLTables()
public StructMetadata getStruct()
public boolean hasDerivedId()
protected boolean hasParentClass()
public boolean isMappedSuperclass()
public boolean isMetadataComplete()
public boolean isPreProcessed()
public boolean isProcessed()
isProcessed in class MetadataAccessorpublic boolean ignoreAnnotations()
public void initXMLClassAccessor(MetadataAccessibleObject accessibleObject, MetadataDescriptor descriptor, MetadataProject project, XMLEntityMappings entityMappings)
public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)
initXMLObject in class MetadataAccessorpublic boolean isAnnotationPresent(java.lang.String annotation)
isAnnotationPresent in class MetadataAccessorpublic boolean isClassAccessor()
public boolean isEmbeddableAccessor()
public boolean isEntityAccessor()
public void merge(ORMetadata metadata)
merge in class MetadataAccessorpublic void preProcess()
public void preProcessForCanonicalModel()
protected void preProcessMappedSuperclassMetadata(MappedSuperclassAccessor mappedSuperclass)
EmbeddableAccessorpublic void process()
process in class MetadataAccessorprotected abstract void processAccessType()
protected void processAssociationOverride(AssociationOverrideMetadata associationOverride)
protected void processAssociationOverrides()
protected void processAttributeOverride(AttributeOverrideMetadata attributeOverride)
protected void processAttributeOverrides()
protected void processChangeTracking()
public void processComplexMetadataTypes()
protected void processCopyPolicy()
protected void processCustomizer()
public void processDerivedId(java.util.HashSet<ClassAccessor> processing, java.util.HashSet<ClassAccessor> processed)
protected void processMappedSuperclassMetadata(MappedSuperclassAccessor mappedSuperclass)
EmbeddableAccessorpublic void processMappingAccessors()
protected void processNoSql()
public void processParentClass()
protected void processProperties()
protected void processStruct()
protected void processVirtualClass()
protected void resolveGenericTypes(java.util.List<java.lang.String> genericTypes,
MetadataClass parent)
public void setAssociationOverrides(java.util.List<AssociationOverrideMetadata> associationOverrides)
public void setAttributeOverrides(java.util.List<AttributeOverrideMetadata> attributeOverrides)
public void setAttributes(XMLAttributes attributes)
public void setChangeTracking(ChangeTrackingMetadata changeTracking)
public void setClassName(java.lang.String className)
public void setCloneCopyPolicy(CloneCopyPolicyMetadata copyPolicy)
public void setCustomCopyPolicy(CustomCopyPolicyMetadata copyPolicy)
public void setCustomizerClassName(java.lang.String customizerClassName)
public void setDescription(java.lang.String description)
public void setExcludeDefaultMappings(java.lang.Boolean excludeDefaultMappings)
public void setInstantiationCopyPolicy(InstantiationCopyPolicyMetadata copyPolicy)
protected void setIsPreProcessed()
protected void setIsProcessed()
public void setJavaClass(MetadataClass cls)
public void setMetadataComplete(java.lang.Boolean metadataComplete)
protected void setParentClass(MetadataClass parentClass)
public void setParentClassName(java.lang.String parentClassName)
public void setPLSQLRecords(java.util.List<PLSQLRecordMetadata> records)
public void setPLSQLTables(java.util.List<PLSQLTableMetadata> tables)
public void setStruct(StructMetadata struct)
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean usesFieldAccess()
public boolean usesPropertyAccess()
public boolean usesVirtualAccess()
public java.util.List<OracleObjectTypeMetadata> getOracleObjectTypes()
public void setOracleObjectTypes(java.util.List<OracleObjectTypeMetadata> oracleObjectTypes)
public java.util.List<OracleArrayTypeMetadata> getOracleArrayTypes()
public void setOracleArrayTypes(java.util.List<OracleArrayTypeMetadata> oracleArrayTypes)