|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.hibernate.type.AbstractType
net.sf.hibernate.type.CustomType
Adapts UserType to the generic Type interface.
UserType
,
Serialized FormConstructor Summary | |
CustomType(Class userTypeClass)
|
Method Summary | |
Object |
deepCopy(Object value)
Return a deep copy of the persistent state, stopping at entities and at collections. |
boolean |
equals(Object object)
|
boolean |
equals(Object x,
Object y)
Compare two instances of the class mapped by this type for persistence "equality", ie. |
Object |
fromString(String xml)
Parse the XML representation of an instance. |
int |
getColumnSpan(Mapping session)
How many columns are used to persist this type. |
String |
getName()
Returns the abbreviated name of the type. |
Class |
getReturnedClass()
The class returned by nullSafeGet() methods. |
int |
hashCode()
|
boolean |
hasNiceEquals()
Does this type implement a well-behaved equals() method. |
boolean |
isMutable()
Are objects of this type mutable. |
Object |
nullSafeGet(ResultSet rs,
String[] names,
SessionImplementor session,
Object owner)
Retrieve an instance of the mapped class from a JDBC resultset. |
Object |
nullSafeGet(ResultSet rs,
String columnName,
SessionImplementor session,
Object owner)
Retrieve an instance of the mapped class from a JDBC resultset. |
void |
nullSafeSet(PreparedStatement st,
Object value,
int index,
SessionImplementor session)
Write an instance of the mapped class to a prepared statement. |
int[] |
sqlTypes(Mapping pi)
Return the SQL type codes for the columns mapped by this type. |
String |
toString(Object value,
SessionFactoryImplementor factory)
A representation of the value to be embedded in an XML element. |
Methods inherited from class net.sf.hibernate.type.AbstractType |
assemble, copy, disassemble, 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 |
public CustomType(Class userTypeClass) throws MappingException
Method Detail |
public int[] sqlTypes(Mapping pi)
Type
Type.sqlTypes(Mapping)
public int getColumnSpan(Mapping session)
Type
Type.getColumnSpan(Mapping)
public Class getReturnedClass()
Type
Type.getReturnedClass()
public boolean equals(Object x, Object y) throws HibernateException
Type
x
- y
-
HibernateException
Type.equals(Object, Object)
public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException
Type
rs
- names
- the column namessession
- owner
- the parent entity
HibernateException
SQLException
Type.nullSafeGet(ResultSet, String[], SessionImplementor, Object)
public Object nullSafeGet(ResultSet rs, String columnName, SessionImplementor session, Object owner) throws HibernateException, SQLException
Type
rs
- columnName
- the column namesession
- owner
- the parent entity
SQLException
HibernateException
Type.nullSafeGet(ResultSet, String, SessionImplementor, Object)
public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException
Type
st
- value
- the object to writeindex
- statement parameter indexsession
-
SQLException
HibernateException
Type.nullSafeSet(PreparedStatement, Object, int, SessionImplementor)
public String toString(Object value, SessionFactoryImplementor factory)
Type
value
- factory
-
public Object fromString(String xml)
Type
xml
-
public String getName()
Type
Type.getName()
public Object deepCopy(Object value) throws HibernateException
Type
value
- generally a collection element or entity field
HibernateException
Type.deepCopy(Object)
public boolean isMutable()
Type
Type.isMutable()
public boolean hasNiceEquals()
Type
Object.equals(java.lang.Object)
,
Type.equals(java.lang.Object, java.lang.Object)
public boolean equals(Object object)
equals
in class AbstractType
public int hashCode()
hashCode
in class AbstractType
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |