| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.type.AbstractType
org.hibernate.type.EntityType
org.hibernate.type.OneToOneType
org.hibernate.type.SpecialOneToOneType
public class SpecialOneToOneType
A one-to-one association that maps to specific formula(s) instead of the primary key column of the owning entity.
| Field Summary | 
|---|
| Fields inherited from class org.hibernate.type.EntityType | 
|---|
| isEmbeddedInXML, uniqueKeyPropertyName | 
| Constructor Summary | |
|---|---|
| SpecialOneToOneType(TypeFactory.TypeScope scope,
                    String referencedEntityName,
                    ForeignKeyDirection foreignKeyType,
                    String uniqueKeyPropertyName,
                    boolean lazy,
                    boolean unwrapProxy,
                    String entityName,
                    String propertyName) | |
| Method Summary | |
|---|---|
|  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 JDBC types codes (per Types) for the columns mapped by this type. | 
|  boolean | useLHSPrimaryKey()Is the primary key of the owning entity table to be used in the join? | 
| Methods inherited from class org.hibernate.type.OneToOneType | 
|---|
| getForeignKeyDirection, getPropertyName, isAlwaysDirtyChecked, isDirty, isDirty, isModified, isNull, isNullable, isOneToOne, nullSafeSet, nullSafeSet, toColumnNullness | 
| Methods inherited from class org.hibernate.type.AbstractType | 
|---|
| beforeAssemble, getHashCode, isAnyType, isCollectionType, isComponentType, isEqual, replace, replaceNode, semiResolve | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface org.hibernate.type.Type | 
|---|
| beforeAssemble, getHashCode, isAnyType, isCollectionType, isComponentType, isEqual, replace, semiResolve | 
| Constructor Detail | 
|---|
public SpecialOneToOneType(TypeFactory.TypeScope scope,
                           String referencedEntityName,
                           ForeignKeyDirection foreignKeyType,
                           String uniqueKeyPropertyName,
                           boolean lazy,
                           boolean unwrapProxy,
                           String entityName,
                           String propertyName)
| Method Detail | 
|---|
public int getColumnSpan(Mapping mapping)
                  throws MappingException
TypesqlTypes(mapping).length
getColumnSpan in interface TypegetColumnSpan in class OneToOneTypemapping - The mapping object :/
MappingException - Generally indicates an issue accessing the passed mapping object.
public int[] sqlTypes(Mapping mapping)
               throws MappingException
TypeTypes) for the columns mapped by this type.
sqlTypes in interface TypesqlTypes in class OneToOneTypemapping - The mapping object :/
MappingException - Generally indicates an issue accessing the passed mapping object.public boolean useLHSPrimaryKey()
AssociationType
useLHSPrimaryKey in interface AssociationTypeuseLHSPrimaryKey in class OneToOneType
public Object hydrate(ResultSet rs,
                      String[] names,
                      SessionImplementor session,
                      Object owner)
               throws HibernateException,
                      SQLException
Type
hydrate in interface Typehydrate in class OneToOneTypenames - the column namessession - the sessionowner - the parent entity
HibernateException
SQLExceptionType.resolve(Object, SessionImplementor, Object)
public Serializable disassemble(Object value,
                                SessionImplementor session,
                                Object owner)
                         throws HibernateException
Type
disassemble in interface Typedisassemble in class OneToOneTypevalue - the value to cachesession - the sessionowner - optional parent entity object (needed for collections)
HibernateException
public Object assemble(Serializable oid,
                       SessionImplementor session,
                       Object owner)
                throws HibernateException
Type
assemble in interface Typeassemble in class OneToOneTypeoid - the disassembled state from the cachesession - the sessionowner - the parent entity object
HibernateException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||