EclipseLink 2.2.0, build 'v20110202-r8913' API Reference

org.eclipse.persistence.descriptors
Class RelationalDescriptor

java.lang.Object
  extended by org.eclipse.persistence.descriptors.ClassDescriptor
      extended by org.eclipse.persistence.descriptors.RelationalDescriptor
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
ObjectRelationalDataTypeDescriptor

public class RelationalDescriptor
extends ClassDescriptor

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, Serialized Form

Field Summary
protected  boolean weavingUsesPropertyAccess
          This flag stores whether this descriptor is using Property access based on JPA semantics.
 
Fields inherited from class org.eclipse.persistence.descriptors.ClassDescriptor
additionalAggregateCollectionKeyFields, additionalTablePrimaryKeyFields, additionalWritableMapKeyFields, AGGREGATE, AGGREGATE_COLLECTION, alias, allFields, amendmentClass, amendmentClassName, amendmentMethodName, cacheInterceptorClass, cacheInterceptorClassName, cacheInvalidationPolicy, cacheIsolation, cacheKeyType, cacheSynchronizationType, cascadeLockingPolicies, changePolicy, cmpPolicy, constraintDependencies, copyPolicy, copyPolicyClassName, defaultDeleteObjectQueryRedirector, defaultDeleteObjectQueryRedirectorClassName, defaultInsertObjectQueryRedirector, defaultInsertObjectQueryRedirectorClassName, defaultQueryRedirector, defaultQueryRedirectorClassName, defaultReadAllQueryRedirector, defaultReadAllQueryRedirectorClassName, defaultReadObjectQueryRedirector, defaultReadObjectQueryRedirectorClassName, defaultReportQueryRedirector, defaultReportQueryRedirectorClassName, defaultTable, defaultUpdateObjectQueryRedirector, defaultUpdateObjectQueryRedirectorClassName, derivesIdMappings, descriptorType, DO_NOT_SEND_CHANGES, ERROR, eventManager, fetchGroupManager, fields, foreignKeyValuesForCaching, hasMultipleTableConstraintDependecy, hasNoncacheableMappings, hasRelationships, hasSimplePrimaryKey, historyPolicy, identityMapClass, identityMapSize, idValidation, inheritancePolicy, initializationStage, INITIALIZED, instantiationPolicy, INTERFACE, interfaceInitializationStage, interfacePolicy, INVALIDATE_CHANGED_OBJECTS, isCascadeOnDeleteSetOnDatabaseOnSecondaryTables, isNativeConnectionRequired, ISOLATE_CACHE_AFTER_TRANSACTION, ISOLATE_CACHE_ALWAYS, ISOLATE_FROM_CLIENT_SESSION, ISOLATE_NEW_DATA_AFTER_TRANSACTION, javaClass, javaClassName, lockableMappings, mappings, mappingsPostCalculateChanges, mappingsPostCalculateChangesOnDeleted, multipleTableForeignKeys, multipleTableInsertOrder, NORMAL, objectBuilder, optimisticLockingPolicy, partitioningPolicy, partitioningPolicyName, POST_INITIALIZED, preDeleteMappings, PREINITIALIZED, primaryKeyFields, primaryKeyIdValidations, properties, queryKeys, queryManager, referencingClasses, remoteIdentityMapClass, remoteIdentityMapSize, returningPolicy, SEND_NEW_OBJECTS_WITH_CHANGES, SEND_OBJECT_CHANGES, sequence, sequenceNumberField, sequenceNumberName, sessionName, shouldAcquireCascadedLocks, shouldAlwaysConformResultsInUnitOfWork, shouldAlwaysRefreshCache, shouldAlwaysRefreshCacheOnRemote, shouldBeReadOnly, shouldDisableCacheHits, shouldDisableCacheHitsOnRemote, shouldOnlyRefreshCacheIfNewerVersion, shouldOrderMappings, shouldRegisterResultsInUnitOfWork, shouldUseFullChangeSetsForNewObjects, tables, UNDEFINED_ISOLATATION, UNDEFINED_OBJECT_CHANGE_BEHAVIOR, UNINITIALIZED, unitOfWorkCacheIsolationLevel, USE_SESSION_CACHE_AFTER_TRANSACTION, wrapperPolicy
 
Constructor Summary
RelationalDescriptor()
          PUBLIC: Return a new descriptor.
 
Method Summary
 void addTableName(java.lang.String tableName)
          PUBLIC: Specify the table name for the class of objects the receiver describes.
 java.lang.String getTableName()
          PUBLIC: Return the name of the descriptor's first table.
 java.util.Vector getTableNames()
          PUBLIC: Return the table names.
 void setDefaultTableName(java.lang.String defaultTableName)
          PUBLIC: The descriptors default table can be configured if the first table is not desired.
 void setTableName(java.lang.String tableName)
          PUBLIC: Specify the table name for the class of objects the receiver describes.
 void setTableNames(java.util.Vector tableNames)
          PUBLIC: Specify the all table names for the class of objects the receiver describes.
 void setTableQualifier(java.lang.String tableQualifier)
          PUBLIC: Set the table Qualifier for this descriptor.
 void usePropertyAccessForWeaving()
          INTERNAL: Record that this descriptor uses property access.
 boolean usesPropertyAccessForWeaving()
          INTERNAL: Return whether this descriptor uses property access.
 
Methods inherited from class org.eclipse.persistence.descriptors.ClassDescriptor
addAbstractQueryKey, addCascadeLockingPolicy, addConstraintDependencies, addConstraintDependency, addDirectMapping, addDirectMapping, addDirectQueryKey, addForeignKeyFieldForMultipleTable, addForeignKeyFieldNameForMultipleTable, addMapping, addMappingsPostCalculateChanges, addMappingsPostCalculateChangesOnDeleted, addPrimaryKeyField, addPrimaryKeyFieldName, addQueryKey, addTable, adjustMultipleTableInsertOrder, alwaysConformResultsInUnitOfWork, alwaysRefreshCache, alwaysRefreshCacheOnRemote, applyAmendmentMethod, applyAmendmentMethod, arePrimaryKeyFields, assignDefaultValues, buildCallFromStatement, buildDirectValuesFromFieldValue, buildField, buildField, buildField, buildFieldValueFromDirectValues, buildFieldValueFromForeignKeys, buildFieldValueFromNestedRow, buildFieldValueFromNestedRows, buildNestedRowFromFieldValue, buildNestedRowsFromFieldValue, checkDatabase, checkInheritanceTreeAggregateSettings, clone, convertClassNamesToClasses, createCopyPolicy, createInstantiationPolicy, createMultipleTableInsertOrder, createMultipleTableInsertOrderFromComparison, createTableComparison, createTableOrder, descriptorIsAggregate, descriptorIsAggregateCollection, descriptorIsForInterface, descriptorIsNormal, disableCacheHits, disableCacheHitsOnRemote, dontAlwaysConformResultsInUnitOfWork, dontAlwaysRefreshCache, dontAlwaysRefreshCacheOnRemote, dontDisableCacheHits, dontDisableCacheHitsOnRemote, dontOnlyRefreshCacheIfNewerVersion, extractDefaultTable, getAdditionalAggregateCollectionKeyFields, getAdditionalTablePrimaryKeyFields, getAdditionalWritableMapKeyFields, getAlias, getAllFields, getAmendmentClass, getAmendmentClassName, getAmendmentMethodName, getCacheInterceptorClass, getCacheInterceptorClassName, getCacheInvalidationPolicy, getCacheIsolation, getCacheKeyType, getCacheSynchronizationType, getCascadeLockingPolicies, getCMPPolicy, getConstraintDependencies, getCopyPolicy, getCopyPolicyClassName, getDefaultDeleteObjectQueryRedirector, getDefaultFetchGroup, getDefaultInsertObjectQueryRedirector, getDefaultQueryRedirector, getDefaultReadAllQueryRedirector, getDefaultReadObjectQueryRedirector, getDefaultReportQueryRedirector, getDefaultTable, getDefaultUpdateObjectQueryRedirector, getDerivesIdMappinps, getDescriptorEventManager, getDescriptorInheritancePolicy, getDescriptorQueryManager, getDescriptorType, getDescriptorTypeValue, getEventManager, getFetchGroupManager, getFields, getForeignKeyValuesForCaching, getHistoryPolicy, getIdentityMapClass, getIdentityMapSize, getIdValidation, getInheritancePolicy, getInheritancePolicyOrNull, getInstantiationPolicy, getInterfacePolicy, getInterfacePolicyOrNull, getJavaClass, getJavaClassName, getLockableMappings, getMappingForAttributeName, getMappings, getMappingsPostCalculateChanges, getMappingsPostCalculateChangesOnDeleted, getMultipleTableForeignKeyAssociations, getMultipleTableForeignKeys, getMultipleTableInsertOrder, getMultipleTablePrimaryKeyAssociations, getObjectBuilder, getObjectChangePolicy, getObjectChangePolicyInternal, getOptimisticLockingPolicy, getPartitioningPolicy, getPartitioningPolicyName, getPreDeleteMappings, getPrimaryKeyFieldNames, getPrimaryKeyFields, getPrimaryKeyIdValidations, getProperties, getProperty, getQueryKeyNamed, getQueryKeys, getQueryManager, getRemoteIdentityMapClass, getRemoteIdentityMapSize, getReturningPolicy, getRootDescriptor, getSequence, getSequenceNumberField, getSequenceNumberFieldName, getSequenceNumberName, getSessionName, getTable, getTablePerClassPolicy, getTables, getTypedField, getUnitOfWorkCacheIsolationLevel, getWrapperPolicy, hasCascadeLockingPolicies, hasCMPPolicy, hasDependencyOnParts, hasDerivedId, hasFetchGroupManager, hasInheritance, hasInterfacePolicy, hasMappingsPostCalculateChanges, hasMappingsPostCalculateChangesOnDeleted, hasMultipleTableConstraintDependecy, hasMultipleTables, hasNoncacheableMappings, hasPessimisticLockingPolicy, hasPreDeleteMappings, hasPrivatelyOwnedParts, hasQueryKeyOrMapping, hasRelationships, hasReturningPolicy, hasSimplePrimaryKey, hasTablePerClassPolicy, hasWrapperPolicy, initialize, initializeAggregateInheritancePolicy, initializeMultipleTablePrimaryKeyFields, initializeProperties, interfaceInitialization, isAbstract, isAggregateCollectionDescriptor, isAggregateDescriptor, isCascadeOnDeleteSetOnDatabaseOnSecondaryTables, isChildDescriptor, isDescriptorForInterface, isDescriptorTypeAggregate, isDescriptorTypeNormal, isFullyInitialized, isInitialized, isInterfaceChildDescriptor, isInterfaceInitialized, isInvalid, isIsolated, isMultipleTableDescriptor, isNativeConnectionRequired, isObjectRelationalDataTypeDescriptor, isPrimaryKeySetAfterInsert, isProtectedIsolation, isReturnTypeRequiredForReturningPolicy, isSharedIsolation, notifyReferencingDescriptorsOfIsolation, onlyRefreshCacheIfNewerVersion, postInitialize, preInitialize, preInitializeInheritancePolicy, preInterfaceInitialization, prepareCascadeLockingPolicy, rehashFieldDependancies, reInitializeJoinedAttributes, remoteInitialization, removeMappingForAttributeName, removeProperty, requiresInitialization, selfValidationAfterInitialization, selfValidationBeforeInitialization, setAdditionalTablePrimaryKeyFields, setAdditionalTablePrimaryKeyFields, setAlias, setAllFields, setAmendmentClass, setAmendmentClassName, setAmendmentMethodName, setCacheInterceptorClass, setCacheInterceptorClassName, setCacheInvalidationPolicy, setCacheIsolation, setCacheKeyType, setCacheSynchronizationType, setCMPPolicy, setConstraintDependencies, setCopyPolicy, setCopyPolicyClassName, setDefaultDeleteObjectQueryRedirector, setDefaultDeleteObjectQueryRedirectorClassName, setDefaultInsertObjectQueryRedirector, setDefaultInsertObjectQueryRedirectorClassName, setDefaultQueryRedirector, setDefaultQueryRedirectorClassName, setDefaultReadAllQueryRedirector, setDefaultReadAllQueryRedirectorClassName, setDefaultReadObjectQueryRedirector, setDefaultReadObjectQueryRedirectorClassName, setDefaultReportQueryRedirector, setDefaultReportQueryRedirectorClassName, setDefaultTable, setDefaultUpdateObjectQueryRedirector, setDefaultUpdateObjectQueryRedirectorClassName, setDescriptorType, setDescriptorTypeValue, setEventManager, setExistenceChecking, setFetchGroupManager, setFields, setForeignKeyFieldNamesForMultipleTable, setHasMultipleTableConstraintDependecy, setHasRelationships, setHasSimplePrimaryKey, setHistoryPolicy, setIdentityMapClass, setIdentityMapSize, setIdValidation, setInheritancePolicy, setInitializationStage, setInstantiationPolicy, setInterfaceInitializationStage, setInterfacePolicy, setInternalDefaultTable, setInternalDefaultTable, setIsCascadeOnDeleteSetOnDatabaseOnSecondaryTables, setIsIsolated, setIsNativeConnectionRequired, setJavaClass, setJavaClassName, setJavaInterface, setJavaInterfaceName, setLockableMappings, setMappings, setMultipleTableForeignKeys, setMultipleTableInsertOrder, setObjectBuilder, setObjectChangePolicy, setOptimisticLockingPolicy, setPartitioningPolicy, setPartitioningPolicyName, setPrimaryKeyFieldName, setPrimaryKeyFieldNames, setPrimaryKeyFields, setPrimaryKeyIdValidations, setProperties, setProperty, setQueryKeys, setQueryManager, setReadOnly, setRemoteIdentityMapClass, setRemoteIdentityMapSize, setReturningPolicy, setSequence, setSequenceNumberField, setSequenceNumberFieldName, setSequenceNumberName, setSessionName, setShouldAcquireCascadedLocks, setShouldAlwaysConformResultsInUnitOfWork, setShouldAlwaysRefreshCache, setShouldAlwaysRefreshCacheOnRemote, setShouldBeReadOnly, setShouldDisableCacheHits, setShouldDisableCacheHitsOnRemote, setShouldOnlyRefreshCacheIfNewerVersion, setShouldOrderMappings, setShouldRegisterResultsInUnitOfWork, setTablePerClassPolicy, setTables, setUnitOfWorkCacheIsolationLevel, setWrapperPolicy, shouldAcquireCascadedLocks, shouldAlwaysConformResultsInUnitOfWork, shouldAlwaysRefreshCache, shouldAlwaysRefreshCacheOnRemote, shouldBeReadOnly, shouldDisableCacheHits, shouldDisableCacheHitsOnRemote, shouldIsolateObjectsInUnitOfWork, shouldIsolateObjectsInUnitOfWorkEarlyTransaction, shouldIsolateProtectedObjectsInUnitOfWork, shouldOnlyRefreshCacheIfNewerVersion, shouldOrderMappings, shouldRegisterResultsInUnitOfWork, shouldUseAdditionalJoinExpression, shouldUseCacheIdentityMap, shouldUseFullChangeSetsForNewObjects, shouldUseFullIdentityMap, shouldUseHardCacheWeakIdentityMap, shouldUseNoIdentityMap, shouldUseRemoteCacheIdentityMap, shouldUseRemoteFullIdentityMap, shouldUseRemoteHardCacheWeakIdentityMap, shouldUseRemoteNoIdentityMap, shouldUseRemoteSoftCacheWeakIdentityMap, shouldUseRemoteSoftIdentityMap, shouldUseRemoteWeakIdentityMap, shouldUseSessionCacheInUnitOfWorkEarlyTransaction, shouldUseSoftCacheWeakIdentityMap, shouldUseSoftIdentityMap, shouldUseWeakIdentityMap, supportsChangeTracking, toggleAdditionalTablePrimaryKeyFields, toString, useAllFieldsLocking, useCacheIdentityMap, useChangedFieldsLocking, useCloneCopyPolicy, useCloneCopyPolicy, useDefaultConstructorInstantiationPolicy, useFactoryInstantiationPolicy, useFactoryInstantiationPolicy, useFactoryInstantiationPolicy, useFactoryInstantiationPolicy, useFactoryInstantiationPolicy, useFullIdentityMap, useHardCacheWeakIdentityMap, useInstantiationCopyPolicy, useMethodInstantiationPolicy, useNoIdentityMap, useRemoteCacheIdentityMap, useRemoteFullIdentityMap, useRemoteHardCacheWeakIdentityMap, useRemoteNoIdentityMap, useRemoteSoftCacheWeakIdentityMap, useRemoteSoftIdentityMap, useRemoteWeakIdentityMap, useSelectedFieldsLocking, usesFieldLocking, useSoftCacheWeakIdentityMap, useSoftIdentityMap, usesOptimisticLocking, usesSequenceNumbers, usesVersionLocking, useTimestampLocking, useTimestampLocking, useVersionLocking, useVersionLocking, useWeakIdentityMap, validateAfterInitialization, validateBeforeInitialization, validateMappingType, verifyMultipleTableInsertOrder, verifyMultipleTablesForeignKeysTables, verifyTableQualifiers
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

weavingUsesPropertyAccess

protected boolean weavingUsesPropertyAccess
This flag stores whether this descriptor is using Property access based on JPA semantics. It is used to modify the behavior of our weaving functionality as it pertains to adding annotations to fields

Constructor Detail

RelationalDescriptor

public RelationalDescriptor()
PUBLIC: Return a new descriptor.

Method Detail

addTableName

public void addTableName(java.lang.String tableName)
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.

Overrides:
addTableName in class ClassDescriptor

getTableName

public java.lang.String getTableName()
PUBLIC: Return the name of the descriptor's first table. This method must only be called on single table descriptors.

Overrides:
getTableName in class ClassDescriptor

getTableNames

public java.util.Vector getTableNames()
PUBLIC: Return the table names.

Overrides:
getTableNames in class ClassDescriptor

setDefaultTableName

public void setDefaultTableName(java.lang.String defaultTableName)
PUBLIC: The descriptors default table can be configured if the first table is not desired.

Overrides:
setDefaultTableName in class ClassDescriptor

setTableName

public void setTableName(java.lang.String tableName)
                  throws DescriptorException
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.

Overrides:
setTableName in class ClassDescriptor
Throws:
DescriptorException

setTableNames

public void setTableNames(java.util.Vector tableNames)
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

Overrides:
setTableNames in class ClassDescriptor

setTableQualifier

public void setTableQualifier(java.lang.String tableQualifier)
PUBLIC: Set the table Qualifier for this descriptor. This table creator will be used for all tables in this descriptor

Overrides:
setTableQualifier in class ClassDescriptor

usesPropertyAccessForWeaving

public boolean usesPropertyAccessForWeaving()
INTERNAL: Return whether this descriptor uses property access. This information is used to modify the behavior of some of our weaving features


usePropertyAccessForWeaving

public void usePropertyAccessForWeaving()
INTERNAL: Record that this descriptor uses property access. This information is used to modify the behavior of some of our weaving features


EclipseLink 2.2.0, build 'v20110202-r8913' API Reference