|
|||||||||||
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.EntityType net.sf.hibernate.type.OneToOneType
A one-to-one association to an entity
Field Summary |
Fields inherited from class net.sf.hibernate.type.EntityType |
uniqueKeyPropertyName |
Constructor Summary | |
OneToOneType(Class persistentClass,
ForeignKeyDirection foreignKeyType,
String uniqueKeyPropertyName)
|
Method Summary | |
Object |
assemble(Serializable oid,
SessionImplementor session,
Object owner)
Reconstruct the object from its cached "disassembled" state. |
Serializable |
disassemble(Object value,
SessionImplementor session)
Return a cacheable "disassembled" representation of the object. |
int |
getColumnSpan(Mapping session)
How many columns are used to persist this type. |
ForeignKeyDirection |
getForeignKeyDirection()
Get the foreign key directionality of this association |
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. |
boolean |
isDirty(Object old,
Object current,
SessionImplementor session)
Should the parent be considered dirty, given both the old and current field or element value? |
boolean |
isModified(Object old,
Object current,
SessionImplementor session)
Has the parent object been modified, compared to the current database state? |
boolean |
isNullable()
|
boolean |
isOneToOne()
|
void |
nullSafeSet(PreparedStatement st,
Object value,
int index,
SessionImplementor session)
Write an instance of the mapped class to a prepared statement. |
protected Object |
resolveIdentifier(Serializable id,
SessionImplementor session)
Resolve an identifier |
int[] |
sqlTypes(Mapping session)
Return the SQL type codes for the columns mapped by this type. |
boolean |
usePrimaryKeyAsForeignKey()
Is the foreign key the primary key of the table? |
Methods inherited from class net.sf.hibernate.type.EntityType |
copy, deepCopy, equals, equals, fromString, getAssociatedClass, getAssociatedClass, getIdentifier, getIdentifierOrUniqueKeyPropertyName, getIdentifierOrUniqueKeyType, getJoinable, getName, getPersistentClass, getReferencedColumns, getReturnedClass, hashCode, hasNiceEquals, isAssociationType, isEntityType, isMutable, isUniqueKeyReference, nullSafeGet, nullSafeGet, resolveIdentifier, toString |
Methods inherited from class net.sf.hibernate.type.AbstractType |
isComponentType, isObjectType, isPersistentCollectionType |
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 |
isComponentType, isObjectType, isPersistentCollectionType |
Constructor Detail |
public OneToOneType(Class persistentClass, ForeignKeyDirection foreignKeyType, String uniqueKeyPropertyName)
Method Detail |
public int getColumnSpan(Mapping session) throws MappingException
Type
MappingException
public int[] sqlTypes(Mapping session) throws MappingException
Type
MappingException
Types
public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException
Type
st
- value
- the object to writeindex
- statement parameter indexsession
-
SQLException
HibernateException
public boolean isOneToOne()
isOneToOne
in class EntityType
public boolean isDirty(Object old, Object current, SessionImplementor session) throws HibernateException
Type
isDirty
in interface Type
isDirty
in class EntityType
HibernateException
public boolean isModified(Object old, Object current, SessionImplementor session) throws HibernateException
Type
isModified
in interface Type
isModified
in class AbstractType
HibernateException
public ForeignKeyDirection getForeignKeyDirection()
AssociationType
public Object hydrate(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException
Type
hydrate
in interface Type
hydrate
in class EntityType
HibernateException
SQLException
protected Object resolveIdentifier(Serializable id, SessionImplementor session) throws HibernateException
EntityType
resolveIdentifier
in class EntityType
HibernateException
public boolean isNullable()
public boolean usePrimaryKeyAsForeignKey()
AssociationType
public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException
Type
disassemble
in interface Type
disassemble
in class AbstractType
HibernateException
public Object assemble(Serializable oid, SessionImplementor session, Object owner) throws HibernateException
Type
assemble
in interface Type
assemble
in class AbstractType
HibernateException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |