Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


org.eclipse.persistence.oxm
Class XMLContext.XMLContextState

java.lang.Object
  extended by org.eclipse.persistence.oxm.XMLContext.XMLContextState

Enclosing class:
XMLContext

public static class XMLContext.XMLContextState
extends java.lang.Object

Field Summary
private  java.util.Map descriptorsByGlobalType
           
private  java.util.Map descriptorsByQName
           
private  boolean hasDocumentPreservation
           
private  java.util.List sessions
           
private  XMLContext xmlContext
           

 

Constructor Summary
private XMLContext.XMLContextState(XMLContext xmlContext, java.util.Collection projects, java.lang.ClassLoader classLoader)
           
private XMLContext.XMLContextState(XMLContext xmlContext, Project project, java.lang.ClassLoader classLoader, SessionEventListener sessionEventListener)
           
private XMLContext.XMLContextState(XMLContext xmlContext, java.lang.String sessionNames, java.lang.ClassLoader classLoader, java.lang.String xmlResource)
           

 

Method Summary
private  void addDescriptorByQName(javax.xml.namespace.QName qName, XMLDescriptor descriptor)
           
private  void addSession(DatabaseSession sessionToAdd)
          INTERNAL: Add and initialize a new session to the list of sessions associated with this XMLContext.
private  DatabaseSession buildSession(java.lang.String sessionName, java.lang.ClassLoader classLoader, XMLSessionConfigLoader sessionLoader)
           
private  XMLDescriptor getDescriptor(javax.xml.namespace.QName qName)
          INTERNAL: Return the XMLDescriptor with the default root mapping matching the QName parameter.
private  XMLDescriptor getDescriptorByGlobalType(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment)
          INTERNAL: Return the XMLDescriptor mapped to the global type matching the XPathFragment parameter.
private  org.eclipse.persistence.internal.sessions.AbstractSession getReadSession(java.lang.Class clazz)
          INTERNAL: Return the session corresponding to this class.
private  org.eclipse.persistence.internal.sessions.AbstractSession getReadSession(java.lang.Object object)
          INTERNAL: Return the session corresponding to this object.
private  org.eclipse.persistence.internal.sessions.AbstractSession getReadSession(XMLDescriptor xmlDescriptor)
          INTERNAL: Return the session corresponding to this XMLDescriptor.
private  org.eclipse.persistence.internal.sessions.AbstractSession getSession(java.lang.Class clazz)
          INTERNAL: Return the session corresponding to this class.
private  DatabaseSession getSession(int index)
          INTERNAL: XMLContext xmlContext = new XMLContext("path0:path1");
DatabaseSession session = xmlContext.getSession(0); // returns session for path0
 org.eclipse.persistence.internal.sessions.AbstractSession getSession(java.lang.Object object)
          INTERNAL: Return the session corresponding to this object.
private  org.eclipse.persistence.internal.sessions.AbstractSession getSession(XMLDescriptor xmlDescriptor)
          INTERNAL: Return the session corresponding to this XMLDescriptor.
private  java.util.List getSessions()
          INTERNAL: Return the EclipseLink session used to marshal.
private  boolean hasDocumentPreservation()
          INTERNAL: Return true if any session held onto by this context has a document preservation policy that requires unmarshalling from a Node.
private  void setupDocumentPreservationPolicy(DatabaseSession session)
           
private  void storeXMLDescriptorByQName(XMLDescriptor xmlDescriptor)
          INTERNAL:
private  void storeXMLDescriptorsByQName(DatabaseSession session)
           

 

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

 

Field Detail

xmlContext

private XMLContext xmlContext

sessions

private java.util.List sessions

descriptorsByQName

private java.util.Map descriptorsByQName

descriptorsByGlobalType

private java.util.Map descriptorsByGlobalType

hasDocumentPreservation

private boolean hasDocumentPreservation

Constructor Detail

XMLContext.XMLContextState

private XMLContext.XMLContextState(XMLContext xmlContext,
                                   java.util.Collection projects,
                                   java.lang.ClassLoader classLoader)

XMLContext.XMLContextState

private XMLContext.XMLContextState(XMLContext xmlContext,
                                   Project project,
                                   java.lang.ClassLoader classLoader,
                                   SessionEventListener sessionEventListener)

XMLContext.XMLContextState

private XMLContext.XMLContextState(XMLContext xmlContext,
                                   java.lang.String sessionNames,
                                   java.lang.ClassLoader classLoader,
                                   java.lang.String xmlResource)

Method Detail

addDescriptorByQName

private void addDescriptorByQName(javax.xml.namespace.QName qName,
                                  XMLDescriptor descriptor)

addSession

private void addSession(DatabaseSession sessionToAdd)
INTERNAL: Add and initialize a new session to the list of sessions associated with this XMLContext.

buildSession

private DatabaseSession buildSession(java.lang.String sessionName,
                                     java.lang.ClassLoader classLoader,
                                     XMLSessionConfigLoader sessionLoader)
                              throws XMLMarshalException
Throws:
XMLMarshalException

getDescriptor

private XMLDescriptor getDescriptor(javax.xml.namespace.QName qName)
INTERNAL: Return the XMLDescriptor with the default root mapping matching the QName parameter.

getDescriptorByGlobalType

private XMLDescriptor getDescriptorByGlobalType(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment)
INTERNAL: Return the XMLDescriptor mapped to the global type matching the XPathFragment parameter.

getReadSession

private org.eclipse.persistence.internal.sessions.AbstractSession getReadSession(java.lang.Class clazz)
INTERNAL: Return the session corresponding to this class. Since the class may be mapped by more that one of the projects used to create the XML Context, this method will return the first match. The session will be a unit of work if document preservation is not enabled. This method will typically be used for unmarshalling when a non-shared cache is desired.

getReadSession

private org.eclipse.persistence.internal.sessions.AbstractSession getReadSession(XMLDescriptor xmlDescriptor)
INTERNAL: Return the session corresponding to this XMLDescriptor. Since the class may be mapped by more that one of the projects used to create the XML Context, this method will return the first match. The session will be a unit of work if document preservation is not enabled. This method will typically be used for unmarshalling when a non-shared cache is desired.

getReadSession

private org.eclipse.persistence.internal.sessions.AbstractSession getReadSession(java.lang.Object object)
INTERNAL: Return the session corresponding to this object. Since the object may be mapped by more that one of the projects used to create the XML Context, this method will return the first match. The session will be a unit of work if document preservation is not enabled. This method will typically be used for unmarshalling when a non-shared cache is desired.

getSession

private org.eclipse.persistence.internal.sessions.AbstractSession getSession(java.lang.Class clazz)
INTERNAL: Return the session corresponding to this class. Since the class may be mapped by more that one of the projects used to create the XML Context, this method will return the first match.

getSession

private DatabaseSession getSession(int index)
INTERNAL: XMLContext xmlContext = new XMLContext("path0:path1");
DatabaseSession session = xmlContext.getSession(0); // returns session for path0

getSession

public org.eclipse.persistence.internal.sessions.AbstractSession getSession(java.lang.Object object)
INTERNAL: Return the session corresponding to this object. Since the object may be mapped by more that one of the projects used to create the XML Context, this method will return the first match.

getSession

private org.eclipse.persistence.internal.sessions.AbstractSession getSession(XMLDescriptor xmlDescriptor)
INTERNAL: Return the session corresponding to this XMLDescriptor. Since the class may be mapped by more that one of the projects used to create the XML Context, this method will return the first match.

getSessions

private java.util.List getSessions()
INTERNAL: Return the EclipseLink session used to marshal.

hasDocumentPreservation

private boolean hasDocumentPreservation()
INTERNAL: Return true if any session held onto by this context has a document preservation policy that requires unmarshalling from a Node.

setupDocumentPreservationPolicy

private void setupDocumentPreservationPolicy(DatabaseSession session)

storeXMLDescriptorByQName

private void storeXMLDescriptorByQName(XMLDescriptor xmlDescriptor)
INTERNAL:

storeXMLDescriptorsByQName

private void storeXMLDescriptorsByQName(DatabaseSession session)

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.