Package commonj.sdo.impl

# Class HelperProvider

java.lang.Object
commonj.sdo.impl.HelperProvider

public abstract class HelperProvider extends Object
A HelperProvider obtains specific default helpers and other implementation-specific objects used by a Java implementation of SDO.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected static HelperContext`
`defaultContext`
`static HelperProvider`
`INSTANCE`
The default HelperProvider INSTANCE.
`static final String`
`PROPERTY_NAME`
The name of the system property that will be checked for an implementation name.
`static final String`
`SERVICE_RESOURCE_NAME`
The name of the resource that is used for service location.

## Constructor Summary

Constructors
Constructor
Description
`HelperProvider()`

## Method Summary

Modifier and Type
Method
Description
`abstract CopyHelper`
`copyHelper()`
Returns a CopyHelper obtained from this implementation.
`static ExternalizableDelegator.Resolvable`
`createResolvable()`
Create a Resolvable using the default HelperProvider
`static ExternalizableDelegator.Resolvable`
`createResolvable(Object target)`
Create a Resolvable using the default HelperProvider
`abstract DataFactory`
`dataFactory()`
Returns a DataFactory obtained from this implementation.
`abstract DataHelper`
`dataHelper()`
Returns a DataHelper obtained from this implementation.
`abstract EqualityHelper`
`equalityHelper()`
Returns a EqualityHelper obtained from this implementation.
`static CopyHelper`
`getCopyHelper()`
Returns a CopyHelper obtained from the default HelperProvider.
`static DataFactory`
`getDataFactory()`
Returns a DataFactory obtained from the default HelperProvider.
`static DataHelper`
`getDataHelper()`
Returns a DataHelper obtained from the default HelperProvider.
`static HelperContext`
`getDefaultContext()`
Gets the default HelperContext
`static EqualityHelper`
`getEqualityHelper()`
Returns a EqualityHelper obtained from the default HelperProvider.
`static HelperProvider`
`getInstance()`
Locate and instantiate a HelperProvider.
`static HelperProvider`
`getInstance(ClassLoader cl)`
Locate and instantiate a HelperProvider using the supplied ClassLoader.
`static TypeHelper`
`getTypeHelper()`
Returns a TypeHelper obtained from the default HelperProvider.
`static XMLHelper`
`getXMLHelper()`
Returns a XMLHelper obtained from the default HelperProvider.
`static XSDHelper`
`getXSDHelper()`
Returns a XSDHelper obtained from the default HelperProvider.
`abstract ExternalizableDelegator.Resolvable`
`resolvable()`
Create a Resolvable using this implementation
`abstract ExternalizableDelegator.Resolvable`
`resolvable(Object target)`
Create a Resolvable using this implementation
`static void`
`setDefaultInstance(ClassLoader cl)`
`abstract TypeHelper`
`typeHelper()`
Returns a TypeHelper obtained from this implementation.
`abstract XMLHelper`
`xmlHelper()`
Returns a XMLHelper obtained from this implementation.
`abstract XSDHelper`
`xsdHelper()`
Returns a XSDHelper obtained from this implementation.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### INSTANCE

public static HelperProvider INSTANCE
The default HelperProvider INSTANCE. This is located using the ClassLoader used to load the HelperProvider class itself and if no default implementation is available this field will be set to null.

### SERVICE_RESOURCE_NAME

public static final String SERVICE_RESOURCE_NAME
The name of the resource that is used for service location.

See Also:
  - Constant Field Values

### PROPERTY_NAME

public static final String PROPERTY_NAME
The name of the system property that will be checked for an implementation name.

See Also:
  - Constant Field Values

### defaultContext

protected static HelperContext defaultContext

## Constructor Details

### HelperProvider

public HelperProvider()

## Method Details

### setDefaultInstance

public static void setDefaultInstance(ClassLoader cl)

### getInstance

public static HelperProvider getInstance() throws NoHelperProviderException
Locate and instantiate a HelperProvider.

Attempt to locate a HelperProvider using first the Thread's current context classloader and then, if that is not set, not readable, or does not provide an implementation, using the classloader used to load the HelperProvider class itself.

A new instance is returned for each sucessful invocation.

Returns:
  an implementation of HelperProvider
Throws:
  `NoHelperProviderException` - if no provider implementation was defined or it could not be instantiated

### getInstance

public static HelperProvider getInstance(ClassLoader cl) throws NoHelperProviderException
Locate and instantiate a HelperProvider using the supplied ClassLoader.

The name of the implementation to use is determined by the value of the "commonj.sdo.impl.HelperProvider" system property. If this is not set or this code does not have permission to read it then the name will be retrieved from the META-INF/services/commonj.sdo.impl.HelperProvider resource as returned by the supplied classloader as described in the JAR file specification.

A new instance is returned for each sucessful invocation.

Parameters:
  `cl` - the classloader to use to locate and instantiate the implementation
Returns:
  the specified implementation of HelperProvider
Throws:
  `NoHelperProviderException` - if no provider implementation was defined or it could not be instantiated

### copyHelper

public abstract CopyHelper copyHelper()
Returns a CopyHelper obtained from this implementation.

Returns:
  a CopyHelper obtained from this implementation

### dataFactory

public abstract DataFactory dataFactory()
Returns a DataFactory obtained from this implementation.

Returns:
  a DataFactory obtained from this implementation

### dataHelper

public abstract DataHelper dataHelper()
Returns a DataHelper obtained from this implementation.

Returns:
  a DataHelper obtained from this implementation

### equalityHelper

public abstract EqualityHelper equalityHelper()
Returns a EqualityHelper obtained from this implementation.

Returns:
  a EqualityHelper obtained from this implementation

### typeHelper

public abstract TypeHelper typeHelper()
Returns a TypeHelper obtained from this implementation.

Returns:
  a TypeHelper obtained from this implementation

### xmlHelper

public abstract XMLHelper xmlHelper()
Returns a XMLHelper obtained from this implementation.

Returns:
  a XMLHelper obtained from this implementation

### xsdHelper

public abstract XSDHelper xsdHelper()
Returns a XSDHelper obtained from this implementation.

Returns:
  a XSDHelper obtained from this implementation

### resolvable

public abstract ExternalizableDelegator.Resolvable resolvable()
Create a Resolvable using this implementation

Returns:
  a Resolvable created using this implementation

### resolvable

public abstract ExternalizableDelegator.Resolvable resolvable(Object target)
Create a Resolvable using this implementation

Parameters:
  `target` - the object to be resolved
Returns:
  a Resolvable created using this implementation

### getCopyHelper

public static CopyHelper getCopyHelper()
Returns a CopyHelper obtained from the default HelperProvider.

Returns:
  a CopyHelper obtained from the default HelperProvider

### getDataFactory

public static DataFactory getDataFactory()
Returns a DataFactory obtained from the default HelperProvider.

Returns:
  a DataFactory obtained from the default HelperProvider

### getDataHelper

public static DataHelper getDataHelper()
Returns a DataHelper obtained from the default HelperProvider.

Returns:
  a DataHelper obtained from the default HelperProvider

### getEqualityHelper

public static EqualityHelper getEqualityHelper()
Returns a EqualityHelper obtained from the default HelperProvider.

Returns:
  a EqualityHelper obtained from the default HelperProvider

### getTypeHelper

public static TypeHelper getTypeHelper()
Returns a TypeHelper obtained from the default HelperProvider.

Returns:
  a TypeHelper obtained from the default HelperProvider

### getXMLHelper

public static XMLHelper getXMLHelper()
Returns a XMLHelper obtained from the default HelperProvider.

Returns:
  a XMLHelper obtained from the default HelperProvider

### getXSDHelper

public static XSDHelper getXSDHelper()
Returns a XSDHelper obtained from the default HelperProvider.

Returns:
  a XSDHelper obtained from the default HelperProvider

### createResolvable

public static ExternalizableDelegator.Resolvable createResolvable()
Create a Resolvable using the default HelperProvider

Returns:
  a Resolvable created using the default HelperProvider

### createResolvable

public static ExternalizableDelegator.Resolvable createResolvable(Object target)
Create a Resolvable using the default HelperProvider

Parameters:
  `target` - the object to be resolved
Returns:
  a Resolvable created using the default HelperProvider

### getDefaultContext

public static HelperContext getDefaultContext()
Gets the default HelperContext

Returns:
  a HelperContext object