org.eclipse.persistence.sdo.helper
Class SDOHelperContext

java.lang.Object
  extended by org.eclipse.persistence.sdo.helper.SDOHelperContext
All Implemented Interfaces:
commonj.sdo.helper.HelperContext
Direct Known Subclasses:
JAXBHelperContext

public class SDOHelperContext
extends java.lang.Object
implements commonj.sdo.helper.HelperContext

Purpose:

Responsibilities:

Since:
Oracle TopLink 11.1.1.0.0

Constructor Summary
SDOHelperContext()
          Create a local HelperContext.
SDOHelperContext(java.lang.ClassLoader aClassLoader)
          Create a local HelperContext.
SDOHelperContext(java.lang.String identifier)
          Create a local HelperContext with the given identifier.
SDOHelperContext(java.lang.String identifier, java.lang.ClassLoader aClassLoader)
          Create a local HelperContext with the given identifier.
 
Method Summary
 commonj.sdo.impl.ExternalizableDelegator.Resolvable createResolvable()
           
 commonj.sdo.impl.ExternalizableDelegator.Resolvable createResolvable(java.lang.Object target)
           
 commonj.sdo.helper.CopyHelper getCopyHelper()
           
 commonj.sdo.helper.DataFactory getDataFactory()
           
 commonj.sdo.helper.DataHelper getDataHelper()
           
 commonj.sdo.helper.EqualityHelper getEqualityHelper()
           
static commonj.sdo.helper.HelperContext getHelperContext()
          INTERNAL: Return the helper context for a given key.
static commonj.sdo.helper.HelperContext getHelperContext(java.lang.String identifier)
          Return the local helper context with the given identifier, or create one if it does not already exist.
static commonj.sdo.helper.HelperContext getHelperContext(java.lang.String identifier, java.lang.ClassLoader classLoader)
          Return the local helper context with the given identifier, or create one if it does not already exist.
 java.lang.String getIdentifier()
           
 commonj.sdo.helper.TypeHelper getTypeHelper()
           
 commonj.sdo.helper.XMLHelper getXMLHelper()
           
 commonj.sdo.helper.XSDHelper getXSDHelper()
           
 void makeDefaultContext()
          ADVANCED Promote this helper context to be the default or global one.
static void putHelperContext(java.lang.ClassLoader key, commonj.sdo.helper.HelperContext value)
          INTERNAL: Put a ClassLoader/HelperContext key/value pair in the Thread HelperContext map.
static void putHelperContext(commonj.sdo.helper.HelperContext ctx)
          Replaces the provided helper context in the map of identifiers to helper contexts for this application.
static void removeHelperContext(java.lang.ClassLoader key)
          INTERNAL: Remove a ClassLoader/HelperContext key/value pair from the Thread HelperContext map.
 void reset()
          Reset the Type,XML and XSD helper instances.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SDOHelperContext

public SDOHelperContext()
Create a local HelperContext. The current thread's context ClassLoader will be used to find static instance classes. In OSGi environments the construct that takes a ClassLoader parameter should be used instead.


SDOHelperContext

public SDOHelperContext(java.lang.String identifier)
Create a local HelperContext with the given identifier. The current thread's context ClassLoader will be used to find static instance classes. In OSGi environments the construct that takes a ClassLoader parameter should be used instead.

Parameters:
identifier - The unique label for this HelperContext.

SDOHelperContext

public SDOHelperContext(java.lang.ClassLoader aClassLoader)
Create a local HelperContext. This constructor should be used in OSGi environments.

Parameters:
aClassLoader - This class loader will be used to find static instance classes.

SDOHelperContext

public SDOHelperContext(java.lang.String identifier,
                        java.lang.ClassLoader aClassLoader)
Create a local HelperContext with the given identifier. This constructor should be used in OSGi environments.

Parameters:
identifier - The unique label for this HelperContext.
aClassLoader - This class loader will be used to find static instance classes.
Method Detail

reset

public void reset()
Reset the Type,XML and XSD helper instances.


getCopyHelper

public commonj.sdo.helper.CopyHelper getCopyHelper()
Specified by:
getCopyHelper in interface commonj.sdo.helper.HelperContext

getDataFactory

public commonj.sdo.helper.DataFactory getDataFactory()
Specified by:
getDataFactory in interface commonj.sdo.helper.HelperContext

getDataHelper

public commonj.sdo.helper.DataHelper getDataHelper()
Specified by:
getDataHelper in interface commonj.sdo.helper.HelperContext

getEqualityHelper

public commonj.sdo.helper.EqualityHelper getEqualityHelper()
Specified by:
getEqualityHelper in interface commonj.sdo.helper.HelperContext

getTypeHelper

public commonj.sdo.helper.TypeHelper getTypeHelper()
Specified by:
getTypeHelper in interface commonj.sdo.helper.HelperContext

getXMLHelper

public commonj.sdo.helper.XMLHelper getXMLHelper()
Specified by:
getXMLHelper in interface commonj.sdo.helper.HelperContext

getXSDHelper

public commonj.sdo.helper.XSDHelper getXSDHelper()
Specified by:
getXSDHelper in interface commonj.sdo.helper.HelperContext

createResolvable

public commonj.sdo.impl.ExternalizableDelegator.Resolvable createResolvable()

createResolvable

public commonj.sdo.impl.ExternalizableDelegator.Resolvable createResolvable(java.lang.Object target)

putHelperContext

public static void putHelperContext(java.lang.ClassLoader key,
                                    commonj.sdo.helper.HelperContext value)
INTERNAL: Put a ClassLoader/HelperContext key/value pair in the Thread HelperContext map. If Thread.currentThread().getContextClassLoader() == key during getHelperContext() call then the HelperContext (value) will be returned. This method will overwrite an existing entry in the map with the same ClassLoader key.

Parameters:
key - class loader
value - helper context

removeHelperContext

public static void removeHelperContext(java.lang.ClassLoader key)
INTERNAL: Remove a ClassLoader/HelperContext key/value pair from the Thread HelperContext map.

Parameters:
key - class loader

getHelperContext

public static commonj.sdo.helper.HelperContext getHelperContext()
INTERNAL: Return the helper context for a given key. The key will either be a ClassLoader or a String (representing an application name). A new context will be created and put in the map if none exists for the given key. The key is assumed to be non-null - getDelegateKey should always return either a string representing the application name (for WLS) or a class loader. This is relevant since 'putIfAbsent' will throw a null pointer exception if the key is null.


getHelperContext

public static commonj.sdo.helper.HelperContext getHelperContext(java.lang.String identifier)
Return the local helper context with the given identifier, or create one if it does not already exist.


getHelperContext

public static commonj.sdo.helper.HelperContext getHelperContext(java.lang.String identifier,
                                                                java.lang.ClassLoader classLoader)
Return the local helper context with the given identifier, or create one if it does not already exist.


putHelperContext

public static void putHelperContext(commonj.sdo.helper.HelperContext ctx)
Replaces the provided helper context in the map of identifiers to helper contexts for this application. ctx.getIdentifier() will be used to obtain identifier


makeDefaultContext

public void makeDefaultContext()
ADVANCED Promote this helper context to be the default or global one. This will completely replace the existing default context including all types and properties defined.


getIdentifier

public java.lang.String getIdentifier()