public class

SpecialOneToOneType

extends OneToOneType
java.lang.Object
   ↳ org.hibernate.type.AbstractType
     ↳ org.hibernate.type.EntityType
       ↳ org.hibernate.type.OneToOneType
         ↳ org.hibernate.type.SpecialOneToOneType

Class Overview

A one-to-one association that maps to specific formula(s) instead of the primary key column of the owning entity.

Summary

[Expand]
Inherited Fields
From class org.hibernate.type.EntityType
Public Constructors
SpecialOneToOneType(TypeFactory.TypeScope scope, String referencedEntityName, ForeignKeyDirection foreignKeyType, String uniqueKeyPropertyName, boolean lazy, boolean unwrapProxy, String entityName, String propertyName)
Public Methods
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)
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)
boolean useLHSPrimaryKey()
[Expand]
Inherited Methods
From class org.hibernate.type.OneToOneType
From class org.hibernate.type.EntityType
From class org.hibernate.type.AbstractType
From class java.lang.Object
From interface org.hibernate.type.AssociationType
From interface org.hibernate.type.Type

Public Constructors

public SpecialOneToOneType (TypeFactory.TypeScope scope, String referencedEntityName, ForeignKeyDirection foreignKeyType, String uniqueKeyPropertyName, boolean lazy, boolean unwrapProxy, String entityName, String propertyName)

Public Methods

public Object assemble (Serializable oid, SessionImplementor session, Object owner)

Reconstruct the object from its cached "disassembled" state.

Parameters
oid the disassembled state from the cache
session the session
owner the parent entity object
Returns
  • the the object

public Serializable disassemble (Object value, SessionImplementor session, Object owner)

Return a cacheable "disassembled" representation of the object.

Parameters
value the value to cache
session the session
owner optional parent entity object (needed for collections)
Returns
  • the disassembled, deep cloned state

public int getColumnSpan (Mapping mapping)

public 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. This is useful for 2-phase property initialization - the second phase is a call to resolveIdentifier().

Parameters
names the column names
session the session
owner the parent entity
Returns
  • Object an identifier or actual value

public int[] sqlTypes (Mapping mapping)

public boolean useLHSPrimaryKey ()