org.apache.tuscany.sdo.helper
Class DataFactoryImpl

java.lang.Object
  extended by org.apache.tuscany.sdo.helper.DataFactoryImpl
All Implemented Interfaces:
DataFactory

public class DataFactoryImpl
extends Object
implements DataFactory

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


Field Summary
protected  HelperContext helperContext
           
 
Fields inherited from interface commonj.sdo.helper.DataFactory
INSTANCE
 
Constructor Summary
DataFactoryImpl(HelperContext hc)
           
 
Method Summary
 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.
 DataObject create(Type type)
          Create a DataObject of the Type specified.
 HelperContext getHelperContext()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

helperContext

protected HelperContext helperContext
Constructor Detail

DataFactoryImpl

public DataFactoryImpl(HelperContext hc)
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.

Specified by:
create in interface DataFactory
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 interface DataFactory
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 interface DataFactory
Parameters:
type - The Type.
Returns:
the created DataObject.

getHelperContext

public HelperContext getHelperContext()


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.