Module org.eclipse.persistence.core
Class ObjectRelationalDataTypeDescriptor
java.lang.Object
org.eclipse.persistence.core.descriptors.CoreDescriptor<AttributeGroup,DescriptorEventManager,DatabaseField,InheritancePolicy,InstantiationPolicy,Vector,ObjectBuilder>
org.eclipse.persistence.descriptors.ClassDescriptor
org.eclipse.persistence.descriptors.RelationalDescriptor
org.eclipse.persistence.mappings.structures.ObjectRelationalDataTypeDescriptor
- All Implemented Interfaces:
Serializable
,Cloneable
Purpose: Differentiates object-relational descriptors from normal relational descriptors. The object-relational descriptor describes a type not a table, (although there is normally a table associated with the type, unless it is aggregate).
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.descriptors.ClassDescriptor
accessorTree, additionalAggregateCollectionKeyFields, additionalTablePrimaryKeyFields, additionalWritableMapKeyFields, AGGREGATE, AGGREGATE_COLLECTION, alias, allFields, allSelectionFields, amendmentClass, amendmentClassName, amendmentMethodName, cacheInvalidationPolicy, cachePolicy, cascadedLockingInitialized, cascadeLockingPolicies, changePolicy, cmpPolicy, constraintDependencies, copyPolicy, copyPolicyClassName, defaultDeleteObjectQueryRedirector, defaultDeleteObjectQueryRedirectorClassName, defaultInsertObjectQueryRedirector, defaultInsertObjectQueryRedirectorClassName, defaultQueryRedirector, defaultQueryRedirectorClassName, defaultReadAllQueryRedirector, defaultReadAllQueryRedirectorClassName, defaultReadObjectQueryRedirector, defaultReadObjectQueryRedirectorClassName, defaultReportQueryRedirector, defaultReportQueryRedirectorClassName, defaultTable, defaultUpdateObjectQueryRedirector, defaultUpdateObjectQueryRedirectorClassName, derivesIdMappings, descriptorCustomizerClassName, descriptorType, DO_NOT_SEND_CHANGES, ERROR, fetchGroupManager, fields, foreignKeyValuesForCaching, hasMultipleTableConstraintDependecy, hasNoncacheableMappings, hasRelationships, hasSimplePrimaryKey, historyPolicy, idValidation, initializationStage, INITIALIZED, 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, multitenantPolicy, NORMAL, optimisticLockingPolicy, partitioningPolicy, partitioningPolicyName, POST_INITIALIZED, preDeleteMappings, PREINITIALIZED, primaryKeyFields, primaryKeyIdValidations, properties, queryKeys, queryManager, referencingClasses, returnFieldsToGenerateInsert, returnFieldsToGenerateUpdate, returnFieldsToMergeInsert, returnFieldsToMergeUpdate, returningPolicies, returningPolicy, selectionFields, SEND_NEW_OBJECTS_WITH_CHANGES, SEND_OBJECT_CHANGES, sequence, sequenceNumberField, sequenceNumberName, serializedObjectPolicy, sessionName, shouldAcquireCascadedLocks, shouldAlwaysConformResultsInUnitOfWork, shouldBeReadOnly, shouldLockForClone, shouldOrderMappings, shouldRegisterResultsInUnitOfWork, shouldUseFullChangeSetsForNewObjects, tables, unconvertedProperties, UNDEFINED_ISOLATATION, UNDEFINED_OBJECT_CHANGE_BEHAVIOR, UNINITIALIZED, USE_SESSION_CACHE_AFTER_TRANSACTION, virtualAttributeMethods, weavingUsesPropertyAccess, wrapperPolicy
Fields inherited from class org.eclipse.persistence.core.descriptors.CoreDescriptor
attributeGroups, eventManager, field, inheritancePolicy, instantiationPolicy, objectBuilder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFieldOrdering
(String fieldName) PUBLIC: Order the fields in a specific Add the field ordering, this will order the fields in the order this method is called.static Object
buildArrayObjectFromArray
(Object array) INTERNAL: Build array of objects for Array data type.static Object
buildArrayObjectFromStruct
(Object structure) INTERNAL: Build array of objects for Struct data type.static Object
buildContainerFromArray
(Array fieldValue, ObjectRelationalDatabaseField arrayField, AbstractSession session) INTERNAL: Build and return the nested rows from the specified field value.buildDirectValuesFromFieldValue
(Object fieldValue) INTERNAL: Extract the direct values from the specified field value.buildFieldValueFromDirectValues
(Vector directValues, String elementDataTypeName, AbstractSession session) INTERNAL: Build the appropriate field value for the specified set of direct values.buildFieldValueFromNestedRow
(AbstractRecord nestedRow, AbstractSession session) INTERNAL: Build and return the field value from the specified nested database row.buildFieldValueFromNestedRows
(Vector nestedRows, String structureName, AbstractSession session) INTERNAL: Build and return the appropriate field value for the specified set of nested rows.buildNestedRowFromFieldValue
(Object fieldValue) INTERNAL: Build and return the nested database row from the specified field value.buildNestedRowsFromFieldValue
(Object fieldValue, AbstractSession session) INTERNAL: Build and return the nested rows from the specified field value.buildRowFromStructure
(Struct structure) INTERNAL: Build a row representation from the ADT structure field array.buildStructureFromRow
(AbstractRecord row, AbstractSession session, Connection connection) INTERNAL: Build a ADT structure from the row data.protected DatabaseTable
INTERNAL: Aggregates use a dummy table as default.INTERNAL: Return the field order.getRef
(Object object, AbstractSession session) INTERNAL: Get the ref for the object.PUBLIC: Return the name of the structure.void
initialize
(AbstractSession session) INTERNAL: Auto-Default orderedFields to fieldsboolean
PUBLIC: Return if this is an ObjectRelationalDataTypeDescriptor.boolean
requiresInitialization
(AbstractSession session) INTERNAL: Aggregates obj-rel are initialized normally as no cloning is required.void
setOrderedFields
(Vector orderedFields) INTERNAL: Set the field order.void
setStructureName
(String structureName) PUBLIC: Set the name of the structure.protected void
validateMappingType
(DatabaseMapping mapping) Methods inherited from class org.eclipse.persistence.descriptors.RelationalDescriptor
addTableName, getTableName, getTableNames, isRelationalDescriptor, setDefaultTableName, setTableName, setTableNames, setTableQualifier
Methods inherited from class org.eclipse.persistence.descriptors.ClassDescriptor
addAbstractQueryKey, addCascadeLockingPolicy, addConstraintDependencies, addConstraintDependency, addDirectMapping, addDirectMapping, addDirectQueryKey, addForeignKeyFieldForMultipleTable, addForeignKeyFieldNameForMultipleTable, addMapping, addMappingsPostCalculateChanges, addMappingsPostCalculateChangesOnDeleted, addPreDeleteMapping, addPrimaryKeyField, addPrimaryKeyFieldName, addQueryKey, addTable, addUnconvertedProperty, adjustMultipleTableInsertOrder, alwaysConformResultsInUnitOfWork, alwaysRefreshCache, alwaysRefreshCacheOnRemote, applyAmendmentMethod, applyAmendmentMethod, arePrimaryKeyFields, assignDefaultValues, buildBatchCriteriaByPK, buildCallFromStatement, buildField, buildField, buildField, buildFieldValueFromForeignKeys, checkDatabase, checkInheritanceTreeAggregateSettings, clearReferencingClasses, clone, convertClassNamesToClasses, createCopyPolicy, createInstantiationPolicy, createMultipleTableInsertOrder, createMultipleTableInsertOrderFromComparison, createTableComparison, createTableOrder, descriptorIsAggregate, descriptorIsAggregateCollection, descriptorIsForInterface, descriptorIsNormal, disableCacheHits, disableCacheHitsOnRemote, dontAlwaysConformResultsInUnitOfWork, dontAlwaysRefreshCache, dontAlwaysRefreshCacheOnRemote, dontDisableCacheHits, dontDisableCacheHitsOnRemote, dontOnlyRefreshCacheIfNewerVersion, getAccessorTree, getAdditionalAggregateCollectionKeyFields, getAdditionalTablePrimaryKeyFields, getAdditionalWritableMapKeyFields, getAlias, getAllFields, getAllSelectionFields, getAllSelectionFields, getAmendmentClass, getAmendmentClassName, getAmendmentMethodName, getAttributeGroup, getAttributeGroups, getCacheInterceptorClass, getCacheInterceptorClassName, getCacheInvalidationPolicy, getCacheIsolation, getCacheKeyType, getCachePolicy, getCacheSynchronizationType, getCascadeLockingPolicies, getCMPPolicy, getConstraintDependencies, getCopyPolicy, getCopyPolicyClassName, getDefaultDeleteObjectQueryRedirector, getDefaultFetchGroup, getDefaultInsertObjectQueryRedirector, getDefaultQueryRedirector, getDefaultReadAllQueryRedirector, getDefaultReadObjectQueryRedirector, getDefaultReportQueryRedirector, getDefaultTable, getDefaultUpdateObjectQueryRedirector, getDerivesIdMappinps, getDescriptorCustomizerClassName, getDescriptorEventManager, getDescriptorInheritancePolicy, getDescriptorQueryManager, getDescriptorType, getDescriptorTypeValue, getEventManager, getFetchGroupManager, getFields, getForeignKeyValuesForCaching, getFullyMergeEntity, getHistoryPolicy, getIdentityMapClass, getIdentityMapSize, getIdValidation, getInheritancePolicy, getInheritancePolicyOrNull, getInstantiationPolicy, getInterfacePolicy, getInterfacePolicyOrNull, getJavaClass, getJavaClassName, getLockableMappings, getMappingForAttributeName, getMappings, getMappingsPostCalculateChanges, getMappingsPostCalculateChangesOnDeleted, getMultipleTableForeignKeyAssociations, getMultipleTableForeignKeys, getMultipleTableInsertOrder, getMultipleTablePrimaryKeyAssociations, getMultitenantPolicy, getObjectBuilder, getObjectChangePolicy, getObjectChangePolicyInternal, getOptimisticLockingPolicy, getPartitioningPolicy, getPartitioningPolicyName, getPreDeleteMappings, getPrimaryKeyFieldNames, getPrimaryKeyFields, getPrimaryKeyIdValidations, getProperties, getProperty, getQueryKeyNamed, getQueryKeys, getQueryManager, getRemoteIdentityMapClass, getRemoteIdentityMapSize, getReturnFieldsToGenerateInsert, getReturnFieldsToGenerateUpdate, getReturnFieldsToMergeInsert, getReturnFieldsToMergeUpdate, getReturningPolicies, getReturningPolicy, getRootDescriptor, getSelectionFields, getSelectionFields, getSequence, getSequenceNumberField, getSequenceNumberFieldName, getSequenceNumberName, getSerializedObjectPolicy, getSessionName, getTable, getTablePerClassPolicy, getTables, getTypedField, getUnconvertedProperties, getUnitOfWorkCacheIsolationLevel, getVirtualAttributeMethods, getWrapperPolicy, hasCascadeLockingPolicies, hasCMPPolicy, hasDependencyOnParts, hasDerivedId, hasEventManager, hasFetchGroupManager, hasInheritance, hasInterfacePolicy, hasMappingsPostCalculateChanges, hasMappingsPostCalculateChangesOnDeleted, hasMultipleTableConstraintDependecy, hasMultipleTables, hasMultitenantPolicy, hasNestedIdentityReference, hasNoncacheableMappings, hasPessimisticLockingPolicy, hasPreDeleteMappings, hasPrivatelyOwnedParts, hasQueryKeyOrMapping, hasRelationships, hasRelationshipsExceptBackpointer, hasReturningPolicies, hasReturningPolicy, hasSerializedObjectPolicy, hasSimplePrimaryKey, hasTablePerClassPolicy, hasTablePerMultitenantPolicy, hasTargetForeignKeyMapping, hasUnconvertedProperties, hasWrapperPolicy, initialize, initializeAggregateInheritancePolicy, initializeMultipleTablePrimaryKeyFields, initializeProperties, interfaceInitialization, isAbstract, isAggregateCollectionDescriptor, isAggregateDescriptor, isCascadeOnDeleteSetOnDatabaseOnSecondaryTables, isChildDescriptor, isDescriptorForInterface, isDescriptorTypeAggregate, isDescriptorTypeNormal, isEISDescriptor, isFullyInitialized, isInitialized, isInterfaceChildDescriptor, isInterfaceInitialized, isInvalid, isIsolated, isMultipleTableDescriptor, isNativeConnectionRequired, isPrimaryKeySetAfterInsert, isProtectedIsolation, isReturnTypeRequiredForReturningPolicy, isSharedIsolation, isXMLDescriptor, newAggregateCollectionMapping, newAggregateMapping, newDirectCollectionMapping, newDirectMapping, newManyToManyMapping, newManyToOneMapping, newOneToManyMapping, newOneToOneMapping, newUnidirectionalOneToManyMapping, notifyReferencingDescriptorsOfIsolation, onlyRefreshCacheIfNewerVersion, postInitialize, preInitialize, preInitializeInheritancePolicy, preInterfaceInitialization, prepareCascadeLockingPolicy, rehashFieldDependancies, reInitializeJoinedAttributes, remoteInitialization, removeMappingForAttributeName, removeProperty, selfValidationAfterInitialization, selfValidationBeforeInitialization, setAccessorTree, setAdditionalTablePrimaryKeyFields, setAdditionalTablePrimaryKeyFields, setAlias, setAllFields, setAmendmentClass, setAmendmentClassName, setAmendmentMethodName, setCacheable, setCacheInterceptorClass, setCacheInterceptorClassName, setCacheInvalidationPolicy, setCacheIsolation, setCacheKeyType, setCachePolicy, setCacheSynchronizationType, setCMPPolicy, setConstraintDependencies, setCopyPolicy, setCopyPolicyClassName, setDefaultDeleteObjectQueryRedirector, setDefaultDeleteObjectQueryRedirectorClassName, setDefaultInsertObjectQueryRedirector, setDefaultInsertObjectQueryRedirectorClassName, setDefaultQueryRedirector, setDefaultQueryRedirectorClassName, setDefaultReadAllQueryRedirector, setDefaultReadAllQueryRedirectorClassName, setDefaultReadObjectQueryRedirector, setDefaultReadObjectQueryRedirectorClassName, setDefaultReportQueryRedirector, setDefaultReportQueryRedirectorClassName, setDefaultTable, setDefaultUpdateObjectQueryRedirector, setDefaultUpdateObjectQueryRedirectorClassName, setDescriptorCustomizerClassName, setDescriptorType, setDescriptorTypeValue, setEventManager, setExistenceChecking, setFetchGroupManager, setFields, setForeignKeyFieldNamesForMultipleTable, setFullyMergeEntity, setHasMultipleTableConstraintDependecy, setHasRelationships, setHasSimplePrimaryKey, setHistoryPolicy, setIdentityMapClass, setIdentityMapSize, setIdValidation, setInheritancePolicy, setInitializationStage, setInstantiationPolicy, setInterfaceInitializationStage, setInterfacePolicy, setInternalDefaultTable, setInternalDefaultTable, setIsCascadeOnDeleteSetOnDatabaseOnSecondaryTables, setIsNativeConnectionRequired, setJavaClass, setJavaClassName, setJavaInterface, setJavaInterfaceName, setLockableMappings, setMappings, setMultipleTableForeignKeys, setMultipleTableInsertOrder, setMultitenantPolicy, setObjectBuilder, setObjectChangePolicy, setOptimisticLockingPolicy, setPartitioningPolicy, setPartitioningPolicyName, setPrimaryKeyFieldName, setPrimaryKeyFieldNames, setPrimaryKeyFields, setPrimaryKeyIdValidations, setProperties, setProperty, setQueryKeys, setQueryManager, setReadOnly, setRemoteIdentityMapClass, setRemoteIdentityMapSize, setReturningPolicy, setSequence, setSequenceNumberField, setSequenceNumberFieldName, setSequenceNumberName, setSerializedObjectPolicy, setSessionName, setShouldAcquireCascadedLocks, setShouldAlwaysConformResultsInUnitOfWork, setShouldAlwaysRefreshCache, setShouldAlwaysRefreshCacheOnRemote, setShouldBeReadOnly, setShouldDisableCacheHits, setShouldDisableCacheHitsOnRemote, setShouldLockForClone, setShouldOnlyRefreshCacheIfNewerVersion, setShouldOrderMappings, setShouldRegisterResultsInUnitOfWork, setTablePerClassPolicy, setTables, setUnitOfWorkCacheIsolationLevel, setVirtualAttributeMethods, setWrapperPolicy, shouldAcquireCascadedLocks, shouldAlwaysConformResultsInUnitOfWork, shouldAlwaysRefreshCache, shouldAlwaysRefreshCacheOnRemote, shouldBeReadOnly, shouldDisableCacheHits, shouldDisableCacheHitsOnRemote, shouldIsolateObjectsInUnitOfWork, shouldIsolateObjectsInUnitOfWorkEarlyTransaction, shouldIsolateProtectedObjectsInUnitOfWork, shouldLockForClone, 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, usePropertyAccessForWeaving, useRemoteCacheIdentityMap, useRemoteFullIdentityMap, useRemoteHardCacheWeakIdentityMap, useRemoteNoIdentityMap, useRemoteSoftCacheWeakIdentityMap, useRemoteSoftIdentityMap, useRemoteWeakIdentityMap, useSelectedFieldsLocking, usesFieldLocking, useSoftCacheWeakIdentityMap, useSoftIdentityMap, usesOptimisticLocking, usesPropertyAccessForWeaving, usesSequenceNumbers, usesVersionLocking, useTimestampLocking, useTimestampLocking, useVersionLocking, useVersionLocking, useWeakIdentityMap, validateAfterInitialization, validateBeforeInitialization, verifyMultipleTableInsertOrder, verifyMultipleTablesForeignKeysTables, verifyTableQualifiers
Methods inherited from class org.eclipse.persistence.core.descriptors.CoreDescriptor
addAttributeGroup
-
Field Details
-
structureName
-
orderedFields
-
allOrderedFields
-
-
Constructor Details
-
ObjectRelationalDataTypeDescriptor
public ObjectRelationalDataTypeDescriptor()
-
-
Method Details
-
initialize
INTERNAL: Auto-Default orderedFields to fields- Overrides:
initialize
in classClassDescriptor
- Throws:
DescriptorException
-
addFieldOrdering
PUBLIC: Order the fields in a specific Add the field ordering, this will order the fields in the order this method is called.- Parameters:
fieldName
- the name of the field to add ordering on.
-
buildDirectValuesFromFieldValue
INTERNAL: Extract the direct values from the specified field value. Return them in a vector. The field value better be an Array.- Overrides:
buildDirectValuesFromFieldValue
in classClassDescriptor
- Throws:
DatabaseException
-
buildFieldValueFromDirectValues
public Object buildFieldValueFromDirectValues(Vector directValues, String elementDataTypeName, AbstractSession session) throws DatabaseException INTERNAL: Build the appropriate field value for the specified set of direct values. The database better be expecting an ARRAY.- Overrides:
buildFieldValueFromDirectValues
in classClassDescriptor
- Throws:
DatabaseException
-
buildFieldValueFromNestedRow
public Object buildFieldValueFromNestedRow(AbstractRecord nestedRow, AbstractSession session) throws DatabaseException INTERNAL: Build and return the field value from the specified nested database row. The database better be expecting a Struct.- Overrides:
buildFieldValueFromNestedRow
in classClassDescriptor
- Throws:
DatabaseException
-
buildFieldValueFromNestedRows
public Object buildFieldValueFromNestedRows(Vector nestedRows, String structureName, AbstractSession session) throws DatabaseException INTERNAL: Build and return the appropriate field value for the specified set of nested rows. The database better be expecting an ARRAY. It looks like we can ignore inheritance here....- Overrides:
buildFieldValueFromNestedRows
in classClassDescriptor
- Throws:
DatabaseException
-
buildContainerFromArray
public static Object buildContainerFromArray(Array fieldValue, ObjectRelationalDatabaseField arrayField, AbstractSession session) throws DatabaseException INTERNAL: Build and return the nested rows from the specified field value. This method allows the field value to be an ARRAY containing other structures such as arrays or Struct, or direct values.- Throws:
DatabaseException
-
buildNestedRowFromFieldValue
INTERNAL: Build and return the nested database row from the specified field value. The field value better be an Struct.- Overrides:
buildNestedRowFromFieldValue
in classClassDescriptor
- Throws:
DatabaseException
-
buildNestedRowsFromFieldValue
public Vector buildNestedRowsFromFieldValue(Object fieldValue, AbstractSession session) throws DatabaseException INTERNAL: Build and return the nested rows from the specified field value. The field value better be an ARRAY.- Overrides:
buildNestedRowsFromFieldValue
in classClassDescriptor
- Throws:
DatabaseException
-
buildRowFromStructure
INTERNAL: Build a row representation from the ADT structure field array. TopLink will then build the object from the row.- Throws:
DatabaseException
-
buildStructureFromRow
public Struct buildStructureFromRow(AbstractRecord row, AbstractSession session, Connection connection) throws DatabaseException INTERNAL: Build a ADT structure from the row data.- Throws:
DatabaseException
-
buildArrayObjectFromArray
INTERNAL: Build array of objects for Array data type.- Throws:
DatabaseException
-
buildArrayObjectFromStruct
INTERNAL: Build array of objects for Struct data type.- Throws:
DatabaseException
-
extractDefaultTable
INTERNAL: Aggregates use a dummy table as default.- Overrides:
extractDefaultTable
in classClassDescriptor
-
getOrderedFields
INTERNAL: Return the field order. -
getRef
INTERNAL: Get the ref for the object. This is required for use by Refs, there might be a better way to do it when objID are supported. (i.e. getting it from the object or identity map). -
getStructureName
PUBLIC: Return the name of the structure. This is the name of the user defined data type as defined on the database. -
isObjectRelationalDataTypeDescriptor
public boolean isObjectRelationalDataTypeDescriptor()PUBLIC: Return if this is an ObjectRelationalDataTypeDescriptor.- Overrides:
isObjectRelationalDataTypeDescriptor
in classClassDescriptor
-
requiresInitialization
INTERNAL: Aggregates obj-rel are initialized normally as no cloning is required.- Overrides:
requiresInitialization
in classClassDescriptor
-
validateMappingType
- Overrides:
validateMappingType
in classClassDescriptor
-
setOrderedFields
INTERNAL: Set the field order. -
setStructureName
PUBLIC: Set the name of the structure. This is the name of the user defined data type as defined on the database.
-