org.h2.test.store
Class SampleTypeFactory

java.lang.Object
  extended by org.h2.test.store.SampleTypeFactory
All Implemented Interfaces:
DataTypeFactory

public class SampleTypeFactory
extends java.lang.Object
implements DataTypeFactory

A data type factory.


Constructor Summary
SampleTypeFactory()
           
 
Method Summary
 DataType buildDataType(java.lang.String s)
          Parse the data type.
 java.lang.String getDataType(java.lang.Class<?> objectClass)
          Get the data type identifier for the given class.
 void setParent(DataTypeFactory parent)
          Set the parent factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleTypeFactory

public SampleTypeFactory()
Method Detail

setParent

public void setParent(DataTypeFactory parent)
Description copied from interface: DataTypeFactory
Set the parent factory.

Specified by:
setParent in interface DataTypeFactory
Parameters:
parent - the parent factory

buildDataType

public DataType buildDataType(java.lang.String s)
Description copied from interface: DataTypeFactory
Parse the data type.

Specified by:
buildDataType in interface DataTypeFactory
Parameters:
s - the string and type specific meta data
Returns:
the type, or null if unknown

getDataType

public java.lang.String getDataType(java.lang.Class<?> objectClass)
Description copied from interface: DataTypeFactory
Get the data type identifier for the given class.

To avoid conflict with the default factory, the returned string should start with the package name of the type factory.

Specified by:
getDataType in interface DataTypeFactory
Parameters:
objectClass - the class
Returns:
the data type identifier, or null if not supported