Class MetadataDescriptor
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.metadata.MetadataDescriptor
-
public class MetadataDescriptor extends java.lang.ObjectINTERNAL: Common metatata descriptor for the annotation and xml processors. This class is a wrap on an actual EclipseLink descriptor.- Since:
- TopLink EJB 3.0 Reference Implementation
- Author:
- Guy Pelletier
-
-
Constructor Summary
Constructors Constructor Description MetadataDescriptor(MetadataClass javaClass)INTERNAL:MetadataDescriptor(MetadataClass javaClass, ClassAccessor classAccessor)INTERNAL:
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAssociationOverride(AssociationOverrideMetadata associationOverride)INTERNAL:voidaddAttributeOverride(AttributeOverrideMetadata attributeOverride)INTERNAL:voidaddConvert(java.lang.String attributeName, ConvertMetadata convert)INTERNAL: Add a convert to override a superclass class mapping.voidaddDefaultEventListener(org.eclipse.persistence.descriptors.DescriptorEventListener listener)INTERNAL:voidaddEmbeddableDescriptor(MetadataDescriptor embeddableDescriptor)INTERNAL:voidaddEntityListenerEventListener(org.eclipse.persistence.descriptors.DescriptorEventListener listener)INTERNAL:voidaddField(org.eclipse.persistence.internal.helper.DatabaseField field)INTERNAL: Add a field from a basic mapping from this descriptor.voidaddFieldForInsert(org.eclipse.persistence.internal.helper.DatabaseField field)INTERNAL:voidaddFieldForInsertReturnOnly(org.eclipse.persistence.internal.helper.DatabaseField field)INTERNAL:voidaddFieldForUpdate(org.eclipse.persistence.internal.helper.DatabaseField field)INTERNAL:voidaddForeignKeyFieldForMultipleTable(org.eclipse.persistence.internal.helper.DatabaseField fkField, org.eclipse.persistence.internal.helper.DatabaseField pkField)INTERNAL:voidaddGenericType(java.lang.String genericName, java.lang.String type)INTERNAL: Add a generic type for this descriptor.voidaddIdAttributeName(java.lang.String idAttributeName)INTERNAL:voidaddMapKeyConvert(java.lang.String attributeName, ConvertMetadata convert)INTERNAL: Add a map key convert to override a superclass class mapping.voidaddMappingAccessor(MappingAccessor accessor)INTERNAL: If the accessor is an IdAccessor we store it in a separate map for use during MappedSuperclass processing.voidaddPKClassId(java.lang.String attributeName, java.lang.String type)INTERNAL: We store these to validate the primary class when processing the entity class.voidaddPrimaryKeyField(org.eclipse.persistence.internal.helper.DatabaseField field)INTERNAL: Add a field representing the primary key or part of a composite primary key to the List of primary key fields on the relational descriptor associated with this metadata descriptor.voidaddPrimaryKeyField(org.eclipse.persistence.internal.helper.DatabaseField field, MappingAccessor accessor)INTERNAL: Add a field representing the primary key or part of a composite primary key to the List of primary key fields on the relational descriptor associated with this metadata descriptor.voidaddProperty(PropertyMetadata property)INTERNAL: Add a property to the descriptor.voidaddRelationshipAccessor(RelationshipAccessor accessor)INTERNAL: Store relationship accessors for later processing and quick look up.voidaddTable(org.eclipse.persistence.internal.helper.DatabaseTable table)INTERNAL:voidclearMappingAccessors()INTERNAL: This method is called only for canonical model generation during the pre-processing stage.booleanexcludeSuperclassListeners()INTERNAL:java.lang.StringgetAlias()INTERNAL:AssociationOverrideMetadatagetAssociationOverrideFor(java.lang.String attributeName)INTERNAL:java.util.Collection<AssociationOverrideMetadata>getAssociationOverrides()INTERNAL:AttributeOverrideMetadatagetAttributeOverrideFor(java.lang.String attributeName)INTERNAL:java.util.Collection<AttributeOverrideMetadata>getAttributeOverrides()INTERNAL:MetadataAccessorgetBiDirectionalManyToManyAccessor(java.lang.String className, java.lang.String attributeName)INTERNAL: Assumes hasBidirectionalManyToManyAccessorFor has been called before hand.java.lang.BooleangetCacheable()INTERNAL: Get entity @Cacheable annotation value.ClassAccessorgetClassAccessor()INTERNAL:org.eclipse.persistence.descriptors.ClassDescriptorgetClassDescriptor()INTERNAL: Return the RelationalDescriptor instance associated with this MetadataDescriptororg.eclipse.persistence.descriptors.CMPPolicygetCMPPolicy()INTERNAL:java.util.List<ConvertMetadata>getConverts(java.lang.String attributeName)INTERNAL:java.lang.StringgetDefaultAccess()INTERNAL:AccessMethodsMetadatagetDefaultAccessMethods()INTERNAL:java.lang.StringgetDefaultCatalog()INTERNAL:java.lang.StringgetDefaultSchema()INTERNAL:java.lang.StringgetDefaultTableName()INTERNAL: The default table name is the descriptor alias, unless this descriptor metadata is an inheritance subclass with a SINGLE_TABLE strategy.java.util.List<TenantDiscriminatorColumnMetadata>getDefaultTenantDiscriminatorColumns()INTERNAL:java.util.List<ObjectAccessor>getDerivedIdAccessors()INTERNAL:EmbeddedIdAccessorgetEmbeddedIdAccessor()INTERNAL: Return the embedded id accessor for this descriptor if one exists.java.lang.StringgetEmbeddedIdAttributeName()INTERNAL:EntityAccessorgetEntityAccessor()INTERNAL: This method assumes that by calling this method you are certain that the related class accessor to this descriptor is an EntityAccessor.org.eclipse.persistence.internal.helper.DatabaseFieldgetField(java.lang.String fieldName)INTERNAL: Return the DatabaseField from the given field name from this descriptor.java.lang.StringgetGenericType(java.lang.String genericName)INTERNAL: Return the type from the generic name.java.util.MapgetGenericTypes()INTERNAL:java.util.Map<java.lang.String,IdAccessor>getIdAccessors()INTERNAL:java.lang.StringgetIdAttributeName()INTERNAL: Return the primary key attribute name for this entity.java.util.List<java.lang.String>getIdAttributeNames()INTERNAL: Return the id attribute names declared on this descriptor metadata.java.util.List<java.lang.String>getIdOrderByAttributeNames()INTERNAL: Return the primary key attribute names for this entity.MetadataDescriptorgetInheritanceParentDescriptor()INTERNAL: Returns the immediate parent's descriptor in the inheritance hierarchy.MetadataDescriptorgetInheritanceRootDescriptor()INTERNAL: Returns the root descriptor of the inheritance hierarchy, that is, the one that defines the inheritance strategy.MetadataClassgetJavaClass()INTERNAL:java.lang.StringgetJavaClassName()INTERNAL:MetadataLoggergetLogger()INTERNAL:java.util.List<ConvertMetadata>getMapKeyConverts(java.lang.String attributeName)INTERNAL:MappingAccessorgetMappingAccessor(java.lang.String fieldOrPropertyName)INTERNAL: This method will first check for an accessor with name equal to field or property name.protected MappingAccessorgetMappingAccessor(java.lang.String fieldOrPropertyName, boolean checkForMethodName)INTERNAL: This method will first check for an accessor with name equal to field or property name.java.util.Collection<MappingAccessor>getMappingAccessors()INTERNAL: Return the collection of mapping accessors for this descriptor.org.eclipse.persistence.mappings.DatabaseMappinggetMappingForAttributeName(java.lang.String attributeName)INTERNAL:java.util.List<org.eclipse.persistence.mappings.DatabaseMapping>getMappings()INTERNAL:MetadataDescriptorgetMetamodelMappedSuperclassChildDescriptor()INTERNAL:java.util.List<java.lang.String>getOrderByAttributeNames()INTERNAL: This will return the attribute names for all the direct to field mappings on this descriptor metadata.MetadataClassgetPKClass()INTERNAL:java.util.Map<java.lang.String,java.lang.String>getPKClassIDs()INTERNAL:java.lang.StringgetPKClassName()INTERNAL:MappingAccessorgetPrimaryKeyAccessorForField(org.eclipse.persistence.internal.helper.DatabaseField field)INTERNAL: Return the primary key mapping for the given field.org.eclipse.persistence.internal.helper.DatabaseFieldgetPrimaryKeyField()INTERNAL: Method to return the primary key field name this descriptor metadata.java.lang.StringgetPrimaryKeyFieldName()INTERNAL: Method to return the primary key field name for this descriptor metadata.java.util.List<org.eclipse.persistence.internal.helper.DatabaseField>getPrimaryKeyFields()INTERNAL Return the primary key fields for this descriptor metadata.org.eclipse.persistence.internal.helper.DatabaseFieldgetPrimaryKeyJoinColumnAssociation(org.eclipse.persistence.internal.helper.DatabaseField foreignKey)INTERNAL: Recursively check the potential chaining of the primary key fields from a inheritance subclass, all the way to the root of the inheritance hierarchy.org.eclipse.persistence.internal.helper.DatabaseFieldgetPrimaryKeyJoinColumnAssociationField(org.eclipse.persistence.internal.helper.DatabaseField primaryKeyField)INTERNAL: Returns the first primary key join column association if there is one.org.eclipse.persistence.internal.helper.DatabaseTablegetPrimaryKeyTable()INTERNAL: Assumes there is one primary key field set.org.eclipse.persistence.internal.helper.DatabaseTablegetPrimaryTable()INTERNAL:java.lang.StringgetPrimaryTableName()INTERNAL:MetadataProjectgetProject()INTERNAL:protected org.eclipse.persistence.descriptors.ReturningPolicygetReturningPolicy()INTERNAL:org.eclipse.persistence.internal.helper.DatabaseFieldgetSequenceNumberField()INTERNAL:java.util.Map<java.lang.String,java.util.List<org.eclipse.persistence.internal.helper.DatabaseField>>getSingleTableMultitenantFields()INTERNAL: Assumes a call to hasSingleTableMultitenant has been made before hand.booleanhasAdditionalCriteria()INTERNAL: Returns true is an additional criteria has been set on this descriptor's query manager.booleanhasAssociationOverrideFor(java.lang.String attributeName)INTERNAL:booleanhasAttributeOverrideFor(java.lang.String attributeName)INTERNAL:booleanhasBiDirectionalManyToManyAccessorFor(java.lang.String className, java.lang.String attributeName)INTERNAL:booleanhasCache()INTERNAL: Indicates that a Cache annotation or cache element has already been processed for this descriptor.booleanhasCacheable()INTERNAL: Indicates that a Cacheable annotation or cache element has already been processed for this descriptor.booleanhasCacheInterceptor()INTERNAL: Indicates that a CacheInterceptor annotation or cacheInterceptor element has already been processed for this descriptor.booleanhasChangeTracking()INTERNAL: Indicates that a Change tracking annotation or change tracking element has already been processed for this descriptor.booleanhasCompositePrimaryKey()INTERNAL:booleanhasConverts(java.lang.String attributeName)INTERNAL: Return true if there is convert metadata for the given attribute name.booleanhasCopyPolicy()INTERNAL: Indicates that a copy Policy annotation or copy policy element has already been processed for this descriptor.booleanhasCustomizer()INTERNAL: Indicates that a customizer annotation or customizer element has already been processed for this descriptor.booleanhasDefaultRedirectors()INTERNAL: Indicates that a DefaultRedirectors annotation or default-redirectors element has already been processed for this descriptor.booleanhasEmbeddedId()INTERNAL:booleanhasExistenceChecking()INTERNAL:booleanhasIdAccessor()INTERNAL: Return whether there is an IdAccessor on this descriptor.booleanhasMapKeyConverts(java.lang.String attributeName)INTERNAL: Return true if there is map key convert metadata for the given attribute name.booleanhasMappingAccessor(java.lang.String attributeName)INTERNAL: Returns true if we already have (processed) an accessor for the given attribute name.booleanhasMappingForAttributeName(java.lang.String attributeName)INTERNAL:booleanhasMultitenant()INTERNAL: Indicates if multitenant metadata has been processed for this descriptor.booleanhasPKClass()INTERNAL:booleanhasPrimaryKey()INTERNAL: Indicates that a PrimaryKey annotation or primary-key element has been processed for this descriptor.booleanhasPrimaryKeyFields()INTERNAL: Return true is the descriptor has primary key fields set.booleanhasReadOnly()INTERNAL: Indicates that a read only annotation or read only element has already been processed for this descriptor.booleanhasSingleTableMultitenant()INTERNAL: Indicates if single table multitenant metadata has been processed for this descriptor.booleanisCacheableFalse()INTERNAL: Indicates that an explicit cacheable value of false has been set for this descriptor.booleanisCacheableTrue()INTERNAL: Indicates that an explicit cacheable value of true has been set for this descriptor.booleanisCascadePersist()INTERNAL: Indicates that cascade-persist should be applied to all relationship mappings for this entity.booleanisEmbeddable()INTERNAL:booleanisEmbeddableCollection()INTERNAL:booleanisInheritanceSubclass()INTERNAL:booleanisMappedSuperclass()INTERNAL: Return whether the ClassAccessor on this MetadataDescriptor is a MappedSuperclassAccessor.booleanm_hasSerializedObjectPolicy()INTERNAL: Indicates that a SerializedObject annotation or serialized-object element has been processed for this descriptor.booleanpkClassWasNotValidated()INTERNAL:voidprocessMappingAccessors()INTERNAL: Process this descriptors mapping accessors.voidremovePrimaryKeyField(org.eclipse.persistence.internal.helper.DatabaseField field)INTERNAL: Remove the following field from the primary key field lists.voidsetAccessTypeOnClassDescriptor(java.lang.String accessType)INTERNAL: Record whether this descriptor uses property access.voidsetAlias(java.lang.String alias)INTERNAL:voidsetCacheable(java.lang.Boolean cacheable)INTERNAL: Set entity @Cacheable annotation value.voidsetCacheableInDescriptor()INTERNAL: Pass entity @Cacheable annotation value to cache configuration object in class descriptor.voidsetClassAccessor(ClassAccessor accessor)INTERNAL:voidsetDefaultAccess(java.lang.String defaultAccess)INTERNAL:voidsetDefaultAccessMethods(AccessMethodsMetadata accessMethods)INTERNAL: Default access methods can come from the following locations (in XML only) : - persistence-unit-defaults - entity-mappings - entity - embeddable Be default, the default access methods are set to use "get" and "set" unless they are overridden by discovering access methods specified at one of the locations above.voidsetDefaultCatalog(java.lang.String defaultCatalog)INTERNAL:voidsetDefaultSchema(java.lang.String defaultSchema)INTERNAL:voidsetDefaultTenantDiscriminatorColumns(java.util.List<TenantDiscriminatorColumnMetadata> defaultTenantDiscriminatorColumns)INTERNAL:voidsetDescriptor(org.eclipse.persistence.descriptors.ClassDescriptor descriptor)INTERNAL: Set the RelationalDescriptor instance associated with this MetadataDescriptorvoidsetEmbeddedIdAccessor(EmbeddedIdAccessor embeddedIdAccessor)INTERNAL:voidsetEntityEventListener(EntityListener listener)INTERNAL:voidsetExcludeDefaultListeners(boolean excludeDefaultListeners)INTERNAL:voidsetExcludeSuperclassListeners(boolean excludeSuperclassListeners)INTERNAL:voidsetExistenceChecking(java.lang.String existenceChecking)INTERNAL:voidsetHasCache()INTERNAL: Indicates that we have processed a cache annotation or cache xml element.voidsetHasCacheInterceptor()INTERNAL: Indicates that we have processed a cache annotation or cache xml element.voidsetHasChangeTracking()INTERNAL: Indicates that we have processed a change tracking annotation or change tracking xml element.voidsetHasCopyPolicy()INTERNAL: Indicates that we have processed a copy policy annotation or copy policy xml element.voidsetHasCustomizer()INTERNAL: Indicates that we have processed a customizer annotation or customizer xml element.voidsetHasDefaultRedirectors()INTERNAL: Indicates that we have processed a cache annotation or cache xml element.voidsetHasPrimaryKey()INTERNAL: Indicates that we have processed a PrimaryKey annotation or primary-key xml element.voidsetHasSerializedObjectPolicy()INTERNAL: Indicates that we have processed a serialized object annotation or serialized object xml element.voidsetInheritanceParentDescriptor(MetadataDescriptor inheritanceParentDescriptor)INTERNAL: Set the immediate parent's descriptor of the inheritance hierarchy.voidsetInheritanceRootDescriptor(MetadataDescriptor inheritanceRootDescriptor)INTERNAL: Set the root descriptor of the inheritance hierarchy, that is, the one that defines the inheritance strategy.voidsetIsCascadePersist(boolean isCascadePersist)INTERNAL: Indicates that cascade-persist should be added to the set of cascade values for all relationship mappings.voidsetIsEmbeddable()INTERNAL:voidsetJavaClass(MetadataClass javaClass)INTERNAL: Used to set this descriptors java class.voidsetMetamodelMappedSuperclassChildDescriptor(MetadataDescriptor childDescriptor)INTERNAL:voidsetOptimisticLockingPolicy(org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy policy)INTERNAL:voidsetPKClass(MetadataClass pkClass)INTERNAL:voidsetPrimaryTable(org.eclipse.persistence.internal.helper.DatabaseTable primaryTable)INTERNAL:voidsetReadOnly(boolean readOnly)INTERNAL:voidsetSequenceNumberField(org.eclipse.persistence.internal.helper.DatabaseField field)INTERNAL:voidsetSequenceNumberName(java.lang.String name)INTERNAL:voidsetUsesCascadedOptimisticLocking(java.lang.Boolean usesCascadedOptimisticLocking)INTERNAL:java.lang.StringtoString()INTERNAL:voiduseNoCache()INTERNAL:booleanusesCascadedOptimisticLocking()INTERNAL:booleanusesDefaultPropertyAccess()INTERNAL: Returns true if this class uses default property access.booleanusesOptimisticLocking()INTERNAL:booleanusesSingleTableInheritanceStrategy()INTERNAL: Indicates if the strategy on the descriptor's inheritance policy is SINGLE_TABLE.booleanusesTablePerClassInheritanceStrategy()INTERNAL: Return true if this descriptor uses a table per class inheritance policy.booleanusesVersionColumnOptimisticLocking()INTERNAL: Return true if this descriptors class processed OptimisticLocking meta data of type VERSION_COLUMN.voidvalidateDerivedPKClassId(java.lang.String attributeName, java.lang.String expectedType, java.lang.String referenceClassName)INTERNAL: This method is used to validate derived id fields only.voidvalidatePKClassId(java.lang.String attributeName, java.lang.String actualType)INTERNAL: This method is used only to validate id fields that were found on a pk class were also found on the entity.
-
-
-
Constructor Detail
-
MetadataDescriptor
public MetadataDescriptor(MetadataClass javaClass)
INTERNAL:
-
MetadataDescriptor
public MetadataDescriptor(MetadataClass javaClass, ClassAccessor classAccessor)
INTERNAL:
-
-
Method Detail
-
addAssociationOverride
public void addAssociationOverride(AssociationOverrideMetadata associationOverride)
INTERNAL:
-
addAttributeOverride
public void addAttributeOverride(AttributeOverrideMetadata attributeOverride)
INTERNAL:
-
addConvert
public void addConvert(java.lang.String attributeName, ConvertMetadata convert)INTERNAL: Add a convert to override a superclass class mapping.
-
addDefaultEventListener
public void addDefaultEventListener(org.eclipse.persistence.descriptors.DescriptorEventListener listener)
INTERNAL:
-
addEmbeddableDescriptor
public void addEmbeddableDescriptor(MetadataDescriptor embeddableDescriptor)
INTERNAL:
-
addEntityListenerEventListener
public void addEntityListenerEventListener(org.eclipse.persistence.descriptors.DescriptorEventListener listener)
INTERNAL:
-
addField
public void addField(org.eclipse.persistence.internal.helper.DatabaseField field)
INTERNAL: Add a field from a basic mapping from this descriptor.
-
addFieldForInsert
public void addFieldForInsert(org.eclipse.persistence.internal.helper.DatabaseField field)
INTERNAL:
-
addFieldForInsertReturnOnly
public void addFieldForInsertReturnOnly(org.eclipse.persistence.internal.helper.DatabaseField field)
INTERNAL:
-
addFieldForUpdate
public void addFieldForUpdate(org.eclipse.persistence.internal.helper.DatabaseField field)
INTERNAL:
-
addForeignKeyFieldForMultipleTable
public void addForeignKeyFieldForMultipleTable(org.eclipse.persistence.internal.helper.DatabaseField fkField, org.eclipse.persistence.internal.helper.DatabaseField pkField)INTERNAL:
-
addGenericType
public void addGenericType(java.lang.String genericName, java.lang.String type)INTERNAL: Add a generic type for this descriptor.
-
addIdAttributeName
public void addIdAttributeName(java.lang.String idAttributeName)
INTERNAL:
-
addMapKeyConvert
public void addMapKeyConvert(java.lang.String attributeName, ConvertMetadata convert)INTERNAL: Add a map key convert to override a superclass class mapping.
-
addMappingAccessor
public void addMappingAccessor(MappingAccessor accessor)
INTERNAL: If the accessor is an IdAccessor we store it in a separate map for use during MappedSuperclass processing.
-
addPKClassId
public void addPKClassId(java.lang.String attributeName, java.lang.String type)INTERNAL: We store these to validate the primary class when processing the entity class. Note: the pk id types are always stored as their boxed type (if applicable). Validation should therefore always be done against boxed types.
-
addProperty
public void addProperty(PropertyMetadata property)
INTERNAL: Add a property to the descriptor. Will check for an override/ignore case.
-
addPrimaryKeyField
public void addPrimaryKeyField(org.eclipse.persistence.internal.helper.DatabaseField field)
INTERNAL: Add a field representing the primary key or part of a composite primary key to the List of primary key fields on the relational descriptor associated with this metadata descriptor. Call this method if there is no associated mapping accessor, e.g. a PrimaryKey annotation specification or a derived id mapping. Otherwise, regular JPA id mappings should call addPrimaryKeyField(DatabaseField, MappingAccessor)
-
addPrimaryKeyField
public void addPrimaryKeyField(org.eclipse.persistence.internal.helper.DatabaseField field, MappingAccessor accessor)INTERNAL: Add a field representing the primary key or part of a composite primary key to the List of primary key fields on the relational descriptor associated with this metadata descriptor.
-
addRelationshipAccessor
public void addRelationshipAccessor(RelationshipAccessor accessor)
INTERNAL: Store relationship accessors for later processing and quick look up.
-
addTable
public void addTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
INTERNAL:
-
clearMappingAccessors
public void clearMappingAccessors()
INTERNAL: This method is called only for canonical model generation during the pre-processing stage. Canonical model generation needs to rebuild its accessor list from one compile round to another within Eclipse. This should not be called otherwise. Anything that is set in the addAccessor(MappingAccessor) method should be cleared here.
-
excludeSuperclassListeners
public boolean excludeSuperclassListeners()
INTERNAL:
-
getAlias
public java.lang.String getAlias()
INTERNAL:
-
getAssociationOverrideFor
public AssociationOverrideMetadata getAssociationOverrideFor(java.lang.String attributeName)
INTERNAL:
-
getAssociationOverrides
public java.util.Collection<AssociationOverrideMetadata> getAssociationOverrides()
INTERNAL:
-
getAttributeOverrideFor
public AttributeOverrideMetadata getAttributeOverrideFor(java.lang.String attributeName)
INTERNAL:
-
getAttributeOverrides
public java.util.Collection<AttributeOverrideMetadata> getAttributeOverrides()
INTERNAL:
-
getClassAccessor
public ClassAccessor getClassAccessor()
INTERNAL:
-
getClassDescriptor
public org.eclipse.persistence.descriptors.ClassDescriptor getClassDescriptor()
INTERNAL: Return the RelationalDescriptor instance associated with this MetadataDescriptor
-
getCMPPolicy
public org.eclipse.persistence.descriptors.CMPPolicy getCMPPolicy()
INTERNAL:
-
getConverts
public java.util.List<ConvertMetadata> getConverts(java.lang.String attributeName)
INTERNAL:
-
getDefaultAccess
public java.lang.String getDefaultAccess()
INTERNAL:
-
getDefaultAccessMethods
public AccessMethodsMetadata getDefaultAccessMethods()
INTERNAL:
-
getDefaultCatalog
public java.lang.String getDefaultCatalog()
INTERNAL:
-
getDefaultSchema
public java.lang.String getDefaultSchema()
INTERNAL:
-
getDefaultTenantDiscriminatorColumns
public java.util.List<TenantDiscriminatorColumnMetadata> getDefaultTenantDiscriminatorColumns()
INTERNAL:
-
getDefaultTableName
public java.lang.String getDefaultTableName()
INTERNAL: The default table name is the descriptor alias, unless this descriptor metadata is an inheritance subclass with a SINGLE_TABLE strategy. Then it is the table name of the root descriptor metadata.
-
getDerivedIdAccessors
public java.util.List<ObjectAccessor> getDerivedIdAccessors()
INTERNAL:
-
getEmbeddedIdAccessor
public EmbeddedIdAccessor getEmbeddedIdAccessor()
INTERNAL: Return the embedded id accessor for this descriptor if one exists.
-
getEmbeddedIdAttributeName
public java.lang.String getEmbeddedIdAttributeName()
INTERNAL:
-
getEntityAccessor
public EntityAccessor getEntityAccessor()
INTERNAL: This method assumes that by calling this method you are certain that the related class accessor to this descriptor is an EntityAccessor. You should not call this method otherwise, @see getClassAccessor()
-
getField
public org.eclipse.persistence.internal.helper.DatabaseField getField(java.lang.String fieldName)
INTERNAL: Return the DatabaseField from the given field name from this descriptor. It also checks primary key fields and parent descriptors.
-
getGenericType
public java.lang.String getGenericType(java.lang.String genericName)
INTERNAL: Return the type from the generic name.
-
getGenericTypes
public java.util.Map getGenericTypes()
INTERNAL:
-
getIdAccessors
public java.util.Map<java.lang.String,IdAccessor> getIdAccessors()
INTERNAL:
-
getIdAttributeName
public java.lang.String getIdAttributeName()
INTERNAL: Return the primary key attribute name for this entity.
-
getIdAttributeNames
public java.util.List<java.lang.String> getIdAttributeNames()
INTERNAL: Return the id attribute names declared on this descriptor metadata.
-
getIdOrderByAttributeNames
public java.util.List<java.lang.String> getIdOrderByAttributeNames()
INTERNAL: Return the primary key attribute names for this entity. If there are no id attribute names set then we are either: 1) an inheritance subclass, get the id attribute names from the root of the inheritance structure. 2) we have an embedded id. Get the id attribute names from the embedded descriptor metadata, which is equal the attribute names of all the direct to field mappings on that descriptor metadata. Currently does not traverse nested embeddables.
-
getBiDirectionalManyToManyAccessor
public MetadataAccessor getBiDirectionalManyToManyAccessor(java.lang.String className, java.lang.String attributeName)
INTERNAL: Assumes hasBidirectionalManyToManyAccessorFor has been called before hand.
-
getInheritanceParentDescriptor
public MetadataDescriptor getInheritanceParentDescriptor()
INTERNAL: Returns the immediate parent's descriptor in the inheritance hierarchy.
-
getInheritanceRootDescriptor
public MetadataDescriptor getInheritanceRootDescriptor()
INTERNAL: Returns the root descriptor of the inheritance hierarchy, that is, the one that defines the inheritance strategy.
-
getJavaClass
public MetadataClass getJavaClass()
INTERNAL:
-
getJavaClassName
public java.lang.String getJavaClassName()
INTERNAL:
-
getLogger
public MetadataLogger getLogger()
INTERNAL:
-
getMapKeyConverts
public java.util.List<ConvertMetadata> getMapKeyConverts(java.lang.String attributeName)
INTERNAL:
-
getMappingAccessor
public MappingAccessor getMappingAccessor(java.lang.String fieldOrPropertyName)
INTERNAL: This method will first check for an accessor with name equal to field or property name. If no accessor is found than it assumes the field or property name passed in may be a method name and converts it to its corresponding property name and looks for the accessor again. If still no accessor is found and this descriptor represents an inheritance subclass, then traverse up the chain to look for that accessor. Null is returned otherwise.
-
getMappingAccessor
protected MappingAccessor getMappingAccessor(java.lang.String fieldOrPropertyName, boolean checkForMethodName)
INTERNAL: This method will first check for an accessor with name equal to field or property name. If no accessor is found and the checkForMethodName flag is set to true then we'll attempt to convert a potential method name to its corresponding property name and looks for the accessor again. If still no accessor is found and this descriptor represents an inheritance subclass, then traverse up the chain to look for that accessor. Null is returned otherwise.
-
getMappingAccessors
public java.util.Collection<MappingAccessor> getMappingAccessors()
INTERNAL: Return the collection of mapping accessors for this descriptor.
-
getMappingForAttributeName
public org.eclipse.persistence.mappings.DatabaseMapping getMappingForAttributeName(java.lang.String attributeName)
INTERNAL:
-
getMappings
public java.util.List<org.eclipse.persistence.mappings.DatabaseMapping> getMappings()
INTERNAL:
-
getMetamodelMappedSuperclassChildDescriptor
public MetadataDescriptor getMetamodelMappedSuperclassChildDescriptor()
INTERNAL:
-
getOrderByAttributeNames
public java.util.List<java.lang.String> getOrderByAttributeNames()
INTERNAL: This will return the attribute names for all the direct to field mappings on this descriptor metadata. This method will typically be called when an embedded or embedded id attribute has been specified as an order by field
-
getPKClass
public MetadataClass getPKClass()
INTERNAL:
-
getPKClassIDs
public java.util.Map<java.lang.String,java.lang.String> getPKClassIDs()
INTERNAL:
-
getPKClassName
public java.lang.String getPKClassName()
INTERNAL:
-
getPrimaryKeyAccessorForField
public MappingAccessor getPrimaryKeyAccessorForField(org.eclipse.persistence.internal.helper.DatabaseField field)
INTERNAL: Return the primary key mapping for the given field.
-
getPrimaryKeyField
public org.eclipse.persistence.internal.helper.DatabaseField getPrimaryKeyField()
INTERNAL: Method to return the primary key field name this descriptor metadata. It assumes there is one.
-
getPrimaryKeyFieldName
public java.lang.String getPrimaryKeyFieldName()
INTERNAL: Method to return the primary key field name for this descriptor metadata. It assumes there is one.
-
getPrimaryKeyFields
public java.util.List<org.eclipse.persistence.internal.helper.DatabaseField> getPrimaryKeyFields()
INTERNAL Return the primary key fields for this descriptor metadata. If this is an inheritance subclass and it has no primary key fields, then grab the primary key fields from the root. In a table per class inheritance strategy, the primary key fields (and all mappings for that matter) are inherited from the parent meaning there is no need to check the parent in this case, it should have primary key fields and checking the parent could lead to processing errors.
-
getPrimaryKeyJoinColumnAssociation
public org.eclipse.persistence.internal.helper.DatabaseField getPrimaryKeyJoinColumnAssociation(org.eclipse.persistence.internal.helper.DatabaseField foreignKey)
INTERNAL: Recursively check the potential chaining of the primary key fields from a inheritance subclass, all the way to the root of the inheritance hierarchy.
-
getPrimaryKeyJoinColumnAssociationField
public org.eclipse.persistence.internal.helper.DatabaseField getPrimaryKeyJoinColumnAssociationField(org.eclipse.persistence.internal.helper.DatabaseField primaryKeyField)
INTERNAL: Returns the first primary key join column association if there is one. Otherwise, the primary key field given is returned.
-
getPrimaryKeyTable
public org.eclipse.persistence.internal.helper.DatabaseTable getPrimaryKeyTable()
INTERNAL: Assumes there is one primary key field set. This method should be called when qualifying any primary key field (from a join column) for this descriptor. This method was created because in an inheritance hierarchy with a joined strategy we can't use getPrimaryTableName() since it would return the wrong table name. From the spec, the primary key must be defined on the entity that is the root of the entity hierarchy or on a mapped superclass of the entity hierarchy. The primary key must be defined exactly once in an entity hierarchy.
-
getPrimaryTable
public org.eclipse.persistence.internal.helper.DatabaseTable getPrimaryTable()
INTERNAL:
-
getPrimaryTableName
public java.lang.String getPrimaryTableName()
INTERNAL:
-
getProject
public MetadataProject getProject()
INTERNAL:
-
getReturningPolicy
protected org.eclipse.persistence.descriptors.ReturningPolicy getReturningPolicy()
INTERNAL:
-
getSequenceNumberField
public org.eclipse.persistence.internal.helper.DatabaseField getSequenceNumberField()
INTERNAL:
-
getSingleTableMultitenantFields
public java.util.Map<java.lang.String,java.util.List<org.eclipse.persistence.internal.helper.DatabaseField>> getSingleTableMultitenantFields()
INTERNAL: Assumes a call to hasSingleTableMultitenant has been made before hand.
-
hasAdditionalCriteria
public boolean hasAdditionalCriteria()
INTERNAL: Returns true is an additional criteria has been set on this descriptor's query manager.
-
hasAssociationOverrideFor
public boolean hasAssociationOverrideFor(java.lang.String attributeName)
INTERNAL:
-
hasAttributeOverrideFor
public boolean hasAttributeOverrideFor(java.lang.String attributeName)
INTERNAL:
-
hasCompositePrimaryKey
public boolean hasCompositePrimaryKey()
INTERNAL:
-
hasEmbeddedId
public boolean hasEmbeddedId()
INTERNAL:
-
hasExistenceChecking
public boolean hasExistenceChecking()
INTERNAL:
-
hasBiDirectionalManyToManyAccessorFor
public boolean hasBiDirectionalManyToManyAccessorFor(java.lang.String className, java.lang.String attributeName)INTERNAL:
-
hasCache
public boolean hasCache()
INTERNAL: Indicates that a Cache annotation or cache element has already been processed for this descriptor.
-
hasCacheable
public boolean hasCacheable()
INTERNAL: Indicates that a Cacheable annotation or cache element has already been processed for this descriptor.
-
hasCacheInterceptor
public boolean hasCacheInterceptor()
INTERNAL: Indicates that a CacheInterceptor annotation or cacheInterceptor element has already been processed for this descriptor.
-
hasDefaultRedirectors
public boolean hasDefaultRedirectors()
INTERNAL: Indicates that a DefaultRedirectors annotation or default-redirectors element has already been processed for this descriptor.
-
hasChangeTracking
public boolean hasChangeTracking()
INTERNAL: Indicates that a Change tracking annotation or change tracking element has already been processed for this descriptor.
-
hasCopyPolicy
public boolean hasCopyPolicy()
INTERNAL: Indicates that a copy Policy annotation or copy policy element has already been processed for this descriptor.
-
hasConverts
public boolean hasConverts(java.lang.String attributeName)
INTERNAL: Return true if there is convert metadata for the given attribute name.
-
hasCustomizer
public boolean hasCustomizer()
INTERNAL: Indicates that a customizer annotation or customizer element has already been processed for this descriptor.
-
hasIdAccessor
public boolean hasIdAccessor()
INTERNAL: Return whether there is an IdAccessor on this descriptor.
-
hasMapKeyConverts
public boolean hasMapKeyConverts(java.lang.String attributeName)
INTERNAL: Return true if there is map key convert metadata for the given attribute name.
-
hasMappingAccessor
public boolean hasMappingAccessor(java.lang.String attributeName)
INTERNAL: Returns true if we already have (processed) an accessor for the given attribute name.
-
hasMappingForAttributeName
public boolean hasMappingForAttributeName(java.lang.String attributeName)
INTERNAL:
-
hasMultitenant
public boolean hasMultitenant()
INTERNAL: Indicates if multitenant metadata has been processed for this descriptor.
-
hasPKClass
public boolean hasPKClass()
INTERNAL:
-
hasPrimaryKey
public boolean hasPrimaryKey()
INTERNAL: Indicates that a PrimaryKey annotation or primary-key element has been processed for this descriptor.
-
hasPrimaryKeyFields
public boolean hasPrimaryKeyFields()
INTERNAL: Return true is the descriptor has primary key fields set.
-
hasReadOnly
public boolean hasReadOnly()
INTERNAL: Indicates that a read only annotation or read only element has already been processed for this descriptor.
-
hasSingleTableMultitenant
public boolean hasSingleTableMultitenant()
INTERNAL: Indicates if single table multitenant metadata has been processed for this descriptor.
-
m_hasSerializedObjectPolicy
public boolean m_hasSerializedObjectPolicy()
INTERNAL: Indicates that a SerializedObject annotation or serialized-object element has been processed for this descriptor.
-
isCacheableTrue
public boolean isCacheableTrue()
INTERNAL: Indicates that an explicit cacheable value of true has been set for this descriptor.
-
isCacheableFalse
public boolean isCacheableFalse()
INTERNAL: Indicates that an explicit cacheable value of false has been set for this descriptor.
-
isCascadePersist
public boolean isCascadePersist()
INTERNAL: Indicates that cascade-persist should be applied to all relationship mappings for this entity.
-
isEmbeddable
public boolean isEmbeddable()
INTERNAL:
-
isEmbeddableCollection
public boolean isEmbeddableCollection()
INTERNAL:
-
isInheritanceSubclass
public boolean isInheritanceSubclass()
INTERNAL:
-
isMappedSuperclass
public boolean isMappedSuperclass()
INTERNAL: Return whether the ClassAccessor on this MetadataDescriptor is a MappedSuperclassAccessor.- Since:
- EclipseLink 1.2 for the JPA 2.0 Reference Implementation
-
pkClassWasNotValidated
public boolean pkClassWasNotValidated()
INTERNAL:
-
processMappingAccessors
public void processMappingAccessors()
INTERNAL: Process this descriptors mapping accessors. Some accessors will not be processed right away, instead stored on the project for processing in a later stage. This method can not and must not be called beyond MetadataProject stage 2 processing.
-
removePrimaryKeyField
public void removePrimaryKeyField(org.eclipse.persistence.internal.helper.DatabaseField field)
INTERNAL: Remove the following field from the primary key field lists. Presumably, it is not a primary key field or is being replaced with another. See EmbeddedAccessor processAttributeOverride method.
-
setAccessTypeOnClassDescriptor
public void setAccessTypeOnClassDescriptor(java.lang.String accessType)
INTERNAL: Record whether this descriptor uses property access. This information is used to modify the behavior of some of our weaving features
-
setAlias
public void setAlias(java.lang.String alias)
INTERNAL:
-
getCacheable
public java.lang.Boolean getCacheable()
INTERNAL: Get entity @Cacheable annotation value.- Returns:
- Entity @Cacheable annotation value. This value refers to current class only and does not contain inherited value from parent classes.
-
setCacheable
public void setCacheable(java.lang.Boolean cacheable)
INTERNAL: Set entity @Cacheable annotation value.- Parameters:
cacheable- Entity @Cacheable annotation value. This value refers to current class only and does not contain inherited value from parent classes.
-
setCacheableInDescriptor
public void setCacheableInDescriptor()
INTERNAL: Pass entity @Cacheable annotation value to cache configuration object in class descriptor.
-
setClassAccessor
public void setClassAccessor(ClassAccessor accessor)
INTERNAL:
-
setDefaultAccess
public void setDefaultAccess(java.lang.String defaultAccess)
INTERNAL:
-
setDefaultAccessMethods
public void setDefaultAccessMethods(AccessMethodsMetadata accessMethods)
INTERNAL: Default access methods can come from the following locations (in XML only) : - persistence-unit-defaults - entity-mappings - entity - embeddable Be default, the default access methods are set to use "get" and "set" unless they are overridden by discovering access methods specified at one of the locations above.
-
setDefaultCatalog
public void setDefaultCatalog(java.lang.String defaultCatalog)
INTERNAL:
-
setDefaultSchema
public void setDefaultSchema(java.lang.String defaultSchema)
INTERNAL:
-
setDefaultTenantDiscriminatorColumns
public void setDefaultTenantDiscriminatorColumns(java.util.List<TenantDiscriminatorColumnMetadata> defaultTenantDiscriminatorColumns)
INTERNAL:
-
setDescriptor
public void setDescriptor(org.eclipse.persistence.descriptors.ClassDescriptor descriptor)
INTERNAL: Set the RelationalDescriptor instance associated with this MetadataDescriptor
-
setEmbeddedIdAccessor
public void setEmbeddedIdAccessor(EmbeddedIdAccessor embeddedIdAccessor)
INTERNAL:
-
setEntityEventListener
public void setEntityEventListener(EntityListener listener)
INTERNAL:
-
setExcludeDefaultListeners
public void setExcludeDefaultListeners(boolean excludeDefaultListeners)
INTERNAL:
-
setExcludeSuperclassListeners
public void setExcludeSuperclassListeners(boolean excludeSuperclassListeners)
INTERNAL:
-
setExistenceChecking
public void setExistenceChecking(java.lang.String existenceChecking)
INTERNAL:
-
setHasCache
public void setHasCache()
INTERNAL: Indicates that we have processed a cache annotation or cache xml element.
-
setHasCacheInterceptor
public void setHasCacheInterceptor()
INTERNAL: Indicates that we have processed a cache annotation or cache xml element.
-
setHasCustomizer
public void setHasCustomizer()
INTERNAL: Indicates that we have processed a customizer annotation or customizer xml element.
-
setHasDefaultRedirectors
public void setHasDefaultRedirectors()
INTERNAL: Indicates that we have processed a cache annotation or cache xml element.
-
setHasPrimaryKey
public void setHasPrimaryKey()
INTERNAL: Indicates that we have processed a PrimaryKey annotation or primary-key xml element.
-
setHasChangeTracking
public void setHasChangeTracking()
INTERNAL: Indicates that we have processed a change tracking annotation or change tracking xml element.
-
setHasCopyPolicy
public void setHasCopyPolicy()
INTERNAL: Indicates that we have processed a copy policy annotation or copy policy xml element.
-
setHasSerializedObjectPolicy
public void setHasSerializedObjectPolicy()
INTERNAL: Indicates that we have processed a serialized object annotation or serialized object xml element.
-
setInheritanceParentDescriptor
public void setInheritanceParentDescriptor(MetadataDescriptor inheritanceParentDescriptor)
INTERNAL: Set the immediate parent's descriptor of the inheritance hierarchy.
-
setInheritanceRootDescriptor
public void setInheritanceRootDescriptor(MetadataDescriptor inheritanceRootDescriptor)
INTERNAL: Set the root descriptor of the inheritance hierarchy, that is, the one that defines the inheritance strategy.
-
setIsCascadePersist
public void setIsCascadePersist(boolean isCascadePersist)
INTERNAL: Indicates that cascade-persist should be added to the set of cascade values for all relationship mappings.
-
setIsEmbeddable
public void setIsEmbeddable()
INTERNAL:
-
setJavaClass
public void setJavaClass(MetadataClass javaClass)
INTERNAL: Used to set this descriptors java class.
-
setMetamodelMappedSuperclassChildDescriptor
public void setMetamodelMappedSuperclassChildDescriptor(MetadataDescriptor childDescriptor)
INTERNAL:
-
setOptimisticLockingPolicy
public void setOptimisticLockingPolicy(org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy policy)
INTERNAL:
-
setPKClass
public void setPKClass(MetadataClass pkClass)
INTERNAL:
-
setPrimaryTable
public void setPrimaryTable(org.eclipse.persistence.internal.helper.DatabaseTable primaryTable)
INTERNAL:
-
setReadOnly
public void setReadOnly(boolean readOnly)
INTERNAL:
-
setSequenceNumberField
public void setSequenceNumberField(org.eclipse.persistence.internal.helper.DatabaseField field)
INTERNAL:
-
setSequenceNumberName
public void setSequenceNumberName(java.lang.String name)
INTERNAL:
-
setUsesCascadedOptimisticLocking
public void setUsesCascadedOptimisticLocking(java.lang.Boolean usesCascadedOptimisticLocking)
INTERNAL:
-
toString
public java.lang.String toString()
INTERNAL:- Overrides:
toStringin classjava.lang.Object
-
useNoCache
public void useNoCache()
INTERNAL:
-
usesCascadedOptimisticLocking
public boolean usesCascadedOptimisticLocking()
INTERNAL:
-
usesDefaultPropertyAccess
public boolean usesDefaultPropertyAccess()
INTERNAL: Returns true if this class uses default property access. All access discovery and processing should have been performed before calling this method and a default access type should have been set.
-
usesOptimisticLocking
public boolean usesOptimisticLocking()
INTERNAL:
-
usesSingleTableInheritanceStrategy
public boolean usesSingleTableInheritanceStrategy()
INTERNAL: Indicates if the strategy on the descriptor's inheritance policy is SINGLE_TABLE. This method must only be called on those descriptors holding an EntityAccessor. NOTE: Inheritance is currently not supported on embeddables.
-
usesTablePerClassInheritanceStrategy
public boolean usesTablePerClassInheritanceStrategy()
INTERNAL: Return true if this descriptor uses a table per class inheritance policy.
-
usesVersionColumnOptimisticLocking
public boolean usesVersionColumnOptimisticLocking()
INTERNAL: Return true if this descriptors class processed OptimisticLocking meta data of type VERSION_COLUMN.
-
validateDerivedPKClassId
public void validateDerivedPKClassId(java.lang.String attributeName, java.lang.String expectedType, java.lang.String referenceClassName)INTERNAL: This method is used to validate derived id fields only. Re-using the invalid composite pk attribute validation exception would yield an interesting error message. Therefore, this method should be used to validate derived id members. When validating derived ids things are slightly reversed in terms on context. The expectedType passed in should be the boxed type (were applicable).
-
validatePKClassId
public void validatePKClassId(java.lang.String attributeName, java.lang.String actualType)INTERNAL: This method is used only to validate id fields that were found on a pk class were also found on the entity. The actualType passed in should be the boxed type (were applicable).
-
-