public interface CompositeUserType
for more simple cases,
Type| Modifier and Type | Method and Description |
|---|---|
Object |
assemble(Serializable cached,
SessionImplementor session,
Object owner)
Reconstruct an object from the cacheable representation.
|
Object |
deepCopy(Object value)
Return a deep copy of the persistent state, stopping at entities and at collections.
|
Serializable |
disassemble(Object value,
SessionImplementor session)
Transform the object into its cacheable representation.
|
boolean |
equals(Object x,
Object y)
Compare two instances of the class mapped by this type for persistence "equality".
|
String[] |
getPropertyNames()
Get the "property names" that may be used in a
query.
|
Type[] |
getPropertyTypes()
Get the corresponding "property types".
|
Object |
getPropertyValue(Object component,
int property)
Get the value of a property.
|
int |
hashCode(Object x)
Get a hashcode for the instance, consistent with persistence "equality"
|
boolean |
isMutable()
Check if 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.
|
void |
nullSafeSet(PreparedStatement st,
Object value,
int index,
SessionImplementor session)
Write an instance of the mapped class to a prepared statement.
|
Object |
replace(Object original,
Object target,
SessionImplementor session,
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.
|
Class |
returnedClass()
The class returned by nullSafeGet().
|
void |
setPropertyValue(Object component,
int property,
Object value)
Set the value of a property.
|
String[] getPropertyNames()
Type[] getPropertyTypes()
Object getPropertyValue(Object component, int property) throws HibernateException
component - an instance of class mapped by this "type"property - HibernateExceptionvoid setPropertyValue(Object component, int property, Object value) throws HibernateException
component - an instance of class mapped by this "type"property - value - the value to setHibernateExceptionClass returnedClass()
boolean equals(Object x, Object y) throws HibernateException
HibernateExceptionint hashCode(Object x) throws HibernateException
HibernateExceptionObject nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException
rs - a JDBC result setnames - the column namessession - owner - the containing entityHibernateExceptionSQLExceptionvoid nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException
st - a JDBC prepared statementvalue - the object to writeindex - statement parameter indexsession - HibernateExceptionSQLExceptionObject deepCopy(Object value) throws HibernateException
value - generally a collection element or entity fieldHibernateExceptionboolean isMutable()
Serializable disassemble(Object value, SessionImplementor session) throws HibernateException
value - the object to be cachedsession - HibernateExceptionObject assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException
cached - the object to be cachedsession - owner - the owner of the cached objectHibernateExceptionObject replace(Object original, Object target, SessionImplementor session, Object owner) throws HibernateException
HibernateExceptionCopyright © 2012 JBoss by Red Hat. All Rights Reserved.