EclipseLink 1.1.4, build 'v20100812-r7860' API Reference

commonj.sdo.helper
Interface DataFactory

All Known Subinterfaces:
SDODataFactory
All Known Implementing Classes:
JAXBDataFactory, SDODataFactoryDelegate, SDODataFactoryDelegator

public interface DataFactory

A Factory for creating DataObjects. The created DataObjects are not connected to any other DataObjects.


Field Summary
static DataFactory INSTANCE
          The default DataFactory.
 
Method Summary
 DataObject create(java.lang.Class interfaceClass)
          Create a DataObject supporting the given interface.
 DataObject create(java.lang.String uri, java.lang.String typeName)
          Create a DataObject of the Type specified by typeName with the given package uri.
 DataObject create(Type type)
          Create a DataObject of the Type specified.
 

Field Detail

INSTANCE

static final DataFactory INSTANCE
The default DataFactory.

Method Detail

create

DataObject create(java.lang.String uri,
                  java.lang.String typeName)
Create a DataObject of the Type specified by typeName with the given package uri.

Parameters:
uri - The uri of the Type.
typeName - The name of the Type.
Returns:
the created DataObject.
Throws:
java.lang.IllegalArgumentException - if the uri and typeName does not correspond to a Type this factory can instantiate.

create

DataObject create(java.lang.Class interfaceClass)
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.

Parameters:
interfaceClass - is the interface for the DataObject's Type.
Returns:
the created DataObject.
Throws:
java.lang.IllegalArgumentException - if the instanceClass does not correspond to a Type this factory can instantiate.

create

DataObject create(Type type)
Create a DataObject of the Type specified.

Parameters:
type - The Type.
Returns:
the created DataObject.
Throws:
java.lang.IllegalArgumentException - if the Type cannot be instantiaed by this factory.

EclipseLink 1.1.4, build 'v20100812-r7860' API Reference