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
- HibernateException
void setPropertyValue(Object component, int property, Object value) throws HibernateException
component
- an instance of class mapped by this "type"property
- value
- the value to setHibernateException
Class returnedClass()
boolean equals(Object x, Object y) throws HibernateException
HibernateException
int hashCode(Object x) throws HibernateException
HibernateException
Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException
rs
- a JDBC result setnames
- the column namessession
- owner
- the containing entityHibernateException
SQLException
void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException
st
- a JDBC prepared statementvalue
- the object to writeindex
- statement parameter indexsession
- HibernateException
SQLException
Object deepCopy(Object value) throws HibernateException
value
- generally a collection element or entity fieldHibernateException
boolean isMutable()
Serializable disassemble(Object value, SessionImplementor session) throws HibernateException
value
- the object to be cachedsession
- HibernateException
Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException
cached
- the object to be cachedsession
- owner
- the owner of the cached objectHibernateException
Object replace(Object original, Object target, SessionImplementor session, Object owner) throws HibernateException
HibernateException
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.