Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle TopLink API Reference 10g Release 3 (10.1.3) B13698-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.toplink.ox
Class XMLDescriptor

`java.lang.Object
RootDescriptor
oracle.toplink.descriptors.ClassDescriptor
oracle.toplink.ox.XMLDescriptor`

public class XMLDescriptor
extends ClassDescriptor

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.

See Also:
  `oracle.toplink.ox.mappings`, Serialized Form

Constructor Summary
`XMLDescriptor()` PUBLIC: Return a new XMLDescriptor.

Method Summary
`DatabaseMapping` | `addDirectMapping(java.lang.String attributeName, java.lang.String xpathString)` PUBLIC: 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)` PUBLIC: Add a direct to node mapping to the receiver.
`java.lang.String` | `getDefaultRootElement()` PUBLIC: Return the default root element name for the Descriptor This value is stored in place of a table name This value is mandatory for all root objects
`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
`XMLSchemaReference` | `getSchemaReference()` PUBLIC: Return the SchemaReference associated with this descriptor
`void` | `setDefaultRootElement(java.lang.String newDefaultRootElement)` PUBLIC: Return the default root element name for the Descriptor This value is stored in place of a table name This value is mandatory for all root objects
`void` | `setNamespaceResolver(NamespaceResolver newNamespaceResolver)` PUBLIC: Set the NamespaceResolver to associate with this descriptor
`void` | `setSchemaReference(XMLSchemaReference newSchemaReference)` PUBLIC: Set the SchemaReference to associate with this descriptor
`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.
`boolean` | `shouldPreserveDocument()` PUBLIC: Return if unmapped information from the XML document should be maintained for this descriptor By default unmapped data is not preserved.

Methods inherited from class oracle.toplink.descriptors.ClassDescriptor
`addAbstractQueryKey, addConstraintDependencies, addDirectQueryKey, addMapping, addMultipleTableForeignKeyFieldName, addMultipleTablePrimaryKeyFieldName, addPrimaryKeyField, addPrimaryKeyFieldName, addQueryKey, alwaysConformResultsInUnitOfWork, alwaysRefreshCache, alwaysRefreshCacheOnRemote, applyAmendmentMethod, createCopyPolicy, createInstantiationPolicy, descriptorIsAggregate, descriptorIsAggregateCollection, descriptorIsForInterface, descriptorIsNormal, disableCacheHits, disableCacheHitsOnRemote, dontAlwaysConformResultsInUnitOfWork, dontAlwaysRefreshCache, dontAlwaysRefreshCacheOnRemote, dontDisableCacheHits, dontDisableCacheHitsOnRemote, dontOnlyRefreshCacheIfNewerVersion, getAlias, getAmendmentClass, getAmendmentMethodName, getCacheInvalidationPolicy, getCacheSynchronizationType, getCMPPolicy, getConstraintDependencies, getDescriptorEventManager, getDescriptorInheritancePolicy, getDescriptorQueryManager, getDescriptorType, getFetchGroupManager, getHistoryPolicy, getIdentityMapSize, getInterfacePolicy, getJavaClass, getMappingForAttributeName, getMappings, getObjectChangePolicy, getOptimisticLockingPolicy, getPrimaryKeyFieldNames, getProperties, getProperty, getQueryKeys, getRemoteIdentityMapSize, getReturningPolicy, getSequenceNumberFieldName, getSequenceNumberName, getWrapperPolicy, isAggregateCollectionDescriptor, isAggregateDescriptor, isChildDescriptor, isDescriptorForInterface, isIsolated, onlyRefreshCacheIfNewerVersion, removeProperty, setAlias, setAmendmentClass, setAmendmentMethodName, setCacheInvalidationPolicy, setCacheSynchronizationType, setCMPPolicy, setDescriptorType, setFetchGroupManager, setHistoryPolicy, setIdentityMapClass, setIdentityMapSize, setIsIsolated, setJavaClass, setJavaInterface, setObjectChangePolicy, setOptimisticLockingPolicy, setPrimaryKeyFieldName, setPrimaryKeyFieldNames, setProperty, setReadOnly, setRemoteIdentityMapClass, setRemoteIdentityMapSize, setReturningPolicy, setSequenceNumberFieldName, setSequenceNumberName, setShouldAlwaysConformResultsInUnitOfWork, setShouldAlwaysRefreshCache, setShouldAlwaysRefreshCacheOnRemote, setShouldBeReadOnly, setShouldDisableCacheHits, setShouldDisableCacheHitsOnRemote, setShouldOnlyRefreshCacheIfNewerVersion, setShouldOrderMappings, setWrapperPolicy, shouldAlwaysConformResultsInUnitOfWork, shouldAlwaysRefreshCache, shouldAlwaysRefreshCacheOnRemote, shouldBeReadOnly, shouldDisableCacheHits, shouldDisableCacheHitsOnRemote, shouldOnlyRefreshCacheIfNewerVersion, shouldUseCacheIdentityMap, shouldUseFullIdentityMap, shouldUseHardCacheWeakIdentityMap, shouldUseNoIdentityMap, shouldUseRemoteCacheIdentityMap, shouldUseRemoteFullIdentityMap, shouldUseRemoteHardCacheWeakIdentityMap, shouldUseRemoteNoIdentityMap, shouldUseRemoteSoftCacheWeakIdentityMap, shouldUseRemoteWeakIdentityMap, shouldUseSoftCacheWeakIdentityMap, shouldUseWeakIdentityMap, useAllFieldsLocking, useCacheIdentityMap, useChangedFieldsLocking, useCloneCopyPolicy, useCloneCopyPolicy, useDefaultConstructorInstantiationPolicy, useFactoryInstantiationPolicy, useFactoryInstantiationPolicy, useFactoryInstantiationPolicy, useFullIdentityMap, useHardCacheWeakIdentityMap, useInstantiationCopyPolicy, useMethodInstantiationPolicy, useNoIdentityMap, useRemoteCacheIdentityMap, useRemoteFullIdentityMap, useRemoteHardCacheWeakIdentityMap, useRemoteNoIdentityMap, useRemoteSoftCacheWeakIdentityMap, useRemoteWeakIdentityMap, useSelectedFieldsLocking, useSoftCacheWeakIdentityMap, usesOptimisticLocking, usesSequenceNumbers, useTimestampLocking, useTimestampLocking, useVersionLocking, useVersionLocking, useWeakIdentityMap`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XMLDescriptor

    public XMLDescriptor()

  PUBLIC: Return a new XMLDescriptor.

Method Detail

### getDefaultRootElement

    public java.lang.String getDefaultRootElement()

  PUBLIC: Return the default root element name for the Descriptor This value is stored in place of a table name This value is mandatory for all root objects
  Returns:
    the default root element specified on this Descriptor

### shouldPreserveDocument

    public boolean shouldPreserveDocument()

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

### setShouldPreserveDocument

    public 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. By default unmapped data is not preserved.
  Returns:
    if this decriptor should preserve unmapped data

### setDefaultRootElement

    public void setDefaultRootElement(java.lang.String newDefaultRootElement)

  PUBLIC: Return the default root element name for the Descriptor This value is stored in place of a table name This value is mandatory for all root objects
  Parameters:
    `newDefaultRootElement` - the default root element to specify on this Descriptor

### getNamespaceResolver

    public NamespaceResolver getNamespaceResolver()

  PUBLIC: Return the NamespaceResolver associated with this descriptor
  Returns:
    the NamespaceResolver associated with this descriptor
  See Also:
    `NamespaceResolver`

### getInheritancePolicy

    public InheritancePolicy getInheritancePolicy()

  PUBLIC: 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.
  Returns:
    the InheritancePolicy associated with this descriptor

### setNamespaceResolver

    public void setNamespaceResolver(NamespaceResolver newNamespaceResolver)

  PUBLIC: Set the NamespaceResolver to associate with this descriptor
  Parameters:
    `newNamespaceResolver` - the NamespaceResolver to associate with this descriptor
  See Also:
    `NamespaceResolver`

### getSchemaReference

    public XMLSchemaReference getSchemaReference()

  PUBLIC: Return the SchemaReference associated with this descriptor
  Returns:
    the SchemaReference associated with this descriptor
  See Also:
    `oracle.toplink.ox.schema`

### setSchemaReference

    public void setSchemaReference(XMLSchemaReference newSchemaReference)

  PUBLIC: Set the SchemaReference to associate with this descriptor
  Parameters:
    `newSchemaReference` - the SchemaReference to associate with this descriptor
  See Also:
    `oracle.toplink.ox.schema`

### addDirectMapping

    public DatabaseMapping addDirectMapping(java.lang.String attributeName,
                                            java.lang.String xpathString)

  PUBLIC: Add a direct mapping to the receiver. The new mapping specifies that an instance variable of the class of objects which the receiver describes maps in the default manner for its type to the indicated database field.
  Overrides:
    `addDirectMapping` in class `ClassDescriptor`
  Parameters:
    `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.
  Returns:
    The newly created DatabaseMapping is returned.

### addDirectMapping

    public DatabaseMapping addDirectMapping(java.lang.String attributeName,
                                            java.lang.String getMethodName,
                                            java.lang.String setMethodName,
                                            java.lang.String xpathString)

  PUBLIC: Add a direct to node mapping to the receiver. The new mapping specifies that a variable accessed by the get and set methods of the class of objects which the receiver describes maps in the default manner for its type to the indicated database field.
  Overrides:
    `addDirectMapping` in class `ClassDescriptor`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 1998, 2006, Oracle. All Rights Reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD