Top Description Fields Constructors Methods
org.eclipse.persistence.descriptors

public Class RelationalDescriptor

extends ClassDescriptor
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.mappings.structures.ObjectRelationalDataTypeDescriptor
Imports
java.util.*, org.eclipse.persistence.exceptions.*

Purpose: EclipseLink has been designed to take advantage of the similarities between relational databases and objects while accommodating for their differences, providing an object oriented wrapper for relational databases. This is accomplished through the use of Descriptors. A descriptor is a pure specification class with all its behavior deputized to DescriptorEventManager, DescriptorQueryManager and ObjectBuilder. Look at the following variables for the list of specification on the descriptor.

A Descriptor is a set of mappings that describe how an objects's data is to be represented in a relational database. It contains mappings from the class instance variables to the table's fields, as well as the transformation routines necessary for storing and retrieving attributes. As such the descriptor acts as the link between the Java object and its database representation.

Every descriptor is initialized with the following information:

This descriptor subclass should be used for object-relational mapping, and allows for other datatype mappings to be done in the XML, EIS and OR sibling classes.

See Also
DescriptorEventManager, DescriptorQueryManager, InheritancePolicy, InterfacePolicy

Field Summary

Inherited from org.eclipse.persistence.descriptors.ClassDescriptor:
accessorTreeadditionalAggregateCollectionKeyFieldsadditionalTablePrimaryKeyFieldsadditionalWritableMapKeyFieldsAGGREGATEAGGREGATE_COLLECTIONaliasallFieldsallSelectionFieldsamendmentClassamendmentClassNameamendmentMethodNamecacheInvalidationPolicycachePolicycascadedLockingInitializedcascadeLockingPolicieschangePolicycmpPolicyconstraintDependenciescopyPolicycopyPolicyClassNamedefaultDeleteObjectQueryRedirectordefaultDeleteObjectQueryRedirectorClassNamedefaultInsertObjectQueryRedirectordefaultInsertObjectQueryRedirectorClassNamedefaultQueryRedirectordefaultQueryRedirectorClassNamedefaultReadAllQueryRedirectordefaultReadAllQueryRedirectorClassNamedefaultReadObjectQueryRedirectordefaultReadObjectQueryRedirectorClassNamedefaultReportQueryRedirectordefaultReportQueryRedirectorClassNamedefaultTabledefaultUpdateObjectQueryRedirectordefaultUpdateObjectQueryRedirectorClassNamederivesIdMappingsdescriptorCustomizerClassNamedescriptorTypeDO_NOT_SEND_CHANGESERRORfetchGroupManagerfieldsforeignKeyValuesForCachinghasMultipleTableConstraintDependecyhasNoncacheableMappingshasRelationshipshasSimplePrimaryKeyhistoryPolicyidValidationinitializationStageINITIALIZEDINTERFACEinterfaceInitializationStageinterfacePolicyINVALIDATE_CHANGED_OBJECTSisCascadeOnDeleteSetOnDatabaseOnSecondaryTablesisNativeConnectionRequiredISOLATE_CACHE_AFTER_TRANSACTIONISOLATE_CACHE_ALWAYSISOLATE_FROM_CLIENT_SESSIONISOLATE_NEW_DATA_AFTER_TRANSACTIONjavaClassjavaClassNamelockableMappingsmappingsmappingsPostCalculateChangesmappingsPostCalculateChangesOnDeletedmultipleTableForeignKeysmultipleTableInsertOrdermultitenantPolicyNORMALoptimisticLockingPolicypartitioningPolicypartitioningPolicyNamePOST_INITIALIZEDpreDeleteMappingsPREINITIALIZEDprimaryKeyFieldsprimaryKeyIdValidationspropertiesqueryKeysqueryManagerreferencingClassesreturnFieldsToGenerateInsertreturnFieldsToGenerateUpdatereturnFieldsToMergeInsertreturnFieldsToMergeUpdatereturningPoliciesreturningPolicyselectionFieldsSEND_NEW_OBJECTS_WITH_CHANGESSEND_OBJECT_CHANGESsequencesequenceNumberFieldsequenceNumberNameserializedObjectPolicysessionNameshouldAcquireCascadedLocksshouldAlwaysConformResultsInUnitOfWorkshouldBeReadOnlyshouldLockForCloneshouldOrderMappingsshouldRegisterResultsInUnitOfWorkshouldUseFullChangeSetsForNewObjectstablesunconvertedPropertiesUNDEFINED_ISOLATATIONUNDEFINED_OBJECT_CHANGE_BEHAVIORUNINITIALIZEDUSE_SESSION_CACHE_AFTER_TRANSACTIONvirtualAttributeMethodsweavingUsesPropertyAccesswrapperPolicy

Constructor Summary

AccessConstructor and Description
public
RelationalDescriptor()

PUBLIC: Return a new descriptor.

Method Summary

Modifier and TypeMethod and Description
public void
addTableName(String tableName)

Overrides org.eclipse.persistence.descriptors.ClassDescriptor.addTableName.

PUBLIC: Specify the table name for the class of objects the receiver describes.
public String
getTableName()

Overrides org.eclipse.persistence.descriptors.ClassDescriptor.getTableName.

PUBLIC: Return the name of the descriptor's first table.
public Vector<E>
public boolean
isRelationalDescriptor()

Overrides org.eclipse.persistence.descriptors.ClassDescriptor.isRelationalDescriptor.

PUBLIC: Return if the descriptor maps to a relational table.
public void
setDefaultTableName(String defaultTableName)

Overrides org.eclipse.persistence.descriptors.ClassDescriptor.setDefaultTableName.

PUBLIC: The descriptors default table can be configured if the first table is not desired.
public void
setTableName(String tableName)

Overrides org.eclipse.persistence.descriptors.ClassDescriptor.setTableName.

PUBLIC: Specify the table name for the class of objects the receiver describes.
public void
setTableNames(Vector<E> tableNames)

Overrides org.eclipse.persistence.descriptors.ClassDescriptor.setTableNames.

PUBLIC: Specify the all table names for the class of objects the receiver describes.
public void
setTableQualifier(String tableQualifier)

Overrides org.eclipse.persistence.descriptors.ClassDescriptor.setTableQualifier.

PUBLIC: Set the table Qualifier for this descriptor.
Inherited from org.eclipse.persistence.descriptors.ClassDescriptor:
addAbstractQueryKeyaddCascadeLockingPolicyaddConstraintDependenciesaddConstraintDependencyaddDirectMappingaddDirectMappingaddDirectQueryKeyaddForeignKeyFieldForMultipleTableaddForeignKeyFieldNameForMultipleTableaddMappingaddMappingsPostCalculateChangesaddMappingsPostCalculateChangesOnDeletedaddPreDeleteMappingaddPrimaryKeyFieldaddPrimaryKeyFieldNameaddQueryKeyaddTableaddUnconvertedPropertyadjustMultipleTableInsertOrderalwaysConformResultsInUnitOfWorkalwaysRefreshCachealwaysRefreshCacheOnRemoteapplyAmendmentMethodapplyAmendmentMethodarePrimaryKeyFieldsassignDefaultValuesbuildBatchCriteriaByPKbuildCallFromStatementbuildDirectValuesFromFieldValuebuildFieldbuildFieldbuildFieldbuildFieldValueFromDirectValuesbuildFieldValueFromForeignKeysbuildFieldValueFromNestedRowbuildFieldValueFromNestedRowsbuildNestedRowFromFieldValuebuildNestedRowsFromFieldValuecheckDatabasecheckInheritanceTreeAggregateSettingsclearReferencingClassescloneconvertClassNamesToClassescreateCopyPolicycreateInstantiationPolicycreateMultipleTableInsertOrdercreateMultipleTableInsertOrderFromComparisoncreateTableComparisoncreateTableOrderdescriptorIsAggregatedescriptorIsAggregateCollectiondescriptorIsForInterfacedescriptorIsNormaldisableCacheHitsdisableCacheHitsOnRemotedontAlwaysConformResultsInUnitOfWorkdontAlwaysRefreshCachedontAlwaysRefreshCacheOnRemotedontDisableCacheHitsdontDisableCacheHitsOnRemotedontOnlyRefreshCacheIfNewerVersionextractDefaultTablegetAccessorTreegetAdditionalAggregateCollectionKeyFieldsgetAdditionalTablePrimaryKeyFieldsgetAdditionalWritableMapKeyFieldsgetAliasgetAllFieldsgetAllSelectionFieldsgetAllSelectionFieldsgetAmendmentClassgetAmendmentClassNamegetAmendmentMethodNamegetAttributeGroupgetAttributeGroupsgetCacheInterceptorClassgetCacheInterceptorClassNamegetCacheInvalidationPolicygetCacheIsolationgetCacheKeyTypegetCachePolicygetCacheSynchronizationTypegetCascadeLockingPoliciesgetCMPPolicygetConstraintDependenciesgetCopyPolicygetCopyPolicyClassNamegetDefaultDeleteObjectQueryRedirectorgetDefaultFetchGroupgetDefaultInsertObjectQueryRedirectorgetDefaultQueryRedirectorgetDefaultReadAllQueryRedirectorgetDefaultReadObjectQueryRedirectorgetDefaultReportQueryRedirectorgetDefaultTablegetDefaultUpdateObjectQueryRedirectorgetDerivesIdMappinpsgetDescriptorCustomizerClassNamegetDescriptorEventManagergetDescriptorInheritancePolicygetDescriptorQueryManagergetDescriptorTypegetDescriptorTypeValuegetEventManagergetFetchGroupManagergetFieldsgetForeignKeyValuesForCachinggetFullyMergeEntitygetHistoryPolicygetIdentityMapClassgetIdentityMapSizegetIdValidationgetInheritancePolicygetInheritancePolicyOrNullgetInstantiationPolicygetInterfacePolicygetInterfacePolicyOrNullgetJavaClassgetJavaClassNamegetLockableMappingsgetMappingForAttributeNamegetMappingsgetMappingsPostCalculateChangesgetMappingsPostCalculateChangesOnDeletedgetMultipleTableForeignKeyAssociationsgetMultipleTableForeignKeysgetMultipleTableInsertOrdergetMultipleTablePrimaryKeyAssociationsgetMultitenantPolicygetObjectBuildergetObjectChangePolicygetObjectChangePolicyInternalgetOptimisticLockingPolicygetPartitioningPolicygetPartitioningPolicyNamegetPreDeleteMappingsgetPrimaryKeyFieldNamesgetPrimaryKeyFieldsgetPrimaryKeyIdValidationsgetPropertiesgetPropertygetQueryKeyNamedgetQueryKeysgetQueryManagergetRemoteIdentityMapClassgetRemoteIdentityMapSizegetReturnFieldsToGenerateInsertgetReturnFieldsToGenerateUpdategetReturnFieldsToMergeInsertgetReturnFieldsToMergeUpdategetReturningPoliciesgetReturningPolicygetRootDescriptorgetSelectionFieldsgetSelectionFieldsgetSequencegetSequenceNumberFieldgetSequenceNumberFieldNamegetSequenceNumberNamegetSerializedObjectPolicygetSessionNamegetTablegetTablePerClassPolicygetTablesgetTypedFieldgetUnconvertedPropertiesgetUnitOfWorkCacheIsolationLevelgetVirtualAttributeMethodsgetWrapperPolicyhasCascadeLockingPolicieshasCMPPolicyhasDependencyOnPartshasDerivedIdhasEventManagerhasFetchGroupManagerhasInheritancehasInterfacePolicyhasMappingsPostCalculateChangeshasMappingsPostCalculateChangesOnDeletedhasMultipleTableConstraintDependecyhasMultipleTableshasMultitenantPolicyhasNestedIdentityReferencehasNoncacheableMappingshasPessimisticLockingPolicyhasPreDeleteMappingshasPrivatelyOwnedPartshasQueryKeyOrMappinghasRelationshipshasRelationshipsExceptBackpointerhasReturningPolicieshasReturningPolicyhasSerializedObjectPolicyhasSimplePrimaryKeyhasTablePerClassPolicyhasTablePerMultitenantPolicyhasTargetForeignKeyMappinghasUnconvertedPropertieshasWrapperPolicyinitializeinitializeinitializeAggregateInheritancePolicyinitializeMultipleTablePrimaryKeyFieldsinitializePropertiesinterfaceInitializationisAbstractisAggregateCollectionDescriptorisAggregateDescriptorisCascadeOnDeleteSetOnDatabaseOnSecondaryTablesisChildDescriptorisDescriptorForInterfaceisDescriptorTypeAggregateisDescriptorTypeNormalisEISDescriptorisFullyInitializedisInitializedisInterfaceChildDescriptorisInterfaceInitializedisInvalidisIsolatedisMultipleTableDescriptorisNativeConnectionRequiredisObjectRelationalDataTypeDescriptorisPrimaryKeySetAfterInsertisProtectedIsolationisReturnTypeRequiredForReturningPolicyisSharedIsolationisXMLDescriptornewAggregateCollectionMappingnewAggregateMappingnewDirectCollectionMappingnewDirectMappingnewManyToManyMappingnewManyToOneMappingnewOneToManyMappingnewOneToOneMappingnewUnidirectionalOneToManyMappingnotifyReferencingDescriptorsOfIsolationonlyRefreshCacheIfNewerVersionpostInitializepreInitializepreInitializeInheritancePolicypreInterfaceInitializationprepareCascadeLockingPolicyrehashFieldDependanciesreInitializeJoinedAttributesremoteInitializationremoveMappingForAttributeNameremovePropertyrequiresInitializationselfValidationAfterInitializationselfValidationBeforeInitializationsetAccessorTreesetAdditionalTablePrimaryKeyFieldssetAdditionalTablePrimaryKeyFieldssetAliassetAllFieldssetAmendmentClasssetAmendmentClassNamesetAmendmentMethodNamesetCacheablesetCacheInterceptorClasssetCacheInterceptorClassNamesetCacheInvalidationPolicysetCacheIsolationsetCacheKeyTypesetCachePolicysetCacheSynchronizationTypesetCMPPolicysetConstraintDependenciessetCopyPolicysetCopyPolicyClassNamesetDefaultDeleteObjectQueryRedirectorsetDefaultDeleteObjectQueryRedirectorClassNamesetDefaultInsertObjectQueryRedirectorsetDefaultInsertObjectQueryRedirectorClassNamesetDefaultQueryRedirectorsetDefaultQueryRedirectorClassNamesetDefaultReadAllQueryRedirectorsetDefaultReadAllQueryRedirectorClassNamesetDefaultReadObjectQueryRedirectorsetDefaultReadObjectQueryRedirectorClassNamesetDefaultReportQueryRedirectorsetDefaultReportQueryRedirectorClassNamesetDefaultTablesetDefaultUpdateObjectQueryRedirectorsetDefaultUpdateObjectQueryRedirectorClassNamesetDescriptorCustomizerClassNamesetDescriptorTypesetDescriptorTypeValuesetEventManagersetExistenceCheckingsetFetchGroupManagersetFieldssetForeignKeyFieldNamesForMultipleTablesetFullyMergeEntitysetHasMultipleTableConstraintDependecysetHasRelationshipssetHasSimplePrimaryKeysetHistoryPolicysetIdentityMapClasssetIdentityMapSizesetIdValidationsetInheritancePolicysetInitializationStagesetInstantiationPolicysetInterfaceInitializationStagesetInterfacePolicysetInternalDefaultTablesetInternalDefaultTablesetIsCascadeOnDeleteSetOnDatabaseOnSecondaryTablessetIsNativeConnectionRequiredsetJavaClasssetJavaClassNamesetJavaInterfacesetJavaInterfaceNamesetLockableMappingssetMappingssetMultipleTableForeignKeyssetMultipleTableInsertOrdersetMultitenantPolicysetObjectBuildersetObjectChangePolicysetOptimisticLockingPolicysetPartitioningPolicysetPartitioningPolicyNamesetPrimaryKeyFieldNamesetPrimaryKeyFieldNamessetPrimaryKeyFieldssetPrimaryKeyIdValidationssetPropertiessetPropertysetQueryKeyssetQueryManagersetReadOnlysetRemoteIdentityMapClasssetRemoteIdentityMapSizesetReturningPolicysetSequencesetSequenceNumberFieldsetSequenceNumberFieldNamesetSequenceNumberNamesetSerializedObjectPolicysetSessionNamesetShouldAcquireCascadedLockssetShouldAlwaysConformResultsInUnitOfWorksetShouldAlwaysRefreshCachesetShouldAlwaysRefreshCacheOnRemotesetShouldBeReadOnlysetShouldDisableCacheHitssetShouldDisableCacheHitsOnRemotesetShouldLockForClonesetShouldOnlyRefreshCacheIfNewerVersionsetShouldOrderMappingssetShouldRegisterResultsInUnitOfWorksetTablePerClassPolicysetTablessetUnitOfWorkCacheIsolationLevelsetVirtualAttributeMethodssetWrapperPolicyshouldAcquireCascadedLocksshouldAlwaysConformResultsInUnitOfWorkshouldAlwaysRefreshCacheshouldAlwaysRefreshCacheOnRemoteshouldBeReadOnlyshouldDisableCacheHitsshouldDisableCacheHitsOnRemoteshouldIsolateObjectsInUnitOfWorkshouldIsolateObjectsInUnitOfWorkEarlyTransactionshouldIsolateProtectedObjectsInUnitOfWorkshouldLockForCloneshouldOnlyRefreshCacheIfNewerVersionshouldOrderMappingsshouldRegisterResultsInUnitOfWorkshouldUseAdditionalJoinExpressionshouldUseCacheIdentityMapshouldUseFullChangeSetsForNewObjectsshouldUseFullIdentityMapshouldUseHardCacheWeakIdentityMapshouldUseNoIdentityMapshouldUseRemoteCacheIdentityMapshouldUseRemoteFullIdentityMapshouldUseRemoteHardCacheWeakIdentityMapshouldUseRemoteNoIdentityMapshouldUseRemoteSoftCacheWeakIdentityMapshouldUseRemoteSoftIdentityMapshouldUseRemoteWeakIdentityMapshouldUseSessionCacheInUnitOfWorkEarlyTransactionshouldUseSoftCacheWeakIdentityMapshouldUseSoftIdentityMapshouldUseWeakIdentityMapsupportsChangeTrackingtoggleAdditionalTablePrimaryKeyFieldstoStringuseAllFieldsLockinguseCacheIdentityMapuseChangedFieldsLockinguseCloneCopyPolicyuseCloneCopyPolicyuseDefaultConstructorInstantiationPolicyuseFactoryInstantiationPolicyuseFactoryInstantiationPolicyuseFactoryInstantiationPolicyuseFactoryInstantiationPolicyuseFactoryInstantiationPolicyuseFullIdentityMapuseHardCacheWeakIdentityMapuseInstantiationCopyPolicyuseMethodInstantiationPolicyuseNoIdentityMapusePropertyAccessForWeavinguseRemoteCacheIdentityMapuseRemoteFullIdentityMapuseRemoteHardCacheWeakIdentityMapuseRemoteNoIdentityMapuseRemoteSoftCacheWeakIdentityMapuseRemoteSoftIdentityMapuseRemoteWeakIdentityMapuseSelectedFieldsLockingusesFieldLockinguseSoftCacheWeakIdentityMapuseSoftIdentityMapusesOptimisticLockingusesPropertyAccessForWeavingusesSequenceNumbersusesVersionLockinguseTimestampLockinguseTimestampLockinguseVersionLockinguseVersionLockinguseWeakIdentityMapvalidateAfterInitializationvalidateBeforeInitializationvalidateMappingTypeverifyMultipleTableInsertOrderverifyMultipleTablesForeignKeysTablesverifyTableQualifiers

Constructor Detail

RelationalDescriptorback to summary
public RelationalDescriptor()

PUBLIC: Return a new descriptor.

Method Detail

addTableNameback to summary
public void addTableName(String tableName)

Overrides org.eclipse.persistence.descriptors.ClassDescriptor.addTableName.

PUBLIC: Specify the table name for the class of objects the receiver describes. If the table has a qualifier it should be specified using the dot notation, (i.e. "userid.employee"). This method is used if there is more than one table.

Annotations
@Override
getTableNameback to summary
public String getTableName()

Overrides org.eclipse.persistence.descriptors.ClassDescriptor.getTableName.

PUBLIC: Return the name of the descriptor's first table. This method must only be called on single table descriptors.

Annotations
@Override
getTableNamesback to summary
public Vector<E> getTableNames()

Overrides org.eclipse.persistence.descriptors.ClassDescriptor.getTableNames.

PUBLIC: Return the table names.

Annotations
@Override
isRelationalDescriptorback to summary
public boolean isRelationalDescriptor()

Overrides org.eclipse.persistence.descriptors.ClassDescriptor.isRelationalDescriptor.

PUBLIC: Return if the descriptor maps to a relational table.

Annotations
@Override
setDefaultTableNameback to summary
public void setDefaultTableName(String defaultTableName)

Overrides org.eclipse.persistence.descriptors.ClassDescriptor.setDefaultTableName.

PUBLIC: The descriptors default table can be configured if the first table is not desired.

Annotations
@Override
setTableNameback to summary
public void setTableName(String tableName) throws DescriptorException

Overrides org.eclipse.persistence.descriptors.ClassDescriptor.setTableName.

PUBLIC: Specify the table name for the class of objects the receiver describes. If the table has a qualifier it should be specified using the dot notation, (i.e. "userid.employee"). This method is used for single table.

Annotations
@Override
setTableNamesback to summary
public void setTableNames(Vector<E> tableNames)

Overrides org.eclipse.persistence.descriptors.ClassDescriptor.setTableNames.

PUBLIC: Specify the all table names for the class of objects the receiver describes. If the table has a qualifier it should be specified using the dot notation, (i.e. "userid.employee"). This method is used for multiple tables

Annotations
@Override
setTableQualifierback to summary
public void setTableQualifier(String tableQualifier)

Overrides org.eclipse.persistence.descriptors.ClassDescriptor.setTableQualifier.

PUBLIC: Set the table Qualifier for this descriptor. This table creator will be used for all tables in this descriptor

Annotations
@Override