|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.hibernate.type.AbstractType net.sf.hibernate.type.CompositeCustomType
Adapts CompositeUserType to Type interface
Constructor Summary | |
CompositeCustomType(Class userTypeClass)
|
Method Summary | |
Object |
assemble(Serializable cached,
SessionImplementor session,
Object owner)
Reconstruct the object from its cached "disassembled" state. |
Cascades.CascadeStyle |
cascade(int i)
|
Object |
deepCopy(Object value)
Return a deep copy of the persistent state, stopping at entities and at collections. |
Serializable |
disassemble(Object value,
SessionImplementor session)
Return a cacheable "disassembled" representation of the object. |
int |
enableJoinedFetch(int i)
|
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 mapping)
How many columns are used to persist this type. |
String |
getName()
Returns the abbreviated name of the type. |
String[] |
getPropertyNames()
|
Object |
getPropertyValue(Object component,
int i)
|
Object |
getPropertyValue(Object component,
int i,
SessionImplementor session)
|
Object[] |
getPropertyValues(Object component)
Optional operation |
Object[] |
getPropertyValues(Object component,
SessionImplementor session)
|
Class |
getReturnedClass()
The class returned by nullSafeGet() methods. |
Type[] |
getSubtypes()
|
int |
hashCode()
|
boolean |
hasNiceEquals()
Does this type implement a well-behaved equals() method. |
boolean |
isComponentType()
Is this type a component type. |
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. |
void |
setPropertyValues(Object component,
Object[] values)
Optional operation |
int[] |
sqlTypes(Mapping mapping)
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 |
copy, hydrate, isAssociationType, isDirty, isEntityType, isModified, isObjectType, isPersistentCollectionType, resolveIdentifier |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.hibernate.type.Type |
copy, hydrate, isAssociationType, isDirty, isEntityType, isModified, isObjectType, isPersistentCollectionType, resolveIdentifier |
Constructor Detail |
public CompositeCustomType(Class userTypeClass) throws MappingException
Method Detail |
public Type[] getSubtypes()
getSubtypes
in interface AbstractComponentType
public String[] getPropertyNames()
getPropertyNames
in interface AbstractComponentType
public Object[] getPropertyValues(Object component, SessionImplementor session) throws HibernateException
getPropertyValues
in interface AbstractComponentType
HibernateException
public Object[] getPropertyValues(Object component) throws HibernateException
AbstractComponentType
getPropertyValues
in interface AbstractComponentType
HibernateException
public void setPropertyValues(Object component, Object[] values) throws HibernateException
AbstractComponentType
setPropertyValues
in interface AbstractComponentType
HibernateException
public Object getPropertyValue(Object component, int i, SessionImplementor session) throws HibernateException
getPropertyValue
in interface AbstractComponentType
HibernateException
public Object getPropertyValue(Object component, int i) throws HibernateException
HibernateException
public Cascades.CascadeStyle cascade(int i)
cascade
in interface AbstractComponentType
public int enableJoinedFetch(int i)
enableJoinedFetch
in interface AbstractComponentType
public boolean isComponentType()
Type
isComponentType
in interface Type
isComponentType
in class AbstractType
public Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException
Type
assemble
in interface Type
assemble
in class AbstractType
HibernateException
public Object deepCopy(Object value) throws HibernateException
Type
value
- generally a collection element or entity field
HibernateException
public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException
Type
disassemble
in interface Type
disassemble
in class AbstractType
HibernateException
public boolean equals(Object x, Object y) throws HibernateException
Type
x
- y
-
HibernateException
public int getColumnSpan(Mapping mapping) throws MappingException
Type
getColumnSpan
in interface Type
MappingException
public String getName()
Type
public Class getReturnedClass()
Type
getReturnedClass
in interface Type
public boolean hasNiceEquals()
Type
hasNiceEquals
in interface Type
public boolean isMutable()
Type
public Object nullSafeGet(ResultSet rs, String columnName, SessionImplementor session, Object owner) throws HibernateException, SQLException
Type
nullSafeGet
in interface Type
rs
- columnName
- the column namesession
- owner
- the parent entity
SQLException
HibernateException
public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException
Type
nullSafeGet
in interface Type
rs
- names
- the column namessession
- owner
- the parent entity
HibernateException
SQLException
alternative, 2-phase property initialization
public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException
Type
nullSafeSet
in interface Type
st
- value
- the object to writeindex
- statement parameter indexsession
-
SQLException
HibernateException
public int[] sqlTypes(Mapping mapping) throws MappingException
Type
MappingException
Types
public String toString(Object value, SessionFactoryImplementor factory) throws HibernateException
Type
value
- factory
-
HibernateException
public Object fromString(String xml)
Type
fromString
in interface Type
xml
-
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 |