站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 2.1.8 正式版 API 英文文档

PersistentEnumType (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档


net.sf.hibernate.type
Class PersistentEnumType

java.lang.Object
  extended bynet.sf.hibernate.type.AbstractType
      extended bynet.sf.hibernate.type.NullableType
          extended bynet.sf.hibernate.type.ImmutableType
              extended bynet.sf.hibernate.type.PersistentEnumType
All Implemented Interfaces:
LiteralType, Serializable, Type

Deprecated. Support for PersistentEnums will be removed in 2.2

public class PersistentEnumType
extends ImmutableType
implements LiteralType

A type for Hibernate PersistentEnum

Author:
Gavin King
See Also:
PersistentEnum, Serialized Form

Constructor Summary
PersistentEnumType(Class enumClass)
          Deprecated.  
 
Method Summary
 Object assemble(Serializable cached, SessionImplementor session, Object owner)
          Deprecated. Reconstruct the object from its cached "disassembled" state.
 Serializable disassemble(Object value, SessionImplementor session)
          Deprecated. Return a cacheable "disassembled" representation of the object.
 boolean equals(Object object)
          Deprecated.  
 boolean equals(Object x, Object y)
          Deprecated. Compare two instances of the class mapped by this type for persistence "equality", ie.
 Object fromStringValue(String xml)
          Deprecated.  
 Object get(ResultSet rs, String name)
          Deprecated.  
 Object getInstance(Integer code)
          Deprecated.  
 String getName()
          Deprecated. Returns the abbreviated name of the type.
 Class getReturnedClass()
          Deprecated. The class returned by nullSafeGet() methods.
 int hashCode()
          Deprecated.  
 String objectToSQLString(Object value)
          Deprecated. String representation of the value, suitable for embedding in an SQL statement.
 void set(PreparedStatement st, Object value, int index)
          Deprecated.  
 int sqlType()
          Deprecated.  
 String toString(Object value)
          Deprecated.  
 
Methods inherited from class net.sf.hibernate.type.ImmutableType
copy, deepCopyNotNull, hasNiceEquals, isMutable
 
Methods inherited from class net.sf.hibernate.type.NullableType
deepCopy, fromString, getColumnSpan, nullSafeGet, nullSafeGet, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, sqlTypes, toString
 
Methods inherited from class net.sf.hibernate.type.AbstractType
hydrate, isAssociationType, isComponentType, isDirty, isEntityType, isModified, isObjectType, isPersistentCollectionType, resolveIdentifier
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistentEnumType

public PersistentEnumType(Class enumClass)
                   throws MappingException
Deprecated. 
Method Detail

get

public Object get(ResultSet rs,
                  String name)
           throws HibernateException,
                  SQLException
Deprecated. 
Specified by:
get in class NullableType
Throws:
HibernateException
SQLException

getInstance

public Object getInstance(Integer code)
                   throws HibernateException
Deprecated. 
Throws:
HibernateException

equals

public boolean equals(Object x,
                      Object y)
Deprecated. 
Description copied from interface: Type
Compare two instances of the class mapped by this type for persistence "equality", ie. Equality of persistent state.

Specified by:
equals in interface Type
Parameters:
x -
y -
Returns:
boolean

getReturnedClass

public Class getReturnedClass()
Deprecated. 
Description copied from interface: Type
The class returned by nullSafeGet() methods. This is used to establish the class of an array of this type.

Specified by:
getReturnedClass in interface Type
Returns:
Class

set

public void set(PreparedStatement st,
                Object value,
                int index)
         throws SQLException
Deprecated. 
Specified by:
set in class NullableType
Throws:
SQLException

sqlType

public int sqlType()
Deprecated. 
Specified by:
sqlType in class NullableType

getName

public String getName()
Deprecated. 
Description copied from interface: Type
Returns the abbreviated name of the type.

Specified by:
getName in interface Type
Returns:
String the Hibernate type name

toString

public String toString(Object value)
Deprecated. 
Specified by:
toString in class NullableType

fromStringValue

public Object fromStringValue(String xml)
                       throws HibernateException
Deprecated. 
Specified by:
fromStringValue in class NullableType
Throws:
HibernateException

assemble

public Object assemble(Serializable cached,
                       SessionImplementor session,
                       Object owner)
                throws HibernateException
Deprecated. 
Description copied from interface: Type
Reconstruct the object from its cached "disassembled" state.

Specified by:
assemble in interface Type
Overrides:
assemble in class AbstractType
Throws:
HibernateException

disassemble

public Serializable disassemble(Object value,
                                SessionImplementor session)
                         throws HibernateException
Deprecated. 
Description copied from interface: Type
Return a cacheable "disassembled" representation of the object.

Specified by:
disassemble in interface Type
Overrides:
disassemble in class AbstractType
Throws:
HibernateException

objectToSQLString

public String objectToSQLString(Object value)
                         throws Exception
Deprecated. 
Description copied from interface: LiteralType
String representation of the value, suitable for embedding in an SQL statement.

Specified by:
objectToSQLString in interface LiteralType
Parameters:
value -
Returns:
String
Throws:
Exception

equals

public boolean equals(Object object)
Deprecated. 
Overrides:
equals in class AbstractType

hashCode

public int hashCode()
Deprecated. 
Overrides:
hashCode in class AbstractType