|
|||||||||||
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.ManyToOneType
A many-to-one association to an entity
Field Summary |
Fields inherited from class net.sf.hibernate.type.EntityType |
uniqueKeyPropertyName |
Constructor Summary | |
ManyToOneType(Class persistentClass)
|
|
ManyToOneType(Class persistentClass,
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 mapping)
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 |
isModified(Object old,
Object current,
SessionImplementor session)
Has the parent object been modified, compared to the current database state? |
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 mapping)
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, isDirty, 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 ManyToOneType(Class persistentClass)
public ManyToOneType(Class persistentClass, String uniqueKeyPropertyName)
Method Detail |
public int getColumnSpan(Mapping mapping) throws MappingException
Type
MappingException
public int[] sqlTypes(Mapping mapping) 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 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 usePrimaryKeyAsForeignKey()
AssociationType
public boolean isModified(Object old, Object current, SessionImplementor session) throws HibernateException
Type
isModified
in interface Type
isModified
in class AbstractType
HibernateException
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 |