|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) B32476-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.toplink.descriptors.ClassDescriptor oracle.toplink.ox.XMLDescriptor
public class XMLDescriptor
Use an XML project for nontransactional, nonpersistent (in-memory) conversions between Java objects and XML documents. An XMLDescriptor is a set of mappings that describe how an objects's data is to be represented in an XML document. XML descriptors describe Java objects that you map to simple and complex types defined by an XML schema document (XSD). Using XML descriptors in a TopLink XML project, you can configure XML mappings.
oracle.toplink.ox.mappings
,
Serialized FormField Summary |
---|
Fields inherited from class oracle.toplink.descriptors.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, UNDEFINED_ISOLATATION, UNDEFINED_OBJECT_CHANGE_BEHAVIOR, USE_SESSION_CACHE_AFTER_TRANSACTION |
Constructor Summary | |
---|---|
XMLDescriptor()
Return a new XMLDescriptor. |
Method Summary | |
---|---|
DatabaseMapping |
addDirectMapping(java.lang.String attributeName,
java.lang.String xpathString)
Add a direct mapping to the receiver. |
DatabaseMapping |
addDirectMapping(java.lang.String attributeName,
java.lang.String getMethodName,
java.lang.String setMethodName,
java.lang.String xpathString)
Add a direct to node mapping to the receiver. |
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 |
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 |
XMLField |
getDefaultRootElementField()
|
javax.xml.namespace.QName |
getDefaultRootElementType()
|
InheritancePolicy |
getInheritancePolicy()
The inheritance policy is used to define how a descriptor takes part in inheritance. |
NamespaceResolver |
getNamespaceResolver()
Return the NamespaceResolver associated with this descriptor |
NamespaceResolver |
getNonNullNamespaceResolver()
|
XMLSchemaReference |
getSchemaReference()
Return the SchemaReference associated with this descriptor |
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 |
setDefaultRootElementField(XMLField xmlField)
|
void |
setDefaultRootElementType(javax.xml.namespace.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 |
setNamespaceResolver(NamespaceResolver newNamespaceResolver)
Set the NamespaceResolver to associate with this descriptor |
void |
setSchemaReference(XMLSchemaReference newSchemaReference)
Set the SchemaReference to associate with this descriptor |
void |
setSequencedObject(boolean isSequenced)
|
void |
setShouldPreserveDocument(boolean shouldPreserveDocument)
Specifies that object built from this descriptor should retain any unmapped information from their original XML Document when being written back out. |
boolean |
shouldPreserveDocument()
Return if unmapped information from the XML document should be maintained for this descriptor By default unmapped data is not preserved. |
boolean |
shouldWrapObject(java.lang.Object object,
java.lang.String elementNamespaceUri,
java.lang.String elementLocalName,
java.lang.String 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)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XMLDescriptor()
Method Detail |
---|
public java.lang.String getDefaultRootElement()
public boolean shouldPreserveDocument()
public void setShouldPreserveDocument(boolean shouldPreserveDocument)
public void addRootElement(java.lang.String rootElementName)
rootElementName
- a root element to specify on this Descriptorpublic void setDefaultRootElement(java.lang.String newDefaultRootElement)
newDefaultRootElement
- the default root element to specify on this ClassDescriptorpublic NamespaceResolver getNamespaceResolver()
NamespaceResolver
public NamespaceResolver getNonNullNamespaceResolver()
public InheritancePolicy getInheritancePolicy()
getInheritancePolicy
in class ClassDescriptor
public void setNamespaceResolver(NamespaceResolver newNamespaceResolver)
newNamespaceResolver
- the NamespaceResolver to associate with this descriptorNamespaceResolver
public XMLSchemaReference getSchemaReference()
oracle.toplink.ox.schema
public void setSchemaReference(XMLSchemaReference newSchemaReference)
newSchemaReference
- the SchemaReference to associate with this descriptororacle.toplink.ox.schema
public DatabaseMapping addDirectMapping(java.lang.String attributeName, java.lang.String xpathString)
addDirectMapping
in class ClassDescriptor
attributeName
- 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(java.lang.String attributeName, java.lang.String getMethodName, java.lang.String setMethodName, java.lang.String xpathString)
addDirectMapping
in class ClassDescriptor
public 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)
public boolean shouldWrapObject(java.lang.Object object, java.lang.String elementNamespaceUri, java.lang.String elementLocalName, java.lang.String elementPrefix)
public XMLField getDefaultRootElementField()
public void setDefaultRootElementField(XMLField xmlField)
public javax.xml.namespace.QName getDefaultRootElementType()
public void setDefaultRootElementType(javax.xml.namespace.QName type)
type
- public void setSequencedObject(boolean isSequenced)
public boolean isWrapper()
public void setIsWrapper(boolean value)
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |