public class XMLDescriptor extends ClassDescriptor
DO_NOT_SEND_CHANGES, INVALIDATE_CHANGED_OBJECTS, ISOLATE_CACHE_AFTER_TRANSACTION, ISOLATE_CACHE_ALWAYS, ISOLATE_NEW_DATA_AFTER_TRANSACTION, SEND_NEW_OBJECTS_WITH_CHANGES, SEND_OBJECT_CHANGES, shouldUseFullChangeSetsForNewObjects, UNDEFINED_ISOLATATION, UNDEFINED_OBJECT_CHANGE_BEHAVIOR, USE_SESSION_CACHE_AFTER_TRANSACTION| Constructor and Description |
|---|
XMLDescriptor()
PUBLIC:
Return a new XMLDescriptor.
|
| Modifier and Type | Method and Description |
|---|---|
DatabaseMapping |
addDirectMapping(String attributeName,
String xpathString)
PUBLIC:
Add a direct mapping to the receiver.
|
DatabaseMapping |
addDirectMapping(String attributeName,
String getMethodName,
String setMethodName,
String xpathString)
PUBLIC:
Add a direct to node mapping to the receiver.
|
void |
addPrimaryKeyField(org.eclipse.persistence.internal.helper.DatabaseField field)
ADVANCED:
Specify the primary key field of the descriptors table.
|
void |
addPrimaryKeyFieldName(String fieldName)
PUBLIC:
Specify the primary key field of the descriptors table.
|
void |
addRootElement(String rootElementName)
PUBLIC:
Add a root element name for the Descriptor
This value is stored in place of a table name
|
Vector |
buildDirectValuesFromFieldValue(Object fieldValue)
INTERNAL:
Extract the direct values from the specified field value.
|
org.eclipse.persistence.internal.helper.DatabaseField |
buildField(org.eclipse.persistence.internal.helper.DatabaseField field)
INTERNAL:
This is used only in initialization.
|
org.eclipse.persistence.internal.helper.DatabaseField |
buildField(String fieldName)
INTERNAL:
A DatabaseField is built from the given field name.
|
Object |
buildFieldValueFromDirectValues(Vector directValues,
String elementDataTypeName,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Build the appropriate field value for the specified
set of direct values.
|
Object |
buildFieldValueFromNestedRows(Vector nestedRows,
String structureName,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Build and return the appropriate field value for the specified
set of nested rows.
|
org.eclipse.persistence.internal.sessions.AbstractRecord |
buildNestedRowFromFieldValue(Object fieldValue)
INTERNAL:
Build(if necessary) and return the nested XMLRecord from the specified field value.
|
Vector |
buildNestedRowsFromFieldValue(Object fieldValue,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Build(if necessary) and return a Vector of the nested XMLRecords from the specified field value.
|
String |
getDefaultRootElement()
PUBLIC:
Return the default root element name for the ClassDescriptor
This value is stored in place of a table name
This value is mandatory for all root objects
|
XMLField |
getDefaultRootElementField() |
QName |
getDefaultRootElementType() |
InheritancePolicy |
getInheritancePolicy()
PUBLIC:
The inheritance policy is used to define how a descriptor takes part in inheritance.
|
NamespaceResolver |
getNamespaceResolver()
PUBLIC:
Return the NamespaceResolver associated with this descriptor
|
NamespaceResolver |
getNonNullNamespaceResolver() |
XMLSchemaReference |
getSchemaReference()
PUBLIC:
Return the SchemaReference associated with this descriptor
|
org.eclipse.persistence.internal.helper.DatabaseField |
getTypedField(org.eclipse.persistence.internal.helper.DatabaseField field)
INTERNAL:
searches first descriptor than its ReturningPolicy for an equal field
|
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Initialize the mappings as a separate step.
|
void |
initializeAggregateInheritancePolicy(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
This is needed by regular aggregate descriptors (because they require review);
but not by XML aggregate descriptors.
|
boolean |
isLazilyInitialized()
If true, the descriptor may be lazily initialized.
|
boolean |
isResultAlwaysXMLRoot() |
boolean |
isSequencedObject()
INTERNAL:
|
boolean |
isWrapper() |
void |
postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Post initializations after mappings are initialized.
|
void |
preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Allow the descriptor to initialize any dependencies on this session.
|
boolean |
requiresInitialization()
INTERNAL:
XML descriptors are initialized normally, since they do
not need to be cloned by XML aggregate mappings.
|
void |
setDefaultRootElement(String newDefaultRootElement)
PUBLIC:
Return the default root element name for the ClassDescriptor
This value is stored in place of a table name
This value is mandatory for all root objects
|
void |
setDefaultRootElementField(XMLField xmlField) |
void |
setDefaultRootElementType(QName type)
The default root element type string will be stored until
initialization - a QName will be created and stored on the
default root element field during initialize.
|
void |
setIsWrapper(boolean value) |
void |
setLazilyInitialized(boolean shouldLazyInitiailize)
Specify in the descriptor may be lazily initialized.
|
void |
setNamespaceResolver(NamespaceResolver newNamespaceResolver)
PUBLIC:
Set the NamespaceResolver to associate with this descriptor
|
void |
setPrimaryKeyFields(List<org.eclipse.persistence.internal.helper.DatabaseField> thePrimaryKeyFields)
INTERNAL:
Set the primary key fields
|
void |
setResultAlwaysXMLRoot(boolean resultAlwaysXMLRoot) |
void |
setSchemaReference(XMLSchemaReference newSchemaReference)
PUBLIC:
Set the SchemaReference to associate with this descriptor
|
void |
setSequencedObject(boolean isSequenced) |
void |
setShouldPreserveDocument(boolean shouldPreserveDocument)
PUBLIC:
Specifies that object built from this descriptor should retain any unmapped
information from their original XML Document when being written back out.
|
void |
setTableNames(Vector tableNames)
PUBLIC:
Specify the all table names for the class of objects the receiver describes.
|
void |
setTables(Vector<org.eclipse.persistence.internal.helper.DatabaseTable> theTables)
INTERNAL:
Sets the tables
|
boolean |
shouldPreserveDocument()
PUBLIC:
Return if unmapped information from the XML document should be maintained for this
descriptor
By default unmapped data is not preserved.
|
boolean |
shouldWrapObject(Object object,
String elementNamespaceUri,
String elementLocalName,
String elementPrefix) |
Object |
wrapObjectInXMLRoot(Object object,
String elementNamespaceUri,
String elementLocalName,
String elementPrefix,
boolean forceWrap)
INTERNAL:
Determines the appropriate object to return from the unmarshal
call.
|
Object |
wrapObjectInXMLRoot(Object object,
String elementNamespaceUri,
String elementLocalName,
String elementPrefix,
String encoding,
String version,
boolean forceWrap) |
Object |
wrapObjectInXMLRoot(UnmarshalRecord unmarshalRecord,
boolean forceWrap)
INTERNAL:
Determines the appropriate object to return from the unmarshal
call.
|
addAbstractQueryKey, addCascadeLockingPolicy, addConstraintDependencies, addConstraintDependency, addDirectQueryKey, addForeignKeyFieldForMultipleTable, addForeignKeyFieldNameForMultipleTable, addMapping, addMappingsPostCalculateChanges, addMappingsPostCalculateChangesOnDeleted, addQueryKey, addTable, addTableName, adjustMultipleTableInsertOrder, alwaysConformResultsInUnitOfWork, alwaysRefreshCache, alwaysRefreshCacheOnRemote, applyAmendmentMethod, applyAmendmentMethod, arePrimaryKeyFields, buildCallFromStatement, buildField, buildFieldValueFromForeignKeys, buildFieldValueFromNestedRow, checkInheritanceTreeAggregateSettings, clone, convertClassNamesToClasses, createCopyPolicy, createInstantiationPolicy, descriptorIsAggregate, descriptorIsAggregateCollection, descriptorIsForInterface, descriptorIsNormal, disableCacheHits, disableCacheHitsOnRemote, dontAlwaysConformResultsInUnitOfWork, dontAlwaysRefreshCache, dontAlwaysRefreshCacheOnRemote, dontDisableCacheHits, dontDisableCacheHitsOnRemote, dontOnlyRefreshCacheIfNewerVersion, getAdditionalAggregateCollectionKeyFields, getAdditionalTablePrimaryKeyFields, getAdditionalWritableMapKeyFields, getAlias, getAllFields, getAmendmentClass, getAmendmentClassName, getAmendmentMethodName, getCacheInterceptorClass, getCacheInterceptorClassName, getCacheInvalidationPolicy, 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, getHistoryPolicy, getIdentityMapClass, getIdentityMapSize, getIdValidation, getInheritancePolicyOrNull, getInstantiationPolicy, getInterfacePolicy, getInterfacePolicyOrNull, getJavaClass, getJavaClassName, getLockableMappings, getMappingForAttributeName, getMappings, getMappingsPostCalculateChanges, getMappingsPostCalculateChangesOnDeleted, getMultipleTableForeignKeyAssociations, getMultipleTableForeignKeys, getMultipleTableInsertOrder, getMultipleTablePrimaryKeyAssociations, getObjectBuilder, getObjectChangePolicy, getObjectChangePolicyInternal, getOptimisticLockingPolicy, getPreDeleteMappings, getPrimaryKeyFieldNames, getPrimaryKeyFields, getPrimaryKeyIdValidations, getProperties, getProperty, getQueryKeyNamed, getQueryKeys, getQueryManager, getRemoteIdentityMapClass, getRemoteIdentityMapSize, getReturningPolicy, getRootDescriptor, getSequence, getSequenceNumberField, getSequenceNumberFieldName, getSequenceNumberName, getSessionName, getTable, getTableName, getTableNames, getTablePerClassPolicy, getTables, getUnitOfWorkCacheIsolationLevel, getWrapperPolicy, hasCascadeLockingPolicies, hasCMPPolicy, hasDependencyOnParts, hasDerivedId, hasFetchGroupManager, hasInheritance, hasInterfacePolicy, hasMappingsPostCalculateChanges, hasMappingsPostCalculateChangesOnDeleted, hasMultipleTableConstraintDependecy, hasMultipleTables, hasPessimisticLockingPolicy, hasPreDeleteMappings, hasPrivatelyOwnedParts, hasQueryKeyOrMapping, hasRelationships, hasReturningPolicy, hasSimplePrimaryKey, hasTablePerClassPolicy, hasWrapperPolicy, initializeMultipleTablePrimaryKeyFields, interfaceInitialization, isAbstract, isAggregateCollectionDescriptor, isAggregateDescriptor, isChildDescriptor, isDescriptorForCMP, isDescriptorForInterface, isDescriptorTypeAggregate, isDescriptorTypeNormal, isFullyInitialized, isInterfaceChildDescriptor, isInvalid, isIsolated, isMultipleTableDescriptor, isNativeConnectionRequired, isObjectRelationalDataTypeDescriptor, isPrimaryKeySetAfterInsert, isReturnTypeRequiredForReturningPolicy, onlyRefreshCacheIfNewerVersion, preInterfaceInitialization, rehashFieldDependancies, reInitializeJoinedAttributes, remoteInitialization, removeMappingForAttributeName, removeProperty, setAdditionalTablePrimaryKeyFields, setAlias, setAmendmentClass, setAmendmentClassName, setAmendmentMethodName, setCacheInterceptorClass, setCacheInterceptorClassName, setCacheInvalidationPolicy, setCacheKeyType, setCacheSynchronizationType, setCMPPolicy, setConstraintDependencies, setCopyPolicy, setCopyPolicyClassName, setDefaultDeleteObjectQueryRedirector, setDefaultDeleteObjectQueryRedirectorClassName, setDefaultInsertObjectQueryRedirector, setDefaultInsertObjectQueryRedirectorClassName, setDefaultQueryRedirector, setDefaultQueryRedirectorClassName, setDefaultReadAllQueryRedirector, setDefaultReadAllQueryRedirectorClassName, setDefaultReadObjectQueryRedirector, setDefaultReadObjectQueryRedirectorClassName, setDefaultReportQueryRedirector, setDefaultReportQueryRedirectorClassName, setDefaultTable, setDefaultTableName, setDefaultUpdateObjectQueryRedirector, setDefaultUpdateObjectQueryRedirectorClassName, setDescriptorType, setDescriptorTypeValue, setEventManager, setExistenceChecking, setFetchGroupManager, setFields, setForeignKeyFieldNamesForMultipleTable, setHasMultipleTableConstraintDependecy, setHasRelationships, setHasSimplePrimaryKey, setHistoryPolicy, setIdentityMapClass, setIdentityMapSize, setIdValidation, setInheritancePolicy, setInstantiationPolicy, setInterfacePolicy, setInternalDefaultTable, setInternalDefaultTable, setIsIsolated, setIsNativeConnectionRequired, setJavaClass, setJavaClassName, setJavaInterface, setJavaInterfaceName, setLockableMappings, setMappings, setMultipleTableInsertOrder, setObjectChangePolicy, setOptimisticLockingPolicy, setPrimaryKeyFieldName, setPrimaryKeyFieldNames, setPrimaryKeyIdValidations, setProperties, setProperty, setQueryKeys, setQueryManager, setReadOnly, setRemoteIdentityMapClass, setRemoteIdentityMapSize, setReturningPolicy, setSequence, setSequenceNumberField, setSequenceNumberFieldName, setSequenceNumberName, setShouldAcquireCascadedLocks, setShouldAlwaysConformResultsInUnitOfWork, setShouldAlwaysRefreshCache, setShouldAlwaysRefreshCacheOnRemote, setShouldBeReadOnly, setShouldDisableCacheHits, setShouldDisableCacheHitsOnRemote, setShouldOnlyRefreshCacheIfNewerVersion, setShouldOrderMappings, setShouldRegisterResultsInUnitOfWork, setTableName, setTablePerClassPolicy, setTableQualifier, setUnitOfWorkCacheIsolationLevel, setWrapperPolicy, shouldAcquireCascadedLocks, shouldAlwaysConformResultsInUnitOfWork, shouldAlwaysRefreshCache, shouldAlwaysRefreshCacheOnRemote, shouldBeReadOnly, shouldDisableCacheHits, shouldDisableCacheHitsOnRemote, shouldIsolateObjectsInUnitOfWork, shouldIsolateObjectsInUnitOfWorkEarlyTransaction, shouldOnlyRefreshCacheIfNewerVersion, shouldOrderMappings, shouldRegisterResultsInUnitOfWork, shouldUseCacheIdentityMap, shouldUseFullChangeSetsForNewObjects, shouldUseFullIdentityMap, shouldUseHardCacheWeakIdentityMap, shouldUseNoIdentityMap, shouldUseRemoteCacheIdentityMap, shouldUseRemoteFullIdentityMap, shouldUseRemoteHardCacheWeakIdentityMap, shouldUseRemoteNoIdentityMap, shouldUseRemoteSoftCacheWeakIdentityMap, shouldUseRemoteSoftIdentityMap, shouldUseRemoteWeakIdentityMap, shouldUseSessionCacheInUnitOfWorkEarlyTransaction, shouldUseSoftCacheWeakIdentityMap, shouldUseSoftIdentityMap, shouldUseWeakIdentityMap, supportsChangeTracking, 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, useWeakIdentityMappublic String getDefaultRootElement()
public boolean shouldPreserveDocument()
public void setShouldPreserveDocument(boolean shouldPreserveDocument)
public void addRootElement(String rootElementName)
rootElementName - a root element to specify on this Descriptorpublic void setDefaultRootElement(String newDefaultRootElement)
newDefaultRootElement - the default root element to specify on this ClassDescriptorpublic NamespaceResolver getNamespaceResolver()
NamespaceResolverpublic NamespaceResolver getNonNullNamespaceResolver()
public InheritancePolicy getInheritancePolicy()
getInheritancePolicy in class ClassDescriptorpublic void setNamespaceResolver(NamespaceResolver newNamespaceResolver)
newNamespaceResolver - the NamespaceResolver to associate with this descriptorNamespaceResolverpublic XMLSchemaReference getSchemaReference()
org.eclipse.persistence.oxm.schemapublic void setSchemaReference(XMLSchemaReference newSchemaReference)
newSchemaReference - the SchemaReference to associate with this descriptororg.eclipse.persistence.oxm.schemapublic boolean isLazilyInitialized()
public void setLazilyInitialized(boolean shouldLazyInitiailize)
public org.eclipse.persistence.internal.sessions.AbstractRecord buildNestedRowFromFieldValue(Object fieldValue)
buildNestedRowFromFieldValue in class ClassDescriptorpublic Vector buildNestedRowsFromFieldValue(Object fieldValue, org.eclipse.persistence.internal.sessions.AbstractSession session)
buildNestedRowsFromFieldValue in class ClassDescriptorpublic DatabaseMapping addDirectMapping(String attributeName, String xpathString)
addDirectMapping in class ClassDescriptorattributeName - the name of an instance variable of the
class which the receiver describes.xpathString - the xpath of the xml element or attribute which corresponds
with the designated instance variable.public DatabaseMapping addDirectMapping(String attributeName, String getMethodName, String setMethodName, String xpathString)
addDirectMapping in class ClassDescriptorpublic void addPrimaryKeyFieldName(String fieldName)
ClassDescriptoraddPrimaryKeyFieldName in class ClassDescriptor#addMultipleTableForeignKeyFieldName(String, String);public void addPrimaryKeyField(org.eclipse.persistence.internal.helper.DatabaseField field)
ClassDescriptoraddPrimaryKeyField in class ClassDescriptorpublic void setPrimaryKeyFields(List<org.eclipse.persistence.internal.helper.DatabaseField> thePrimaryKeyFields)
ClassDescriptorsetPrimaryKeyFields in class ClassDescriptorpublic Vector buildDirectValuesFromFieldValue(Object fieldValue) throws DatabaseException
buildDirectValuesFromFieldValue in class ClassDescriptorDatabaseExceptionpublic Object buildFieldValueFromDirectValues(Vector directValues, String elementDataTypeName, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DatabaseException
buildFieldValueFromDirectValues in class ClassDescriptorDatabaseExceptionpublic Object buildFieldValueFromNestedRows(Vector nestedRows, String structureName, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DatabaseException
buildFieldValueFromNestedRows in class ClassDescriptorDatabaseExceptionpublic org.eclipse.persistence.internal.helper.DatabaseField buildField(String fieldName)
buildField in class ClassDescriptorpublic org.eclipse.persistence.internal.helper.DatabaseField buildField(org.eclipse.persistence.internal.helper.DatabaseField field)
buildField in class ClassDescriptorpublic void initializeAggregateInheritancePolicy(org.eclipse.persistence.internal.sessions.AbstractSession session)
initializeAggregateInheritancePolicy in class ClassDescriptorpublic void setTableNames(Vector tableNames)
ClassDescriptorsetTableNames in class ClassDescriptorpublic void setTables(Vector<org.eclipse.persistence.internal.helper.DatabaseTable> theTables)
setTables in class ClassDescriptorpublic void preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
preInitialize in class ClassDescriptorDescriptorExceptionpublic void postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
postInitialize in class ClassDescriptorDescriptorExceptionpublic void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
initialize in class ClassDescriptorDescriptorExceptionpublic boolean requiresInitialization()
requiresInitialization in class ClassDescriptorpublic Object wrapObjectInXMLRoot(UnmarshalRecord unmarshalRecord, boolean forceWrap)
unmarshalRecord - public Object wrapObjectInXMLRoot(Object object, String elementNamespaceUri, String elementLocalName, String elementPrefix, boolean forceWrap)
object - elementNamespaceUri - elementLocalName - elementPrefix - public Object wrapObjectInXMLRoot(Object object, String elementNamespaceUri, String elementLocalName, String elementPrefix, String encoding, String version, boolean forceWrap)
public boolean shouldWrapObject(Object object, String elementNamespaceUri, String elementLocalName, String elementPrefix)
public XMLField getDefaultRootElementField()
public void setDefaultRootElementField(XMLField xmlField)
public QName getDefaultRootElementType()
public void setDefaultRootElementType(QName type)
type - public boolean isSequencedObject()
Indicates if the Object mapped by this descriptor is a sequenced data object and should be marshalled accordingly.
public void setSequencedObject(boolean isSequenced)
public boolean isWrapper()
public void setIsWrapper(boolean value)
public boolean isResultAlwaysXMLRoot()
public void setResultAlwaysXMLRoot(boolean resultAlwaysXMLRoot)
public org.eclipse.persistence.internal.helper.DatabaseField getTypedField(org.eclipse.persistence.internal.helper.DatabaseField field)
ClassDescriptorgetTypedField in class ClassDescriptor