Fields Summary |
---|
public static final org.hibernate.type.NullableType | LONGHibernate long type. |
public static final org.hibernate.type.NullableType | SHORTHibernate short type. |
public static final org.hibernate.type.NullableType | INTEGERHibernate integer type. |
public static final org.hibernate.type.NullableType | BYTEHibernate byte type. |
public static final org.hibernate.type.NullableType | FLOATHibernate float type. |
public static final org.hibernate.type.NullableType | DOUBLEHibernate double type. |
public static final org.hibernate.type.NullableType | CHARACTERHibernate character type. |
public static final org.hibernate.type.NullableType | STRINGHibernate string type. |
public static final org.hibernate.type.NullableType | TIMEHibernate time type. |
public static final org.hibernate.type.NullableType | DATEHibernate date type. |
public static final org.hibernate.type.NullableType | TIMESTAMPHibernate timestamp type. |
public static final org.hibernate.type.NullableType | BOOLEANHibernate boolean type. |
public static final org.hibernate.type.NullableType | TRUE_FALSEHibernate true_false type. |
public static final org.hibernate.type.NullableType | YES_NOHibernate yes_no type. |
public static final org.hibernate.type.NullableType | BIG_DECIMALHibernate big_decimal type. |
public static final org.hibernate.type.NullableType | BIG_INTEGERHibernate big_integer type. |
public static final org.hibernate.type.NullableType | BINARYHibernate binary type. |
public static final org.hibernate.type.NullableType | WRAPPER_BINARYHibernate wrapper-binary type. |
public static final org.hibernate.type.NullableType | CHAR_ARRAYHibernate char[] type. |
public static final org.hibernate.type.NullableType | CHARACTER_ARRAYHibernate Character[] type. |
public static final org.hibernate.type.NullableType | TEXTHibernate text type. |
public static final org.hibernate.type.Type | BLOBHibernate blob type. |
public static final org.hibernate.type.Type | CLOBHibernate clob type. |
public static final org.hibernate.type.NullableType | CALENDARHibernate calendar type. |
public static final org.hibernate.type.NullableType | CALENDAR_DATEHibernate calendar_date type. |
public static final org.hibernate.type.NullableType | LOCALEHibernate locale type. |
public static final org.hibernate.type.NullableType | CURRENCYHibernate currency type. |
public static final org.hibernate.type.NullableType | TIMEZONEHibernate timezone type. |
public static final org.hibernate.type.NullableType | CLASSHibernate class type. |
public static final org.hibernate.type.NullableType | SERIALIZABLEHibernate serializable type. |
public static final org.hibernate.type.Type | OBJECTHibernate object type. |
Methods Summary |
---|
public static org.hibernate.type.Type | any(org.hibernate.type.Type metaType, org.hibernate.type.Type identifierType)A Hibernate any type.
return new AnyType( metaType, identifierType );
|
public static void | close(java.util.Iterator iterator)Close an Iterator created by iterate() immediately,
instead of waiting until the session is closed or disconnected.
if ( iterator instanceof HibernateIterator ) {
( ( HibernateIterator ) iterator ).close();
}
else {
throw new IllegalArgumentException( "not a Hibernate iterator" );
}
|
public static java.sql.Blob | createBlob(byte[] bytes)Create a new Blob. The returned object will be initially immutable.
return new SerializableBlob( new BlobImpl( bytes ) );
|
public static java.sql.Blob | createBlob(java.io.InputStream stream, int length)Create a new Blob. The returned object will be initially immutable.
return new SerializableBlob( new BlobImpl( stream, length ) );
|
public static java.sql.Blob | createBlob(java.io.InputStream stream)Create a new Blob. The returned object will be initially immutable.
return new SerializableBlob( new BlobImpl( stream, stream.available() ) );
|
public static java.sql.Clob | createClob(java.lang.String string)Create a new Clob. The returned object will be initially immutable.
return new SerializableClob( new ClobImpl( string ) );
|
public static java.sql.Clob | createClob(java.io.Reader reader, int length)Create a new Clob. The returned object will be initially immutable.
return new SerializableClob( new ClobImpl( reader, length ) );
|
public static org.hibernate.type.Type | custom(java.lang.Class userTypeClass)A Hibernate custom type.
return custom( userTypeClass, null );
|
public static org.hibernate.type.Type | custom(java.lang.Class userTypeClass, java.lang.String[] parameterNames, java.lang.String[] parameterValues)A Hibernate parameterizable custom type.
Properties parameters = new Properties();
for ( int i = 0; i < parameterNames.length; i++ ) {
parameters.setProperty( parameterNames[i], parameterValues[i] );
}
return custom( userTypeClass, parameters );
|
public static org.hibernate.type.Type | custom(java.lang.Class userTypeClass, java.util.Properties parameters)A Hibernate parameterizable custom type.
if ( CompositeUserType.class.isAssignableFrom( userTypeClass ) ) {
CompositeCustomType type = new CompositeCustomType( userTypeClass, parameters );
return type;
}
else {
CustomType type = new CustomType( userTypeClass, parameters );
return type;
}
|
public static org.hibernate.type.Type | entity(java.lang.Class persistentClass)A Hibernate persistent object (entity) type.
// not really a many-to-one association *necessarily*
return new ManyToOneType( persistentClass.getName() );
|
public static org.hibernate.type.Type | entity(java.lang.String entityName)A Hibernate persistent object (entity) type.
// not really a many-to-one association *necessarily*
return new ManyToOneType( entityName );
|
public static java.lang.Class | getClass(java.lang.Object proxy)Get the true, underlying class of a proxied persistent class. This operation
will initialize a proxy by side-effect.
if ( proxy instanceof HibernateProxy ) {
return ( ( HibernateProxy ) proxy ).getHibernateLazyInitializer()
.getImplementation()
.getClass();
}
else {
return proxy.getClass();
}
|
public static void | initialize(java.lang.Object proxy)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.
if ( proxy == null ) {
return;
}
else if ( proxy instanceof HibernateProxy ) {
( ( HibernateProxy ) proxy ).getHibernateLazyInitializer().initialize();
}
else if ( proxy instanceof PersistentCollection ) {
( ( PersistentCollection ) proxy ).forceInitialization();
}
|
public static boolean | isInitialized(java.lang.Object proxy)Check if the proxy or persistent collection is initialized.
if ( proxy instanceof HibernateProxy ) {
return !( ( HibernateProxy ) proxy ).getHibernateLazyInitializer().isUninitialized();
}
else if ( proxy instanceof PersistentCollection ) {
return ( ( PersistentCollection ) proxy ).wasInitialized();
}
else {
return true;
}
|
public static boolean | isPropertyInitialized(java.lang.Object proxy, java.lang.String propertyName)Check if the property is initialized. If the named property does not exist
or is not persistent, this method always returns true.
Object entity;
if ( proxy instanceof HibernateProxy ) {
LazyInitializer li = ( ( HibernateProxy ) proxy ).getHibernateLazyInitializer();
if ( li.isUninitialized() ) {
return false;
}
else {
entity = li.getImplementation();
}
}
else {
entity = proxy;
}
if ( FieldInterceptionHelper.isInstrumented( entity ) ) {
FieldInterceptor interceptor = FieldInterceptionHelper.extractFieldInterceptor( entity );
return interceptor == null || interceptor.isInitialized( propertyName );
}
else {
return true;
}
|
public static org.hibernate.type.Type | serializable(java.lang.Class serializableClass)A Hibernate serializable type.
return new SerializableType( serializableClass );
|