org.hibernate.type
Class SpecialOneToOneType
- AssociationType, Serializable, Type
public class SpecialOneToOneType
A one-to-one association that maps to specific formula(s)
instead of the primary key column of the owning entity.
Object | assemble(Serializable oid, SessionImplementor session, Object owner) - Reconstruct the object from its cached "disassembled" state.
|
Serializable | disassemble(Object value, SessionImplementor session, Object owner) - Return a cacheable "disassembled" representation of the object.
|
int | getColumnSpan(Mapping mapping) - How many columns are used to persist this type.
|
Object | hydrate(ResultSet rs, String[] names, SessionImplementor session, Object owner) - Retrieve an instance of the mapped class, or the identifier of an entity or collection,
from a JDBC resultset.
|
int[] | sqlTypes(Mapping mapping) - Return the SQL type codes for the columns mapped by this type.
|
boolean | useLHSPrimaryKey()
|
assemble , disassemble , getColumnSpan , getForeignKeyDirection , getPropertyName , hydrate , isAlwaysDirtyChecked , isDirty , isDirty , isModified , isNull , isNullable , isOneToOne , nullSafeSet , nullSafeSet , sqlTypes , toColumnNullness , useLHSPrimaryKey |
compare , deepCopy , fromXMLNode , getAssociatedEntityName , getAssociatedEntityName , getAssociatedJoinable , getHashCode , getIdentifier , getIdentifierOrUniqueKeyPropertyName , getIdentifierOrUniqueKeyType , getLHSPropertyName , getName , getOnCondition , getPropertyName , getRHSUniqueKeyPropertyName , getReturnedClass , getSemiResolvedType , isAssociationType , isEmbeddedInXML , isEntityType , isEqual , isMutable , isNotEmbedded , isNull , isNullable , isOneToOne , isReferenceToPrimaryKey , isSame , isXMLElement , loadByUniqueKey , nullSafeGet , nullSafeGet , replace , resolve , resolveIdentifier , setToXMLNode , toLoggableString , toString |
assemble , beforeAssemble , compare , disassemble , getHashCode , getHashCode , getSemiResolvedType , hydrate , isAnyType , isAssociationType , isCollectionType , isComponentType , isDirty , isEntityType , isEqual , isEqual , isModified , isSame , isXMLElement , replace , replaceNode , resolve , semiResolve |
SpecialOneToOneType
public SpecialOneToOneType(String referencedEntityName,
ForeignKeyDirection foreignKeyType,
String uniqueKeyPropertyName,
boolean lazy,
boolean unwrapProxy,
String entityName,
String propertyName)
disassemble
public Serializable disassemble(Object value,
SessionImplementor session,
Object owner)
throws HibernateException
Return a cacheable "disassembled" representation of the object.
- disassemble in interface Type
- disassemble in interface OneToOneType
value
- the value to cachesession
- the sessionowner
- optional parent entity object (needed for collections)
- the disassembled, deep cloned state
hydrate
public Object hydrate(ResultSet rs,
String[] names,
SessionImplementor session,
Object owner)
throws HibernateException,
SQLException
Retrieve an instance of the mapped class, or the identifier of an entity or collection,
from a JDBC resultset. This is useful for 2-phase property initialization - the second
phase is a call to resolveIdentifier().
- hydrate in interface Type
- hydrate in interface OneToOneType
rs
- names
- the column namessession
- the sessionowner
- the parent entity
- Object an identifier or actual value