public interface Descriptor<ATTRIBUTE_ACCESSOR extends CoreAttributeAccessor,CORE_MAPPING extends CoreMapping,FIELD extends CoreField,INHERITANCE_POLICY extends CoreInheritancePolicy,INSTANTIATION_POLICY extends CoreInstantiationPolicy,NAMESPACE_RESOLVER extends NamespaceResolver,OBJECT_BUILDER extends CoreObjectBuilder,TABLE extends CoreTable,UNMARSHAL_RECORD extends UnmarshalRecord,UNMARSHALLER extends Unmarshaller>
Modifier and Type | Method and Description |
---|---|
CORE_MAPPING |
addMapping(CORE_MAPPING mapping)
Add a database mapping to the receiver.
|
void |
addPrimaryKeyField(FIELD field)
ADVANCED:
Specify the primary key field of the descriptors table.
|
void |
addRootElement(java.lang.String rootElementName)
Add a root element name for the Descriptor
This value is stored in place of a table name
|
java.lang.String |
getAlias()
Get the alias
|
CoreAttributeGroup |
getAttributeGroup(java.lang.String subgraph) |
java.lang.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
|
Field |
getDefaultRootElementField() |
javax.xml.namespace.QName |
getDefaultRootElementType() |
INHERITANCE_POLICY |
getInheritancePolicy()
The inheritance policy is used to define how a descriptor takes part in inheritance.
|
INHERITANCE_POLICY |
getInheritancePolicyOrNull()
INTERNAL:
Return the inheritance policy.
|
INSTANTIATION_POLICY |
getInstantiationPolicy()
INTERNAL:
Returns the instantiation policy.
|
java.lang.Class |
getJavaClass()
Return the java class.
|
java.lang.String |
getJavaClassName()
Return the class name, used by the MW.
|
ATTRIBUTE_ACCESSOR |
getLocationAccessor()
INTERNAL:
Returns this Descriptor's location accessor, if one is defined.
|
CORE_MAPPING |
getMappingForAttributeName(java.lang.String attributeName)
Returns the mapping associated with a given attribute name.
|
java.util.Vector<CORE_MAPPING> |
getMappings()
Returns mappings
|
NAMESPACE_RESOLVER |
getNamespaceResolver()
Return the NamespaceResolver associated with this descriptor
|
NAMESPACE_RESOLVER |
getNonNullNamespaceResolver() |
OBJECT_BUILDER |
getObjectBuilder()
INTERNAL:
Return the object builder
|
java.util.Vector<java.lang.String> |
getPrimaryKeyFieldNames()
Return the names of all the primary keys.
|
java.util.List<FIELD> |
getPrimaryKeyFields()
INTERNAL:
Return all the primary key fields
|
XMLSchemaReference |
getSchemaReference()
Return the SchemaReference associated with this descriptor
|
java.util.Vector |
getTableNames()
Return the table names.
|
java.util.Vector<TABLE> |
getTables()
INTERNAL:
Return all the tables.
|
FIELD |
getTypedField(FIELD field)
INTERNAL:
searches first descriptor than its ReturningPolicy for an equal field
|
boolean |
hasInheritance()
INTERNAL:
Return if this descriptor is involved in inheritance, (is child or parent).
|
boolean |
isLazilyInitialized()
If true, the descriptor may be lazily initialized.
|
boolean |
isResultAlwaysXMLRoot() |
boolean |
isSequencedObject()
INTERNAL:
|
boolean |
isWrapper() |
void |
setDefaultRootElement(java.lang.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
|
void |
setInstantiationPolicy(INSTANTIATION_POLICY instantiationPolicy)
INTERNAL:
Sets the instantiation policy.
|
void |
setJavaClass(java.lang.Class theJavaClass)
Set the Java class that this descriptor maps.
|
void |
setJavaClassName(java.lang.String theJavaClassName)
INTERNAL:
Return the java class name, used by the MW.
|
void |
setLocationAccessor(ATTRIBUTE_ACCESSOR attributeAccessor)
INTERNAL:
Set this Descriptor's location accessor.
|
void |
setNamespaceResolver(NAMESPACE_RESOLVER newNamespaceResolver)
Set the NamespaceResolver to associate with this descriptor
|
void |
setProperties(java.util.Map properties)
INTERNAL:
Set the user defined properties.
|
void |
setResultAlwaysXMLRoot(boolean resultAlwaysXMLRoot) |
void |
setSchemaReference(XMLSchemaReference newSchemaReference)
Set the SchemaReference to associate with this descriptor
|
boolean |
shouldPreserveDocument()
Return if unmapped information from the XML document should be maintained for this
descriptor
By default unmapped data is not preserved.
|
java.lang.Object |
wrapObjectInXMLRoot(java.lang.Object object,
java.lang.String elementNamespaceUri,
java.lang.String elementLocalName,
java.lang.String elementPrefix,
boolean forceWrap,
boolean isNamespaceAware,
UNMARSHALLER xmlUnmarshaller)
INTERNAL:
Determines the appropriate object to return from the unmarshal
call.
|
java.lang.Object |
wrapObjectInXMLRoot(java.lang.Object object,
java.lang.String elementNamespaceUri,
java.lang.String elementLocalName,
java.lang.String elementPrefix,
java.lang.String encoding,
java.lang.String version,
boolean forceWrap,
boolean isNamespaceAware,
UNMARSHALLER unmarshaller)
INTERNAL:
|
java.lang.Object |
wrapObjectInXMLRoot(UNMARSHAL_RECORD unmarshalRecord,
boolean forceWrap)
INTERNAL:
Determines the appropriate object to return from the unmarshal
call.
|
CORE_MAPPING addMapping(CORE_MAPPING mapping)
void addPrimaryKeyField(FIELD field)
void addRootElement(java.lang.String rootElementName)
rootElementName
- a root element to specify on this Descriptorjava.lang.String getAlias()
java.lang.String getDefaultRootElement()
javax.xml.namespace.QName getDefaultRootElementType()
Field getDefaultRootElementField()
INHERITANCE_POLICY getInheritancePolicy()
INHERITANCE_POLICY getInheritancePolicyOrNull()
INSTANTIATION_POLICY getInstantiationPolicy()
java.lang.Class getJavaClass()
java.lang.String getJavaClassName()
ATTRIBUTE_ACCESSOR getLocationAccessor()
CORE_MAPPING getMappingForAttributeName(java.lang.String attributeName)
java.util.Vector<CORE_MAPPING> getMappings()
NAMESPACE_RESOLVER getNamespaceResolver()
NAMESPACE_RESOLVER getNonNullNamespaceResolver()
OBJECT_BUILDER getObjectBuilder()
java.util.Vector<java.lang.String> getPrimaryKeyFieldNames()
java.util.List<FIELD> getPrimaryKeyFields()
XMLSchemaReference getSchemaReference()
org.eclipse.persistence.oxm.schema
java.util.Vector getTableNames()
java.util.Vector<TABLE> getTables()
FIELD getTypedField(FIELD field)
boolean hasInheritance()
hasTablePerClassPolicy()
boolean isLazilyInitialized()
boolean isResultAlwaysXMLRoot()
boolean isSequencedObject()
Indicates if the Object mapped by this descriptor is a sequenced data object and should be marshalled accordingly.
boolean isWrapper()
void setDefaultRootElement(java.lang.String newDefaultRootElement)
newDefaultRootElement
- the default root element to specify on this ClassDescriptorvoid setInstantiationPolicy(INSTANTIATION_POLICY instantiationPolicy)
void setJavaClass(java.lang.Class theJavaClass)
void setJavaClassName(java.lang.String theJavaClassName)
void setLocationAccessor(ATTRIBUTE_ACCESSOR attributeAccessor)
void setNamespaceResolver(NAMESPACE_RESOLVER newNamespaceResolver)
newNamespaceResolver
- the NamespaceResolver to associate with this descriptorvoid setProperties(java.util.Map properties)
void setResultAlwaysXMLRoot(boolean resultAlwaysXMLRoot)
void setSchemaReference(XMLSchemaReference newSchemaReference)
newSchemaReference
- the SchemaReference to associate with this descriptororg.eclipse.persistence.oxm.schema
boolean shouldPreserveDocument()
java.lang.Object wrapObjectInXMLRoot(java.lang.Object object, java.lang.String elementNamespaceUri, java.lang.String elementLocalName, java.lang.String elementPrefix, boolean forceWrap, boolean isNamespaceAware, UNMARSHALLER xmlUnmarshaller)
object
- elementNamespaceUri
- elementLocalName
- elementPrefix
- java.lang.Object wrapObjectInXMLRoot(java.lang.Object object, java.lang.String elementNamespaceUri, java.lang.String elementLocalName, java.lang.String elementPrefix, java.lang.String encoding, java.lang.String version, boolean forceWrap, boolean isNamespaceAware, UNMARSHALLER unmarshaller)
java.lang.Object wrapObjectInXMLRoot(UNMARSHAL_RECORD unmarshalRecord, boolean forceWrap)
unmarshalRecord
- CoreAttributeGroup getAttributeGroup(java.lang.String subgraph)
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference