|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.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
MappingExceptionpublic int[] sqlTypes(Mapping mapping) throws MappingException
Type
MappingExceptionTypespublic void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException
Type
st - value - the object to writeindex - statement parameter indexsession -
SQLException
HibernateExceptionpublic boolean isOneToOne()
isOneToOne in class EntityTypepublic ForeignKeyDirection getForeignKeyDirection()
AssociationType
public Object hydrate(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException
Type
hydrate in interface Typehydrate in class EntityTypeHibernateException
SQLExceptionprotected Object resolveIdentifier(Serializable id, SessionImplementor session) throws HibernateException
EntityType
resolveIdentifier in class EntityTypeHibernateExceptionpublic boolean usePrimaryKeyAsForeignKey()
AssociationType
public boolean isModified(Object old, Object current, SessionImplementor session) throws HibernateException
Type
isModified in interface TypeisModified in class AbstractTypeHibernateExceptionpublic Serializable disassemble(Object value, SessionImplementor session) throws HibernateException
Type
disassemble in interface Typedisassemble in class AbstractTypeHibernateExceptionpublic Object assemble(Serializable oid, SessionImplementor session, Object owner) throws HibernateException
Type
assemble in interface Typeassemble in class AbstractTypeHibernateException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||