Top Methods
org.eclipse.persistence.internal.oxm.mappings

public Interface Descriptor<ATTRIBUTE_ACCESSOR extends CoreAttributeAccessor, CORE_MAPPING extends CoreMapping<ATTRIBUTE_ACCESSOR extends CoreAttributeAccessor, ABSTRACT_SESSION extends CoreAbstractSession, CONTAINER_POLICY extends CoreContainerPolicy, DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, FIELD extends CoreField>, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy<ABSTRACT_RECORD extends CoreAbstractRecord, ABSTRACT_SESSION extends CoreAbstractSession, DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, FIELD extends CoreField>, INSTANTIATION_POLICY extends CoreInstantiationPolicy, NAMESPACE_RESOLVER extends NamespaceResolver, OBJECT_BUILDER extends CoreObjectBuilder<ABSTRACT_RECORD extends CoreAbstractRecord, ABSTRACT_SESSION extends CoreAbstractSession, FIELD extends CoreField, MAPPING extends CoreMapping<ATTRIBUTE_ACCESSOR extends CoreAttributeAccessor, ABSTRACT_SESSION extends CoreAbstractSession, CONTAINER_POLICY extends CoreContainerPolicy, DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, FIELD extends CoreField>>, TABLE extends CoreTable, UNMARSHAL_RECORD extends UnmarshalRecord, UNMARSHALLER extends Unmarshaller<ABSTRACT_SESSION extends CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>>, CONTEXT extends Context<ABSTRACT_SESSION extends CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>>, DESCRIPTOR extends Descriptor<?, ?, ?, ?, ?, NAMESPACE_RESOLVER, ?, ?, ?, ?>, FIELD extends Field, NAMESPACE_RESOLVER extends NamespaceResolver, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION extends CoreSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager>, SESSION_EVENT_LISTENER extends CoreSessionEventListener>, DESCRIPTOR extends Descriptor, ID_RESOLVER extends IDResolver, MEDIA_TYPE extends MediaType, ROOT extends Root, UNMARSHALLER_HANDLER extends UnmarshallerHandler, UNMARSHALLER_LISTENER extends Unmarshaller.Listener>>

Known Direct Implementers
org.eclipse.persistence.oxm.XMLDescriptor
Imports
java.util.List, .Map, .Vector, javax.xml.namespace.QName, org.eclipse.persistence.core.descriptors.CoreInheritancePolicy, org.eclipse.persistence.core.mappings.CoreAttributeAccessor, .CoreMapping, org.eclipse.persistence.core.queries.CoreAttributeGroup, org.eclipse.persistence.internal.core.descriptors.CoreInstantiationPolicy, .CoreObjectBuilder, org.eclipse.persistence.internal.core.helper.CoreField, .CoreTable, org.eclipse.persistence.internal.oxm.NamespaceResolver, .Unmarshaller, org.eclipse.persistence.internal.oxm.record.UnmarshalRecord, org.eclipse.persistence.oxm.schema.XMLSchemaReference

Method Summary

Modifier and TypeMethod and Description
public CORE_MAPPING
addMapping(CORE_MAPPING mapping)

Add a database mapping to the receiver.

public void
addPrimaryKeyField(FIELD field)

ADVANCED: Specify the primary key field of the descriptors table.

public void
addRootElement(String
a root element to specify on this Descriptor
rootElementName
)

Add a root element name for the Descriptor This value is stored in place of a table name

public String
getAlias()

Get the alias

public CoreAttributeGroup<ATTRIBUTE_ITEM extends CoreAttributeItem, DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>>
public String

Returns:

the default root element specified on this ClassDescriptor
getDefaultRootElement
()

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

public Field<CONVERSION_MANAGER extends ConversionManager, NAMESPACE_RESOLVER extends NamespaceResolver>
public QName
public INHERITANCE_POLICY
getInheritancePolicy()

The inheritance policy is used to define how a descriptor takes part in inheritance.

public INHERITANCE_POLICY
getInheritancePolicyOrNull()

INTERNAL: Return the inheritance policy.

public INSTANTIATION_POLICY
getInstantiationPolicy()

INTERNAL: Returns the instantiation policy.

public <T> Class<T>
getJavaClass()

Return the java class.

public String
getJavaClassName()

Return the class name, used by the MW.

public ATTRIBUTE_ACCESSOR
getLocationAccessor()

INTERNAL: Returns this Descriptor's location accessor, if one is defined.

public CORE_MAPPING
getMappingForAttributeName(String attributeName)

Returns the mapping associated with a given attribute name.

public Vector<CORE_MAPPING>
getMappings()

Returns mappings

public NAMESPACE_RESOLVER

Returns:

the NamespaceResolver associated with this descriptor
getNamespaceResolver
()

Return the NamespaceResolver associated with this descriptor

public NAMESPACE_RESOLVER
public OBJECT_BUILDER
getObjectBuilder()

INTERNAL: Return the object builder

public Vector<String>
getPrimaryKeyFieldNames()

Return the names of all the primary keys.

public List<FIELD>
getPrimaryKeyFields()

INTERNAL: Return all the primary key fields

public XMLSchemaReference

Returns:

the SchemaReference associated with this descriptor
getSchemaReference
()

Return the SchemaReference associated with this descriptor

public Vector<E>
getTableNames()

Return the table names.

public Vector<TABLE>
getTables()

INTERNAL: Return all the tables.

public FIELD
getTypedField(FIELD field)

INTERNAL: searches first descriptor than its ReturningPolicy for an equal field

public boolean
hasInheritance()

INTERNAL: Return if this descriptor is involved in inheritance, (is child or parent).

public boolean
isLazilyInitialized()

If true, the descriptor may be lazily initialized.

public boolean
public boolean
isSequencedObject()

INTERNAL:

Indicates if the Object mapped by this descriptor is a sequenced data object and should be marshalled accordingly.

public boolean
public void
setDefaultRootElement(String
the default root element to specify on this ClassDescriptor
newDefaultRootElement
)

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

public void
setInstantiationPolicy(INSTANTIATION_POLICY instantiationPolicy)

INTERNAL: Sets the instantiation policy.

public void
setJavaClass(Class<?> theJavaClass)

Set the Java class that this descriptor maps.

public void
setJavaClassName(String theJavaClassName)

INTERNAL: Return the java class name, used by the MW.

public void
setLocationAccessor(ATTRIBUTE_ACCESSOR attributeAccessor)

INTERNAL: Set this Descriptor's location accessor.

public void
setNamespaceResolver(NAMESPACE_RESOLVER
the NamespaceResolver to associate with this descriptor
newNamespaceResolver
)

Set the NamespaceResolver to associate with this descriptor

public void
setProperties(Map<K, V> properties)

INTERNAL: Set the user defined properties.

public void
setResultAlwaysXMLRoot(boolean resultAlwaysXMLRoot)

public void
setSchemaReference(XMLSchemaReference
the SchemaReference to associate with this descriptor
newSchemaReference
)

Set the SchemaReference to associate with this descriptor

public boolean

Returns:

if this descriptor should preserve unmapped data
shouldPreserveDocument
()

Return if unmapped information from the XML document should be maintained for this descriptor By default unmapped data is not preserved.

public Object

Returns:

object
wrapObjectInXMLRoot
(Object object, String elementNamespaceUri, String elementLocalName, String elementPrefix, boolean forceWrap, boolean isNamespaceAware, UNMARSHALLER xmlUnmarshaller)

INTERNAL: Determines the appropriate object to return from the unmarshal call.

public Object
wrapObjectInXMLRoot(Object object, String elementNamespaceUri, String elementLocalName, String elementPrefix, String encoding, String version, boolean forceWrap, boolean isNamespaceAware, UNMARSHALLER unmarshaller)

INTERNAL:

public Object

Returns:

object
wrapObjectInXMLRoot
(UNMARSHAL_RECORD unmarshalRecord, boolean forceWrap)

INTERNAL: Determines the appropriate object to return from the unmarshal call.

Method Detail

addMappingback to summary
public CORE_MAPPING addMapping(CORE_MAPPING mapping)

Add a database mapping to the receiver. Perform any required initialization of both the mapping and the receiving descriptor as a result of adding the new mapping.

addPrimaryKeyFieldback to summary
public void addPrimaryKeyField(FIELD field)

ADVANCED: Specify the primary key field of the descriptors table. This should be called for each field that makes up the primary key of the table. This can be used for advanced field types, such as XML nodes, or to set the field type.

addRootElementback to summary
public void addRootElement(String rootElementName)

Add a root element name for the Descriptor This value is stored in place of a table name

Parameters
rootElementName:String

a root element to specify on this Descriptor

getAliasback to summary
public String getAlias()

Get the alias

getAttributeGroupback to summary
public CoreAttributeGroup<ATTRIBUTE_ITEM extends CoreAttributeItem, DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>> getAttributeGroup(String subgraph)
getDefaultRootElementback to summary
public String getDefaultRootElement()

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

Returns:String

the default root element specified on this ClassDescriptor

getDefaultRootElementFieldback to summary
public Field<CONVERSION_MANAGER extends ConversionManager, NAMESPACE_RESOLVER extends NamespaceResolver> getDefaultRootElementField()
getDefaultRootElementTypeback to summary
public QName getDefaultRootElementType()
getInheritancePolicyback to summary
public INHERITANCE_POLICY getInheritancePolicy()

The inheritance policy is used to define how a descriptor takes part in inheritance. All inheritance properties for both child and parent classes is configured in inheritance policy. Caution must be used in using this method as it lazy initializes an inheritance policy. Calling this on a descriptor that does not use inheritance will cause problems, #hasInheritance() must always first be called.

getInheritancePolicyOrNullback to summary
public INHERITANCE_POLICY getInheritancePolicyOrNull()

INTERNAL: Return the inheritance policy.

getInstantiationPolicyback to summary
public INSTANTIATION_POLICY getInstantiationPolicy()

INTERNAL: Returns the instantiation policy.

getJavaClassback to summary
public <T> Class<T> getJavaClass()

Return the java class.

getJavaClassNameback to summary
public String getJavaClassName()

Return the class name, used by the MW.

getLocationAccessorback to summary
public ATTRIBUTE_ACCESSOR getLocationAccessor()

INTERNAL: Returns this Descriptor's location accessor, if one is defined.

getMappingForAttributeNameback to summary
public CORE_MAPPING getMappingForAttributeName(String attributeName)

Returns the mapping associated with a given attribute name. This can be used to find a descriptors mapping in a amendment method before the descriptor has been initialized.

getMappingsback to summary
public Vector<CORE_MAPPING> getMappings()

Returns mappings

getNamespaceResolverback to summary
public NAMESPACE_RESOLVER getNamespaceResolver()

Return the NamespaceResolver associated with this descriptor

Returns:NAMESPACE_RESOLVER

the NamespaceResolver associated with this descriptor

getNonNullNamespaceResolverback to summary
public NAMESPACE_RESOLVER getNonNullNamespaceResolver()
getObjectBuilderback to summary
public OBJECT_BUILDER getObjectBuilder()

INTERNAL: Return the object builder

getPrimaryKeyFieldNamesback to summary
public Vector<String> getPrimaryKeyFieldNames()

Return the names of all the primary keys.

getPrimaryKeyFieldsback to summary
public List<FIELD> getPrimaryKeyFields()

INTERNAL: Return all the primary key fields

getSchemaReferenceback to summary
public XMLSchemaReference getSchemaReference()

Return the SchemaReference associated with this descriptor

Returns:XMLSchemaReference

the SchemaReference associated with this descriptor

See Also
org.eclipse.persistence.oxm.schema
getTableNamesback to summary
public Vector<E> getTableNames()

Return the table names.

getTablesback to summary
public Vector<TABLE> getTables()

INTERNAL: Return all the tables.

getTypedFieldback to summary
public FIELD getTypedField(FIELD field)

INTERNAL: searches first descriptor than its ReturningPolicy for an equal field

hasInheritanceback to summary
public boolean hasInheritance()

INTERNAL: Return if this descriptor is involved in inheritance, (is child or parent).

Note

If this class is part of table per class inheritance strategy this method will return false.

isLazilyInitializedback to summary
public boolean isLazilyInitialized()

If true, the descriptor may be lazily initialized. This is useful if the descriptor may not get used.

isResultAlwaysXMLRootback to summary
public boolean isResultAlwaysXMLRoot()
isSequencedObjectback to summary
public boolean isSequencedObject()

INTERNAL:

Indicates if the Object mapped by this descriptor is a sequenced data object and should be marshalled accordingly.

isWrapperback to summary
public boolean isWrapper()
setDefaultRootElementback to summary
public void setDefaultRootElement(String newDefaultRootElement)

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

Parameters
newDefaultRootElement:String

the default root element to specify on this ClassDescriptor

setInstantiationPolicyback to summary
public void setInstantiationPolicy(INSTANTIATION_POLICY instantiationPolicy)

INTERNAL: Sets the instantiation policy.

setJavaClassback to summary
public void setJavaClass(Class<?> theJavaClass)

Set the Java class that this descriptor maps. Every descriptor maps one and only one class.

setJavaClassNameback to summary
public void setJavaClassName(String theJavaClassName)

INTERNAL: Return the java class name, used by the MW.

setLocationAccessorback to summary
public void setLocationAccessor(ATTRIBUTE_ACCESSOR attributeAccessor)

INTERNAL: Set this Descriptor's location accessor.

setNamespaceResolverback to summary
public void setNamespaceResolver(NAMESPACE_RESOLVER newNamespaceResolver)

Set the NamespaceResolver to associate with this descriptor

Parameters
newNamespaceResolver:NAMESPACE_RESOLVER

the NamespaceResolver to associate with this descriptor

setPropertiesback to summary
public void setProperties(Map<K, V> properties)

INTERNAL: Set the user defined properties.

setResultAlwaysXMLRootback to summary
public void setResultAlwaysXMLRoot(boolean resultAlwaysXMLRoot)
setSchemaReferenceback to summary
public void setSchemaReference(XMLSchemaReference newSchemaReference)

Set the SchemaReference to associate with this descriptor

Parameters
newSchemaReference:XMLSchemaReference

the SchemaReference to associate with this descriptor

See Also
org.eclipse.persistence.oxm.schema
shouldPreserveDocumentback to summary
public boolean shouldPreserveDocument()

Return if unmapped information from the XML document should be maintained for this descriptor By default unmapped data is not preserved.

Returns:boolean

if this descriptor should preserve unmapped data

wrapObjectInXMLRootback to summary
public Object wrapObjectInXMLRoot(Object object, String elementNamespaceUri, String elementLocalName, String elementPrefix, boolean forceWrap, boolean isNamespaceAware, UNMARSHALLER xmlUnmarshaller)

INTERNAL: Determines the appropriate object to return from the unmarshal call. The method will either return the object created in the xmlReader.parse() call or an instance of XMLRoot. An XMLRoot instance will be returned if the DOMRecord element being unmarshalled does not equal the descriptor's default root element.

Returns:Object

object

wrapObjectInXMLRootback to summary
public Object wrapObjectInXMLRoot(Object object, String elementNamespaceUri, String elementLocalName, String elementPrefix, String encoding, String version, boolean forceWrap, boolean isNamespaceAware, UNMARSHALLER unmarshaller)

INTERNAL:

wrapObjectInXMLRootback to summary
public Object wrapObjectInXMLRoot(UNMARSHAL_RECORD unmarshalRecord, boolean forceWrap)

INTERNAL: Determines the appropriate object to return from the unmarshal call. The method will either return the object created in the xmlReader.parse() call or an instance of XMLRoot. An XMLRoot instance will be returned if the DOMRecord element being unmarshalled does not equal the descriptor's default root element.

Returns:Object

object