Package net.sf.basedb.core.hibernate
Class TypeWrapper<T extends Type>
java.lang.Object
net.sf.basedb.core.hibernate.TypeWrapper<T>
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: 2017-05-22 14:35:27 +0200 (må, 22 maj 2017) $
-
Field Summary
Modifier and TypeFieldDescriptionstatic final TypeWrapper<BooleanType>
static final TypeWrapper<DateType>
static final TypeWrapper<DoubleType>
static final TypeWrapper<FloatType>
static final BooleanType
static final DateType
static final DoubleType
static final FloatType
static final IntegerType
static final LongType
static final ShortType
static final StringType
static final TextType
static final TimestampType
private final T
static final TypeWrapper<IntegerType>
static final TypeWrapper<LongType>
static final TypeWrapper<ShortType>
private final int
private final int
static final TypeWrapper<StringType>
static final TypeWrapper<TextType>
static final TypeWrapper<TimestampType>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Get the number of bytes a single value for this type occupies in a database (approximately).Get the underlying Hibernate type.int
Get the SQL code for database columns that can store this type.
-
Field Details
-
SHORT
-
H_SHORT
-
INTEGER
-
H_INTEGER
-
LONG
-
H_LONG
-
FLOAT
-
H_FLOAT
-
DOUBLE
-
H_DOUBLE
-
STRING
-
H_STRING
-
TEXT
-
H_TEXT
-
BOOLEAN
-
H_BOOLEAN
-
DATE
-
H_DATE
-
TIMESTAMP
-
H_TIMESTAMP
-
hibernateType
-
sqlType
private final int sqlType -
size
private final int size
-
-
Constructor Details
-
TypeWrapper
-
-
Method Details
-
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:
-
getApproximateSize
public int getApproximateSize()Get the number of bytes a single value for this type occupies in a database (approximately). If the type represents a variable-length property, 0 is returned.- Returns:
- The number of bytes required in the database or 0 if not known
- Since:
- 3.1
-