Package org.hibernate
Class Hibernate
java.lang.Object
org.hibernate.Hibernate
- Provides access to the full range of Hibernate built-in types. Type instances may be used to bind values to query parameters.
- A factory for new Blobs and Clobs.
- Defines static methods for manipulation of proxies.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BigDecimalTypeDeprecated.static final BigIntegerTypeDeprecated.UseStandardBasicTypes.BIG_INTEGERinstead.static final BinaryTypeDeprecated.UseStandardBasicTypes.BINARYinstead.static final BlobTypeDeprecated.UseStandardBasicTypes.BLOBinstead.static final BooleanTypeDeprecated.UseStandardBasicTypes.BOOLEANinstead.static final ByteTypeDeprecated.UseStandardBasicTypes.BYTEinstead.static final CalendarTypeDeprecated.UseStandardBasicTypes.CALENDARinstead.static final CalendarDateTypeDeprecated.UseStandardBasicTypes.CALENDAR_DATEinstead.static final CharArrayTypeDeprecated.UseStandardBasicTypes.CHAR_ARRAYinstead.static final CharacterTypeDeprecated.UseStandardBasicTypes.CHARACTERinstead.static final CharacterArrayTypeDeprecated.UseStandardBasicTypes.CHARACTER_ARRAYinstead.static final PrimitiveCharacterArrayClobTypeDeprecated.UseStandardBasicTypes.CHARACTERS_CLOBinstead.static final ClassTypeDeprecated.UseStandardBasicTypes.CLASSinstead.static final ClobTypeDeprecated.UseStandardBasicTypes.CLOBinstead.static final CurrencyTypeDeprecated.UseStandardBasicTypes.CURRENCYinstead.static final DateTypeDeprecated.UseStandardBasicTypes.DATEinstead.static final DoubleTypeDeprecated.UseStandardBasicTypes.DOUBLEinstead.static final FloatTypeDeprecated.UseStandardBasicTypes.FLOATinstead.static final ImageTypeDeprecated.UseStandardBasicTypes.IMAGEinstead.static final IntegerTypeDeprecated.UseStandardBasicTypes.INTEGERinstead.static final LocaleTypeDeprecated.UseStandardBasicTypes.LOCALEinstead.static final LongTypeDeprecated.UseStandardBasicTypes.LONGinstead.static final MaterializedBlobTypeDeprecated.UseStandardBasicTypes.MATERIALIZED_BLOBinstead.static final MaterializedClobTypeDeprecated.UseStandardBasicTypes.MATERIALIZED_CLOBinstead.static final ObjectTypeDeprecated.UseObjectType.INSTANCEinstead.static final SerializableTypeDeprecated.UseStandardBasicTypes.SERIALIZABLEinstead.static final ShortTypeDeprecated.UseStandardBasicTypes.SHORTinstead.static final StringTypeDeprecated.UseStandardBasicTypes.STRINGinstead.static final TextTypeDeprecated.UseStandardBasicTypes.TEXTinstead.static final TimeTypeDeprecated.UseStandardBasicTypes.TIMEinstead.static final TimestampTypeDeprecated.UseStandardBasicTypes.TIMESTAMPinstead.static final TimeZoneTypeDeprecated.UseStandardBasicTypes.TIMEZONEinstead.static final TrueFalseTypeDeprecated.UseStandardBasicTypes.TRUE_FALSEinstead.static final WrapperBinaryTypeDeprecated.UseStandardBasicTypes.WRAPPER_BINARYinstead.static final CharacterArrayClobTypeDeprecated.UseStandardBasicTypes.WRAPPER_CHARACTERS_CLOBinstead.static final WrappedMaterializedBlobTypeDeprecated.UseStandardBasicTypes.WRAPPER_MATERIALIZED_BLOBinstead.static final YesNoTypeDeprecated.UseStandardBasicTypes.YES_NOinstead. -
Method Summary
Modifier and TypeMethodDescriptionstatic TypeDeprecated.static voidClose an Iterator created by iterate() immediately, instead of waiting until the session is closed or disconnected.static BlobcreateBlob(byte[] bytes) Deprecated.UseLobHelper.createBlob(byte[])instead.static BlobcreateBlob(byte[] bytes, Session session) Deprecated.static BlobcreateBlob(InputStream stream) Deprecated.With no direct replacement.static BlobcreateBlob(InputStream stream, int length) Deprecated.UseLobHelper.createBlob(InputStream, long)instead.static BlobcreateBlob(InputStream stream, long length) Deprecated.UseLobHelper.createBlob(InputStream, long)instead.static BlobcreateBlob(InputStream stream, long length, Session session) Deprecated.UseLobHelper.createBlob(InputStream, long)instead.static ClobcreateClob(Reader reader, int length) Deprecated.UseLobHelper.createClob(Reader, long)insteadstatic ClobcreateClob(Reader reader, long length) Deprecated.UseLobHelper.createClob(Reader, long)insteadstatic ClobcreateClob(Reader reader, long length, Session session) Deprecated.UseLobHelper.createClob(Reader, long)insteadstatic ClobcreateClob(String string) Deprecated.UseLobHelper.createClob(String)insteadstatic ClobcreateClob(String string, Session session) Deprecated.static TypeDeprecated.UseTypeHelper.custom(java.lang.Class)instead; see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5182static TypeDeprecated.UseTypeHelper.custom(java.lang.Class)instead; see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5182static Typecustom(Class userTypeClass, Properties parameters) Deprecated.UseTypeHelper.custom(java.lang.Class)instead; see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5182static TypeDeprecated.UseTypeHelper.entity(java.lang.Class)instead; see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5182static TypeDeprecated.UseTypeHelper.entity(java.lang.Class)instead; see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5182static ClassGet the true, underlying class of a proxied persistent class.static LobCreatorgetLobCreator(SessionImplementor session) static LobCreatorgetLobCreator(Session session) static voidinitialize(Object proxy) Force initialization of a proxy or persistent collection.static booleanisInitialized(Object proxy) Check if the proxy or persistent collection is initialized.static booleanisPropertyInitialized(Object proxy, String propertyName) Check if the property is initialized.static Typeserializable(Class serializableClass) Deprecated.UseSerializableType(java.lang.Class<T>)instead.
-
Field Details
-
BOOLEAN
Deprecated.UseStandardBasicTypes.BOOLEANinstead.Hibernate boolean type. -
TRUE_FALSE
Deprecated.UseStandardBasicTypes.TRUE_FALSEinstead.Hibernate true_false type. -
YES_NO
Deprecated.UseStandardBasicTypes.YES_NOinstead.Hibernate yes_no type. -
BYTE
Deprecated.UseStandardBasicTypes.BYTEinstead.Hibernate byte type. -
SHORT
Deprecated.UseStandardBasicTypes.SHORTinstead.Hibernate short type. -
INTEGER
Deprecated.UseStandardBasicTypes.INTEGERinstead.Hibernate integer type. -
LONG
Deprecated.UseStandardBasicTypes.LONGinstead.Hibernate long type. -
FLOAT
Deprecated.UseStandardBasicTypes.FLOATinstead.Hibernate float type. -
DOUBLE
Deprecated.UseStandardBasicTypes.DOUBLEinstead.Hibernate double type. -
BIG_INTEGER
Deprecated.UseStandardBasicTypes.BIG_INTEGERinstead.Hibernate big_integer type. -
BIG_DECIMAL
Deprecated.UseStandardBasicTypes.BIG_DECIMALinstead.Hibernate big_decimal type. -
CHARACTER
Deprecated.UseStandardBasicTypes.CHARACTERinstead.Hibernate character type. -
STRING
Deprecated.UseStandardBasicTypes.STRINGinstead.Hibernate string type. -
TIME
Deprecated.UseStandardBasicTypes.TIMEinstead.Hibernate time type. -
DATE
Deprecated.UseStandardBasicTypes.DATEinstead.Hibernate date type. -
TIMESTAMP
Deprecated.UseStandardBasicTypes.TIMESTAMPinstead.Hibernate timestamp type. -
BINARY
Deprecated.UseStandardBasicTypes.BINARYinstead.Hibernate binary type. -
WRAPPER_BINARY
Deprecated.UseStandardBasicTypes.WRAPPER_BINARYinstead.Hibernate wrapper-binary type. -
CHAR_ARRAY
Deprecated.UseStandardBasicTypes.CHAR_ARRAYinstead.Hibernate char[] type. -
CHARACTER_ARRAY
Deprecated.UseStandardBasicTypes.CHARACTER_ARRAYinstead.Hibernate Character[] type. -
IMAGE
Deprecated.UseStandardBasicTypes.IMAGEinstead.Hibernate image type. -
TEXT
Deprecated.UseStandardBasicTypes.TEXTinstead.Hibernate text type. -
MATERIALIZED_BLOB
Deprecated.UseStandardBasicTypes.MATERIALIZED_BLOBinstead.Hibernate materialized_blob type. -
MATERIALIZED_CLOB
Deprecated.UseStandardBasicTypes.MATERIALIZED_CLOBinstead.Hibernate materialized_clob type. -
BLOB
Deprecated.UseStandardBasicTypes.BLOBinstead.Hibernate blob type. -
CLOB
Deprecated.UseStandardBasicTypes.CLOBinstead.Hibernate clob type. -
WRAPPER_MATERIALIZED_BLOB
Deprecated.UseStandardBasicTypes.WRAPPER_MATERIALIZED_BLOBinstead.Hibernate wrapper_materialized_blob type. -
WRAPPER_CHARACTERS_CLOB
Deprecated.UseStandardBasicTypes.WRAPPER_CHARACTERS_CLOBinstead.Hibernate wrapper_characters_clob type. -
CHARACTERS_CLOB
Deprecated.UseStandardBasicTypes.CHARACTERS_CLOBinstead.Hibernate characters_clob type. -
CALENDAR
Deprecated.UseStandardBasicTypes.CALENDARinstead.Hibernate calendar type. -
CALENDAR_DATE
Deprecated.UseStandardBasicTypes.CALENDAR_DATEinstead.Hibernate calendar_date type. -
LOCALE
Deprecated.UseStandardBasicTypes.LOCALEinstead.Hibernate locale type. -
CURRENCY
Deprecated.UseStandardBasicTypes.CURRENCYinstead.Hibernate currency type. -
TIMEZONE
Deprecated.UseStandardBasicTypes.TIMEZONEinstead.Hibernate timezone type. -
CLASS
Deprecated.UseStandardBasicTypes.CLASSinstead.Hibernate class type. -
SERIALIZABLE
Deprecated.UseStandardBasicTypes.SERIALIZABLEinstead.Hibernate serializable type. -
OBJECT
Deprecated.UseObjectType.INSTANCEinstead.Hibernate object type.
-
-
Method Details
-
serializable
Deprecated.UseSerializableType(java.lang.Class<T>)instead.A Hibernate serializable type.- Parameters:
serializableClass- TheSerializableimplementor class.- Returns:
-
any
Deprecated.DO NOT USE! -
entity
Deprecated.UseTypeHelper.entity(java.lang.Class)instead; see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5182DO NOT USE! -
entity
Deprecated.UseTypeHelper.entity(java.lang.Class)instead; see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5182DO NOT USE! -
custom
Deprecated.UseTypeHelper.custom(java.lang.Class)instead; see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5182DO NOT USE! -
custom
Deprecated.UseTypeHelper.custom(java.lang.Class)instead; see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5182DO NOT USE! -
custom
Deprecated.UseTypeHelper.custom(java.lang.Class)instead; see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5182DO NOT USE! -
initialize
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.- Parameters:
proxy- a persistable object, proxy, persistent collection or null- Throws:
HibernateException- if we can't initialize the proxy at this time, eg. the Session was closed
-
isInitialized
Check if the proxy or persistent collection is initialized.- Parameters:
proxy- a persistable object, proxy, persistent collection or null- Returns:
- true if the argument is already initialized, or is not a proxy or collection
-
getClass
Get the true, underlying class of a proxied persistent class. This operation will initialize a proxy by side-effect.- Parameters:
proxy- a persistable object or proxy- Returns:
- the true class of the instance
- Throws:
HibernateException
-
createBlob
Deprecated.UseLobHelper.createBlob(byte[])instead.Create a newBlob. The returned object will be initially immutable.- Parameters:
bytes- a byte array- Returns:
- the Blob
-
createBlob
Deprecated.Create a newBlob.- Parameters:
bytes- a byte arraysession- The session in which theBlobwill be used.- Returns:
- the Blob
-
getLobCreator
-
getLobCreator
-
createBlob
Deprecated.UseLobHelper.createBlob(InputStream, long)instead.Create a newBlob. The returned object will be initially immutable.- Parameters:
stream- a binary streamlength- the number of bytes in the stream- Returns:
- the Blob
-
createBlob
Deprecated.UseLobHelper.createBlob(InputStream, long)instead.Create a newBlob. The returned object will be initially immutable.- Parameters:
stream- a binary streamlength- the number of bytes in the stream- Returns:
- the Blob
-
createBlob
Deprecated.UseLobHelper.createBlob(InputStream, long)instead.Create a newBlob.- Parameters:
stream- a binary streamlength- the number of bytes in the streamsession- The session in which theBlobwill be used.- Returns:
- the Blob
-
createBlob
Deprecated.With no direct replacement. UsecreateBlob(InputStream,long)instead, passing in the lengthCreate a newBlob. The returned object will be initially immutable. NOTE: this method will read the entire contents of the incoming stream in order to properly handle theBlob.length()method. If you do not want the stream read, use thecreateBlob(InputStream,long)version instead.- Parameters:
stream- a binary stream- Returns:
- the Blob
- Throws:
IOException- Indicates an I/O problem accessing the stream
-
createClob
Deprecated.UseLobHelper.createClob(String)insteadCreate a newClob. The returned object will be initially immutable.- Parameters:
string- The string data- Returns:
- The created
Clob
-
createClob
Deprecated.Create a newClob. -
createClob
Deprecated.UseLobHelper.createClob(Reader, long)insteadCreate a newClob. The returned object will be initially immutable.- Parameters:
reader- a character streamlength- the number of characters in the stream- Returns:
- The created
Clob
-
createClob
Deprecated.UseLobHelper.createClob(Reader, long)insteadCreate a newClob. The returned object will be initially immutable.- Parameters:
reader- a character streamlength- the number of characters in the stream- Returns:
- The created
Clob
-
createClob
Deprecated.UseLobHelper.createClob(Reader, long)insteadCreate a newClob. -
close
Close an Iterator created by iterate() immediately, instead of waiting until the session is closed or disconnected.- Parameters:
iterator- an Iterator created by iterate()- Throws:
HibernateException- See Also:
-
isPropertyInitialized
Check if the property is initialized. If the named property does not exist or is not persistent, this method always returns true.- Parameters:
proxy- The potential proxypropertyName- the name of a persistent attribute of the object- Returns:
- true if the named property of the object is not listed as uninitialized; false otherwise
-
StandardBasicTypes.BIG_DECIMALinstead.