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,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(String rootElementName)
Add a root element name for the Descriptor
This value is stored in place of a table name
|
String |
getAlias()
Get the alias
|
CoreAttributeGroup |
getAttributeGroup(String subgraph) |
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() |
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.
|
Class |
getJavaClass()
Return the java class.
|
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(String attributeName)
Returns the mapping associated with a given attribute name.
|
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
|
Vector<String> |
getPrimaryKeyFieldNames()
Return the names of all the primary keys.
|
List<FIELD> |
getPrimaryKeyFields()
INTERNAL:
Return all the primary key fields
|
XMLSchemaReference |
getSchemaReference()
Return the SchemaReference associated with this descriptor
|
Vector |
getTableNames()
Return the table names.
|
Vector<DatabaseTable> |
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(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(Class theJavaClass)
Set the Java class that this descriptor maps.
|
void |
setJavaClassName(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(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.
|
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.
|
Object |
wrapObjectInXMLRoot(Object object,
String elementNamespaceUri,
String elementLocalName,
String elementPrefix,
String encoding,
String version,
boolean forceWrap,
boolean isNamespaceAware,
UNMARSHALLER unmarshaller)
INTERNAL:
|
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(String rootElementName)
rootElementName
- a root element to specify on this DescriptorString getAlias()
String getDefaultRootElement()
QName getDefaultRootElementType()
Field getDefaultRootElementField()
INHERITANCE_POLICY getInheritancePolicy()
INHERITANCE_POLICY getInheritancePolicyOrNull()
INSTANTIATION_POLICY getInstantiationPolicy()
Class getJavaClass()
String getJavaClassName()
ATTRIBUTE_ACCESSOR getLocationAccessor()
CORE_MAPPING getMappingForAttributeName(String attributeName)
Vector<CORE_MAPPING> getMappings()
NAMESPACE_RESOLVER getNamespaceResolver()
NAMESPACE_RESOLVER getNonNullNamespaceResolver()
OBJECT_BUILDER getObjectBuilder()
Vector<String> getPrimaryKeyFieldNames()
XMLSchemaReference getSchemaReference()
org.eclipse.persistence.oxm.schema
Vector getTableNames()
Vector<DatabaseTable> 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(String newDefaultRootElement)
newDefaultRootElement
- the default root element to specify on this ClassDescriptorvoid setInstantiationPolicy(INSTANTIATION_POLICY instantiationPolicy)
void setJavaClass(Class theJavaClass)
void setJavaClassName(String theJavaClassName)
void setLocationAccessor(ATTRIBUTE_ACCESSOR attributeAccessor)
void setNamespaceResolver(NAMESPACE_RESOLVER newNamespaceResolver)
newNamespaceResolver
- the NamespaceResolver to associate with this descriptorvoid setProperties(Map properties)
void setResultAlwaysXMLRoot(boolean resultAlwaysXMLRoot)
void setSchemaReference(XMLSchemaReference newSchemaReference)
newSchemaReference
- the SchemaReference to associate with this descriptororg.eclipse.persistence.oxm.schema
boolean shouldPreserveDocument()
Object wrapObjectInXMLRoot(Object object, String elementNamespaceUri, String elementLocalName, String elementPrefix, boolean forceWrap, boolean isNamespaceAware, UNMARSHALLER xmlUnmarshaller)
object
- elementNamespaceUri
- elementLocalName
- elementPrefix
- Object wrapObjectInXMLRoot(Object object, String elementNamespaceUri, String elementLocalName, String elementPrefix, String encoding, String version, boolean forceWrap, boolean isNamespaceAware, UNMARSHALLER unmarshaller)
Object wrapObjectInXMLRoot(UNMARSHAL_RECORD unmarshalRecord, boolean forceWrap)
unmarshalRecord
- CoreAttributeGroup getAttributeGroup(String subgraph)
EclipseLink 2.5.2, "build v20140319-9ad6abd" API Reference