Top Description Inners Fields Constructors Methods
org.eclipse.persistence.oxm

public Class XMLContext

extends Context<AbstractSession, XMLDescriptor, XMLField, NamespaceResolver, Project, DatabaseSession, SessionEventListener>
Class Inheritance
Imports
java.security.AccessController, .PrivilegedActionException, java.util.ArrayList, .Collection, .Collections, .HashMap, .Iterator, .List, .Map, .StringTokenizer, javax.xml.namespace.QName, org.eclipse.persistence.core.mappings.CoreAttributeAccessor, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.exceptions.XMLMarshalException, org.eclipse.persistence.internal.oxm.Context, .ConversionManager, .XPathFragment, .XPathQName, org.eclipse.persistence.internal.oxm.accessor.OrmAttributeAccessor, org.eclipse.persistence.internal.oxm.documentpreservation.DescriptorLevelDocumentPreservationPolicy, .NoDocumentPreservationPolicy, org.eclipse.persistence.internal.oxm.mappings.CompositeCollectionMapping, .CompositeObjectMapping, .Descriptor, .Mapping, .ObjectReferenceMapping, org.eclipse.persistence.internal.security.PrivilegedAccessHelper, .PrivilegedGetClassLoaderForClass, org.eclipse.persistence.internal.sessions.AbstractSession, org.eclipse.persistence.logging.SessionLog, org.eclipse.persistence.mappings.DatabaseMapping, .OneToOneMapping, org.eclipse.persistence.oxm.documentpreservation.DocumentPreservationPolicy, org.eclipse.persistence.oxm.platform.SAXPlatform, .XMLPlatform, org.eclipse.persistence.sessions.DatabaseSession, .Project, .Session, .SessionEventListener, .SessionEventManager, org.eclipse.persistence.sessions.factories.SessionManager, .XMLSessionConfigLoader

An XMLContext is created based on EclipseLink sessions or projects and can then used to create instances of XMLMarshaller, XMLUnmarshaller and XMLValidator.

There are constructors to create an XMLContext with a single EclipseLink project or with a String which is a single EclipseLink session name or a ':' separated list of EclipseLink session names.

Code Sample
XMLContext context = new XMLContext("mySessionName");
XMLMarshaller marshaller = context.createMarshaller();
XMLUnmarshaller unmarshaller = context.createUnmarshaller();
XMLValidator validator = context.createValidator();

The XMLContext is thread-safe. If multiple threads accessing the same XMLContext object request an XMLMarshaller, each will receive their own instance of XMLMarshaller, so any state that the XMLMarshaller maintains will be unique to that process. The same is true of instances of XMLUnmarshaller and XMLValidator.

See Also
org.eclipse.persistence.oxm.XMLMarshaller, org.eclipse.persistence.oxm.XMLUnmarshaller, org.eclipse.persistence.oxm.XMLValidator

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Inherited from org.eclipse.persistence.internal.oxm.Context:
contextState

Constructor Summary

AccessConstructor and Description
pack-priv
public
XMLContext(String
A single session name or multiple session names separated by a :
sessionNames
)

Create a new XMLContext based on the specified session name or list of session names

public
XMLContext(String
A single session name or multiple session names separated by a :
sessionNames
,
ClassLoader
classloader for loading sessions.xml
classLoader
)

Create a new XMLContext based on the specified session name or list of session names

public
XMLContext(String
A single session name or multiple session names separated by a:
sessionNames
,
String
path to XML file containing session meta data to initialize and load sessions.
xmlResource
)

Create a new XMLContext based on passed in session names and session meta XML.

public
XMLContext(String
A single session name or multiple session names separated by a :
sessionNames
,
ClassLoader
classloader for loading sessions.xml
classLoader
,
String
path to XML file containing session meta data to initialize and load sessions.
xmlResource
)

Create a new XMLContext based on passed in session names, classloader and session meta XML.

public
XMLContext(Project
An EclipseLink project
project
)

Create a new XMLContext based on the specified project

public
XMLContext(Project
An EclipseLink project
project
,
ClassLoader
The ClassLoader to be used
classLoader
)

Create a new XMLContext based on the specified Project and ClassLoader.

public
XMLContext(Project
An EclipseLink project
project
,
ClassLoader
The ClassLoader to be used
classLoader
,
SessionEventListener
If non-null, this listener will be registered with the SessionEventManager
sessionEventListener
)

Create a new XMLContext based on the specified Project and ClassLoader.

public
XMLContext(Project
An EclipseLink project
project
,
ClassLoader
The ClassLoader to be used
classLoader
,
Collection<SessionEventListener>
If non-null, these listeners will be registered with the SessionEventManager
sessionEventListeners
)

Create a new XMLContext based on the specified Project and ClassLoader.

public
XMLContext(Collection<E> projects)

public
XMLContext(Collection<E> projects, ClassLoader classLoader)

Method Summary

Modifier and TypeMethod and Description
public void
public void
addSession(DatabaseSession sessionToAdd)

INTERNAL: Add and initialize a new session to the list of sessions associated with this XMLContext.

public void
applyORMMetadata(AbstractSession ormSession)

ADVANCED: Adjust the OXM metadata to take into account ORM mapping metadata,

public XMLBinder

Returns:

an XMLBinder based on this XMLContext
createBinder
()

Create a new XMLBinder

public XMLBinder

Returns:

an XMLBinder based on this XMLContext,
createBinder
(XMLMarshaller marshaller, XMLUnmarshaller unmarshaller)

Create a new XMLBinder with supplied marshaller and unmarshaller instances.

public Object

Returns:

An instance of the Java class mapped to the indicated XML type, or null if no result was found.
createByQualifiedName
(String
The namespace of the complex type to create a new Java instance of.
namespace
,
String
The XML type name to create a new Java instance of.
typeName
,
boolean
True if the object to be created represents a global type, false if it represents a global element.
isGlobalType
)

Create a new object instance for a given XML namespace and name.

public <
The return type of this method corresponds to the returnType parameter.
T
>
T

Returns:

An instance of the Java class mapped to the supplied XML type, or null if no result was found.
createByXPath
(Object
The XPath will be executed relative to this object.
parentObject
,
String
The XPath statement.
xPath
,
NamespaceResolver
A NamespaceResolver containing the prefix/URI pairings from the XPath statement.
namespaceResolver
,
Class<T>
The return type.
returnType
)

Overrides org.eclipse.persistence.internal.oxm.Context.createByXPath.

Create a new object instance for a given XPath, relative to the parentObject.
protected XMLField
public XMLMarshaller

Returns:

An XMLMarshaller based on this XMLContext
createMarshaller
()

Implements abstract org.eclipse.persistence.internal.oxm.Context.createMarshaller.

Create a new XMLMarshaller
public XMLUnmarshaller

Returns:

An XMLUnmarshaller based on this XMLContext
createUnmarshaller
()

Implements abstract org.eclipse.persistence.internal.oxm.Context.createUnmarshaller.

Create a new XMLUnmarshaller
public XMLUnmarshaller

Returns:

An XMLUnmarshaller based on this XMLContext, the underlying parser will use the passed in parser features.
createUnmarshaller
(Map<String, Boolean> parserFeatures)

Create a new XMLUnmarshaller

Map<String, Boolean> parserFeatures = new HashMap<String, Boolean>(1);
parserFeatures.put("http://apache.org/xml/features/validation/schema/normalized-value", false);
XMLUnmarshaller unmarshaller = xmlContext.createUnmarshaller(parserFeatures);
public XMLValidator

Returns:

An XMLValidator based on this XMLContext
createValidator
()

Create a new XMLValidator

public XMLDescriptor
getDescriptor(QName qName)

Overrides org.eclipse.persistence.internal.oxm.Context.getDescriptor.

INTERNAL: Return the XMLDescriptor with the default root mapping matching the QName parameter.
public XMLDescriptor
getDescriptor(XPathQName xpathQName)

Overrides org.eclipse.persistence.internal.oxm.Context.getDescriptor.

INTERNAL: Return the XMLDescriptor with the default root mapping matching the QName parameter.
public XMLDescriptor
getDescriptorByGlobalType(XPathFragment<XML_FIELD extends Field> xPathFragment)

Overrides org.eclipse.persistence.internal.oxm.Context.getDescriptorByGlobalType.

INTERNAL: Return the XMLDescriptor mapped to the global type matching the XPathFragment parameter.
public 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>>

Returns:

descriptor for given object
getDescriptorForObject
(Object object)

Returns descriptor for given object.

public List<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>>>

Returns:

descriptors from all sessions
getDescriptors
()

Returns descriptors from all sessions.

public DocumentPreservationPolicy
getDocumentPreservationPolicy(AbstractSession session)

INTERNAL: Return the DocumentPreservationPolicy associated with this session

public ConversionManager

Returns:

conversion manager
getOxmConversionManager
()

Returns conversion manager from session datasource platform.

public AbstractSession
getReadSession(Object object)

INTERNAL: Return the session corresponding to this object.

public AbstractSession
getReadSession(Class<?> clazz)

INTERNAL: Return the session corresponding to this class.

public AbstractSession
getReadSession(XMLDescriptor xmlDescriptor)

INTERNAL: Return the session corresponding to this XMLDescriptor.

public DatabaseSession
getSession(int index)

Overrides org.eclipse.persistence.internal.oxm.Context.getSession.

INTERNAL: XMLContext xmlContext = new XMLContext("path0:path1"); DatabaseSession session = xmlContext.getSession(0); // returns session for path0
public AbstractSession
public AbstractSession
public AbstractSession
getSession(XMLDescriptor xmlDescriptor)

Overrides org.eclipse.persistence.internal.oxm.Context.getSession.

INTERNAL: Return the session corresponding to this XMLDescriptor.
public List<E>
getSessions()

INTERNAL: Return the EclipseLink session used to marshal.

public <
The return type of this method corresponds to the returnType parameter.
T
>
T

Returns:

The object corresponding to the XPath or null if no result was found.
getValueByXPath
(Object
The XPath will be executed relative to this object.
object
,
String
The XPath statement
xPath
,
NamespaceResolver
A NamespaceResolver containing the prefix/URI pairings from the XPath statement.
namespaceResolver
,
Class<T>
The return type.
returnType
)

Overrides org.eclipse.persistence.internal.oxm.Context.getValueByXPath.

Query the object model based on the corresponding XML document.

public XMLContext.XMLContextState
getXMLContextState()

INTERNAL: Return the XMLContextState that represents the XMLContexts stateful information.

public boolean
hasDocumentPreservation()

Implements abstract org.eclipse.persistence.internal.oxm.Context.hasDocumentPreservation.

INTERNAL: Return true if any session held onto by this context has a document preservation policy that requires unmarshalling from a Node.
private static ClassLoader
public void
public void
setValueByXPath(Object
The XPath will be executed relative to this object.
object
,
String
The XPath statement
xPath
,
NamespaceResolver
A NamespaceResolver containing the prefix/URI pairings from the XPath statement.
namespaceResolver
,
Object
The value to be set.
value
)

Overrides org.eclipse.persistence.internal.oxm.Context.setValueByXPath.

Set values in the object model based on the corresponding XML document.

public void
setXMLContextState(XMLContext.XMLContextState xcs)

INTERNAL: Set the stateful information for this XMLContext.

public void
storeXMLDescriptorByQName(XMLDescriptor xmlDescriptor)

INTERNAL:

Inherited from org.eclipse.persistence.internal.oxm.Context:
getSession