|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserType
This interface should be implemented by user-defined "types".
A "type" class is not the actual property type - it
is a class that knows how to serialize instances of another
class to and from JDBC.
This interface
for more complex cases
,
Type
Method Summary | |
---|---|
java.lang.Object |
assemble(java.io.Serializable cached,
java.lang.Object owner)
Reconstruct an object from the cacheable representation. |
java.lang.Object |
deepCopy(java.lang.Object value)
Return a deep copy of the persistent state, stopping at entities and at collections. |
java.io.Serializable |
disassemble(java.lang.Object value)
Transform the object into its cacheable representation. |
boolean |
equals(java.lang.Object x,
java.lang.Object y)
Compare two instances of the class mapped by this type for persistence "equality". |
int |
hashCode(java.lang.Object x)
Get a hashcode for the instance, consistent with persistence "equality" |
boolean |
isMutable()
Are objects of this type mutable? |
java.lang.Object |
nullSafeGet(java.sql.ResultSet rs,
java.lang.String[] names,
java.lang.Object owner)
Retrieve an instance of the mapped class from a JDBC resultset. |
void |
nullSafeSet(java.sql.PreparedStatement st,
java.lang.Object value,
int index)
Write an instance of the mapped class to a prepared statement. |
java.lang.Object |
replace(java.lang.Object original,
java.lang.Object target,
java.lang.Object owner)
During merge, replace the existing (target) value in the entity we are merging to with a new (original) value from the detached entity we are merging. |
java.lang.Class |
returnedClass()
The class returned by nullSafeGet(). |
int[] |
sqlTypes()
Return the SQL type codes for the columns mapped by this type. |
Method Detail |
---|
int[] sqlTypes()
Types
java.lang.Class returnedClass()
boolean equals(java.lang.Object x, java.lang.Object y) throws HibernateException
x
- y
-
HibernateException
int hashCode(java.lang.Object x) throws HibernateException
HibernateException
java.lang.Object nullSafeGet(java.sql.ResultSet rs, java.lang.String[] names, java.lang.Object owner) throws HibernateException, java.sql.SQLException
rs
- a JDBC result setnames
- the column namesowner
- the containing entity
HibernateException
java.sql.SQLException
void nullSafeSet(java.sql.PreparedStatement st, java.lang.Object value, int index) throws HibernateException, java.sql.SQLException
st
- a JDBC prepared statementvalue
- the object to writeindex
- statement parameter index
HibernateException
java.sql.SQLException
java.lang.Object deepCopy(java.lang.Object value) throws HibernateException
value
- the object to be cloned, which may be null
HibernateException
boolean isMutable()
java.io.Serializable disassemble(java.lang.Object value) throws HibernateException
value
- the object to be cached
HibernateException
java.lang.Object assemble(java.io.Serializable cached, java.lang.Object owner) throws HibernateException
cached
- the object to be cachedowner
- the owner of the cached object
HibernateException
java.lang.Object replace(java.lang.Object original, java.lang.Object target, java.lang.Object owner) throws HibernateException
original
- the value from the detached entity being mergedtarget
- the value in the managed entity
HibernateException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |