BIG_DECIMAL
public static final NullableType BIG_DECIMAL
Hibernate big_decimal type.
BIG_INTEGER
public static final NullableType BIG_INTEGER
Hibernate big_integer type.
BINARY
public static final NullableType BINARY
Hibernate binary type.
BLOB
public static final Type BLOB
Hibernate blob type.
BOOLEAN
public static final NullableType BOOLEAN
Hibernate boolean type.
BYTE
public static final NullableType BYTE
Hibernate byte type.
CALENDAR
public static final NullableType CALENDAR
Hibernate calendar type.
CALENDAR_DATE
public static final NullableType CALENDAR_DATE
Hibernate calendar_date type.
CHARACTER
public static final NullableType CHARACTER
Hibernate character type.
CHARACTER_ARRAY
public static final NullableType CHARACTER_ARRAY
Hibernate Character[] type.
CHAR_ARRAY
public static final NullableType CHAR_ARRAY
Hibernate char[] type.
CLASS
public static final NullableType CLASS
Hibernate class type.
CLOB
public static final Type CLOB
Hibernate clob type.
CURRENCY
public static final NullableType CURRENCY
Hibernate currency type.
DATE
public static final NullableType DATE
Hibernate date type.
DOUBLE
public static final NullableType DOUBLE
Hibernate double type.
FLOAT
public static final NullableType FLOAT
Hibernate float type.
INTEGER
public static final NullableType INTEGER
Hibernate integer type.
LOCALE
public static final NullableType LOCALE
Hibernate locale type.
LONG
public static final NullableType LONG
Hibernate long type.
OBJECT
public static final Type OBJECT
Hibernate object type.
SERIALIZABLE
public static final NullableType SERIALIZABLE
Hibernate serializable type.
SHORT
public static final NullableType SHORT
Hibernate short type.
STRING
public static final NullableType STRING
Hibernate string type.
TEXT
public static final NullableType TEXT
Hibernate text type.
TIME
public static final NullableType TIME
Hibernate time type.
TIMESTAMP
public static final NullableType TIMESTAMP
Hibernate timestamp type.
TIMEZONE
public static final NullableType TIMEZONE
Hibernate timezone type.
TRUE_FALSE
public static final NullableType TRUE_FALSE
Hibernate true_false type.
WRAPPER_BINARY
public static final NullableType WRAPPER_BINARY
Hibernate wrapper-binary type.
YES_NO
public static final NullableType YES_NO
Hibernate yes_no type.
any
public static Type any(Type metaType,
Type identifierType)
A Hibernate any type.
metaType
- a type mapping java.lang.Class to a single columnidentifierType
- the entity identifier type
close
public static void close(Iterator iterator)
throws HibernateException
Close an Iterator created by iterate() immediately,
instead of waiting until the session is closed or disconnected.
iterator
- an Iterator created by iterate()
createBlob
public static Blob createBlob(InputStream stream)
throws IOException
Create a new Blob. The returned object will be initially immutable.
createBlob
public static Blob createBlob(InputStream stream,
int length)
Create a new Blob. The returned object will be initially immutable.
stream
- a binary streamlength
- the number of bytes in the stream
createBlob
public static Blob createBlob(byte[] bytes)
Create a new Blob. The returned object will be initially immutable.
createClob
public static Clob createClob(Reader reader,
int length)
Create a new Clob. The returned object will be initially immutable.
reader
- a character streamlength
- the number of characters in the stream
createClob
public static Clob createClob(String string)
Create a new Clob. The returned object will be initially immutable.
custom
public static Type custom(Class userTypeClass)
throws HibernateException
A Hibernate custom type.
userTypeClass
- a class that implements UserType
custom
public static Type custom(Class userTypeClass,
Properties parameters)
throws HibernateException
A Hibernate parameterizable custom type.
userTypeClass
- a class that implements UserType and ParameterizableTypeparameters
- the parameters as a collection of name/value pairs
custom
public static Type custom(Class userTypeClass,
String[] parameterNames,
String[] parameterValues)
throws HibernateException
A Hibernate parameterizable custom type.
userTypeClass
- a class that implements UserType and ParameterizableTypeparameterNames
- the names of the parameters passed to the typeparameterValues
- the values of the parameters passed to the type. They must match
up with the order and length of the parameterNames array.
entity
public static Type entity(Class persistentClass)
A Hibernate persistent object (entity) type.
persistentClass
- a mapped entity class
entity
public static Type entity(String entityName)
A Hibernate persistent object (entity) type.
entityName
- a mapped entity class
getClass
public static Class getClass(Object proxy)
Get the true, underlying class of a proxied persistent class. This operation
will initialize a proxy by side-effect.
proxy
- a persistable object or proxy
- the true class of the instance
initialize
public static void initialize(Object proxy)
throws HibernateException
Force initialization of a proxy or persistent collection.
Note: This only ensures intialization of a proxy object or collection;
it is not guaranteed that the elements INSIDE the collection will be initialized/materialized.
proxy
- a persistable object, proxy, persistent collection or null
HibernateException
- if we can't initialize the proxy at this time, eg. the Session was closed
isInitialized
public static boolean isInitialized(Object proxy)
Check if the proxy or persistent collection is initialized.
proxy
- a persistable object, proxy, persistent collection or null
- true if the argument is already initialized, or is not a proxy or collection
isPropertyInitialized
public static boolean isPropertyInitialized(Object proxy,
String propertyName)
Check if the property is initialized. If the named property does not exist
or is not persistent, this method always returns true.
proxy
- The potential proxypropertyName
- the name of a persistent attribute of the object
- true if the named property of the object is not listed as uninitialized
serializable
public static Type serializable(Class serializableClass)
A Hibernate serializable type.