2.17.2: 2011-06-17

net.sf.basedb.core.hibernate
Class TypeWrapper<T extends org.hibernate.type.Type>

java.lang.Object
  extended by net.sf.basedb.core.hibernate.TypeWrapper<T>

public class TypeWrapper<T extends org.hibernate.type.Type>
extends Object

Wrapper class for Hibernate types that will try to "hide" issues with the redesign of the type system in Hibernate that is going on in Hibernate 3.5.2 --> Hibernate 3.6.

Since:
2.16
Author:
Nicklas
Last modified
$Date: 2010-11-03 15:02:49 +0100 (Wed, 03 Nov 2010) $

Field Summary
static TypeWrapper<org.hibernate.type.BooleanType> BOOLEAN
           
static TypeWrapper<org.hibernate.type.DateType> DATE
           
static TypeWrapper<org.hibernate.type.DoubleType> DOUBLE
           
static TypeWrapper<org.hibernate.type.FloatType> FLOAT
           
private  T hibernateType
           
static TypeWrapper<org.hibernate.type.IntegerType> INTEGER
           
static TypeWrapper<org.hibernate.type.LongType> LONG
           
static TypeWrapper<org.hibernate.type.ShortType> SHORT
           
private  int sqlType
           
static TypeWrapper<org.hibernate.type.StringType> STRING
           
static TypeWrapper<org.hibernate.type.TextType> TEXT
           
static TypeWrapper<org.hibernate.type.TimestampType> TIMESTAMP
           
 
Constructor Summary
protected TypeWrapper(T hibernateType)
           
 
Method Summary
 T getHibernateType()
          Get the underlying Hibernate type.
 int getSQLType()
          Get the SQL code for database columns that can store this type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHORT

public static final TypeWrapper<org.hibernate.type.ShortType> SHORT

INTEGER

public static final TypeWrapper<org.hibernate.type.IntegerType> INTEGER

LONG

public static final TypeWrapper<org.hibernate.type.LongType> LONG

FLOAT

public static final TypeWrapper<org.hibernate.type.FloatType> FLOAT

DOUBLE

public static final TypeWrapper<org.hibernate.type.DoubleType> DOUBLE

STRING

public static final TypeWrapper<org.hibernate.type.StringType> STRING

TEXT

public static final TypeWrapper<org.hibernate.type.TextType> TEXT

BOOLEAN

public static final TypeWrapper<org.hibernate.type.BooleanType> BOOLEAN

DATE

public static final TypeWrapper<org.hibernate.type.DateType> DATE

TIMESTAMP

public static final TypeWrapper<org.hibernate.type.TimestampType> TIMESTAMP

hibernateType

private final T extends org.hibernate.type.Type hibernateType

sqlType

private final int sqlType
Constructor Detail

TypeWrapper

protected TypeWrapper(T hibernateType)
Method Detail

getHibernateType

public T getHibernateType()
Get the underlying Hibernate type.


getSQLType

public int getSQLType()
Get the SQL code for database columns that can store this type.

Returns:
A code, or 0 if not applicable to the given type
See Also:
Types

2.17.2: 2011-06-17