public class TypeWrapper<T extends Type> extends Object
Modifier and Type | Field and Description |
---|---|
static TypeWrapper<BooleanType> |
BOOLEAN |
static TypeWrapper<DateType> |
DATE |
static TypeWrapper<DoubleType> |
DOUBLE |
static TypeWrapper<FloatType> |
FLOAT |
private T |
hibernateType |
static TypeWrapper<IntegerType> |
INTEGER |
static TypeWrapper<LongType> |
LONG |
static TypeWrapper<ShortType> |
SHORT |
private int |
size |
private int |
sqlType |
static TypeWrapper<StringType> |
STRING |
static TypeWrapper<TextType> |
TEXT |
static TypeWrapper<TimestampType> |
TIMESTAMP |
Modifier | Constructor and Description |
---|---|
protected |
TypeWrapper(T hibernateType,
int size) |
Modifier and Type | Method and Description |
---|---|
int |
getApproximateSize()
Get the number of bytes a single value for this type occupies
in a database (approximately).
|
T |
getHibernateType()
Get the underlying Hibernate type.
|
int |
getSQLType()
Get the SQL code for database columns that can store this type.
|
public static final TypeWrapper<ShortType> SHORT
public static final TypeWrapper<IntegerType> INTEGER
public static final TypeWrapper<LongType> LONG
public static final TypeWrapper<FloatType> FLOAT
public static final TypeWrapper<DoubleType> DOUBLE
public static final TypeWrapper<StringType> STRING
public static final TypeWrapper<TextType> TEXT
public static final TypeWrapper<BooleanType> BOOLEAN
public static final TypeWrapper<DateType> DATE
public static final TypeWrapper<TimestampType> TIMESTAMP
private final int sqlType
private final int size
protected TypeWrapper(T hibernateType, int size)
public T getHibernateType()
public int getSQLType()
Types
public int getApproximateSize()