Class SDODataFactoryDelegate
- java.lang.Object
-
- org.eclipse.persistence.sdo.helper.delegates.SDODataFactoryDelegate
-
- All Implemented Interfaces:
DataFactory
,SDODataFactory
- Direct Known Subclasses:
JAXBDataFactory
public class SDODataFactoryDelegate extends Object implements SDODataFactory
Purpose: Helper to provide access to SDO Data Factory.
Responsibilities:
- Create DataObjects for given uri/typename pairs, interface class or type
-
-
Field Summary
-
Fields inherited from interface commonj.sdo.helper.DataFactory
INSTANCE
-
-
Constructor Summary
Constructors Constructor Description SDODataFactoryDelegate(HelperContext aContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataObject
create(Type type)
Create a DataObject of the Type specified.DataObject
create(Class interfaceClass)
Create a DataObject supporting the given interface.DataObject
create(String uri, String typeName)
Create a DataObject of the Type specified by typeName with the given package uri.HelperContext
getHelperContext()
INTERNAL: Return the current helperContext associated with this delegate.void
setHelperContext(HelperContext helperContext)
INTERNAL: Set the current helperContext to be associated with this delegate
-
-
-
Constructor Detail
-
SDODataFactoryDelegate
public SDODataFactoryDelegate(HelperContext aContext)
-
-
Method Detail
-
create
public DataObject create(String uri, String typeName)
Description copied from interface:DataFactory
Create a DataObject of the Type specified by typeName with the given package uri. If theuri
isnull
or""
, then a type with null uri will be looked up.- Specified by:
create
in interfaceDataFactory
- Parameters:
uri
- The uri of the Type.typeName
- The name of the Type.- Returns:
- the created DataObject.
-
create
public DataObject create(Class interfaceClass)
Description copied from interface:DataFactory
Create a DataObject supporting the given interface. InterfaceClass is the interface for the DataObject's Type. The DataObject created is an instance of the interfaceClass.- Specified by:
create
in interfaceDataFactory
- Parameters:
interfaceClass
- is the interface for the DataObject's Type.- Returns:
- the created DataObject.
-
create
public DataObject create(Type type)
Description copied from interface:DataFactory
Create a DataObject of the Type specified.- Specified by:
create
in interfaceDataFactory
- Parameters:
type
- The Type.- Returns:
- the created DataObject.
-
getHelperContext
public HelperContext getHelperContext()
INTERNAL: Return the current helperContext associated with this delegate.- Specified by:
getHelperContext
in interfaceSDODataFactory
- Returns:
-
setHelperContext
public void setHelperContext(HelperContext helperContext)
INTERNAL: Set the current helperContext to be associated with this delegate- Specified by:
setHelperContext
in interfaceSDODataFactory
-
-