SDO API

commonj.sdo.helper
Interface TypeHelper


public interface TypeHelper

Look up a Type given the uri and typeName or interfaceClass. SDO Types are available through the getType("commonj.sdo", typeName) method. Defines Types from DataObjects.


Field Summary
static TypeHelper INSTANCE
          The default TypeHelper.
 
Method Summary
 Type define(DataObject type)
          Define the DataObject as a Type.
 java.util.List define(java.util.List types)
          Define the list of DataObjects as Types.
 Type getType(java.lang.Class interfaceClass)
          Return the Type for this interfaceClass or null if not found.
 Type getType(java.lang.String uri, java.lang.String typeName)
          Return the Type specified by typeName with the given uri, or null if not found.
 

Field Detail

INSTANCE

static final TypeHelper INSTANCE
The default TypeHelper.

Method Detail

getType

Type getType(java.lang.String uri,
             java.lang.String typeName)
Return the Type specified by typeName with the given uri, or null if not found.

Parameters:
uri - The uri of the Type - type.getURI();
typeName - The name of the Type - type.getName();
Returns:
the Type specified by typeName with the given uri, or null if not found.

getType

Type getType(java.lang.Class interfaceClass)
Return the Type for this interfaceClass or null if not found.

Parameters:
interfaceClass - is the interface for the DataObject's Type - type.getInstanceClass();
Returns:
the Type for this interfaceClass or null if not found.

define

Type define(DataObject type)
Define the DataObject as a Type. The Type is available through TypeHelper and DataGraph getType() methods.

Parameters:
type - the DataObject representing the Type.
Returns:
the defined Type.
Throws:
java.lang.IllegalArgumentException - if the Type could not be defined.

define

java.util.List define(java.util.List types)
Define the list of DataObjects as Types. The Types are available through TypeHelper and DataGraph getType() methods.

Parameters:
types - a List of DataObjects representing the Types.
Returns:
the defined Types.
Throws:
java.lang.IllegalArgumentException - if the Types could not be defined.

SDO API

-