|
|||||||||||
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
A reference to an entity class
Field Summary | |
protected String |
uniqueKeyPropertyName
|
Constructor Summary | |
protected |
EntityType(Class persistentClass,
String uniqueKeyPropertyName)
|
Method Summary | |
Object |
copy(Object original,
Object target,
SessionImplementor session,
Object owner,
Map copiedAlready)
|
Object |
deepCopy(Object value)
Return a deep copy of the persistent state, stopping at entities and at collections. |
boolean |
equals(Object object)
|
boolean |
equals(Object x,
Object y)
Compare two instances of the class mapped by this type for persistence "equality", ie. |
Object |
fromString(String xml)
Parse the XML representation of an instance. |
Class |
getAssociatedClass()
|
Class |
getAssociatedClass(SessionFactoryImplementor factory)
|
protected Object |
getIdentifier(Object value,
SessionImplementor session)
|
String |
getIdentifierOrUniqueKeyPropertyName(SessionFactoryImplementor factory)
|
Type |
getIdentifierOrUniqueKeyType(SessionFactoryImplementor factory)
|
Joinable |
getJoinable(SessionFactoryImplementor factory)
Get the "persister" for this association - a class or collection persister |
String |
getName()
Returns the abbreviated name of the type. |
Class |
getPersistentClass()
Deprecated. use getAssociationClass() |
String[] |
getReferencedColumns(SessionFactoryImplementor factory)
Get the columns referenced by this association. |
Class |
getReturnedClass()
This returns the wrong class for an entity with a proxy. |
int |
hashCode()
|
boolean |
hasNiceEquals()
Does this type implement a well-behaved equals() method. |
abstract 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 |
isAssociationType()
Return true if the implementation is castable to AssociationType. |
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 |
isEntityType()
Is this type an entity type? |
boolean |
isMutable()
Are objects of this type mutable. |
abstract boolean |
isOneToOne()
|
boolean |
isUniqueKeyReference()
|
Object |
nullSafeGet(ResultSet rs,
String[] names,
SessionImplementor session,
Object owner)
Retrieve an instance of the mapped class from a JDBC resultset. |
Object |
nullSafeGet(ResultSet rs,
String name,
SessionImplementor session,
Object owner)
Retrieve an instance of the mapped class from a JDBC resultset. |
Object |
resolveIdentifier(Object value,
SessionImplementor session,
Object owner)
Resolve an identifier or unique key value |
protected abstract Object |
resolveIdentifier(Serializable id,
SessionImplementor session)
Resolve an identifier |
String |
toString(Object value,
SessionFactoryImplementor factory)
A representation of the value to be embedded in an XML element. |
Methods inherited from class net.sf.hibernate.type.AbstractType |
assemble, disassemble, isComponentType, isModified, 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.AssociationType |
getForeignKeyDirection, usePrimaryKeyAsForeignKey |
Methods inherited from interface net.sf.hibernate.type.Type |
assemble, disassemble, getColumnSpan, isComponentType, isModified, isObjectType, isPersistentCollectionType, nullSafeSet, sqlTypes |
Field Detail |
protected final String uniqueKeyPropertyName
Constructor Detail |
protected EntityType(Class persistentClass, String uniqueKeyPropertyName)
Method Detail |
public final boolean isEntityType()
Type
isEntityType
in interface Type
isEntityType
in class AbstractType
public final Class getAssociatedClass()
public final boolean equals(Object x, Object y)
Type
x
- y
-
public Object nullSafeGet(ResultSet rs, String name, SessionImplementor session, Object owner) throws HibernateException, SQLException
Type
nullSafeGet
in interface Type
rs
- name
- the column namesession
- owner
- the parent entity
SQLException
HibernateException
public final Class getReturnedClass()
getReturnedClass
in interface Type
protected final Object getIdentifier(Object value, SessionImplementor session) throws HibernateException
HibernateException
public String toString(Object value, SessionFactoryImplementor factory) throws HibernateException
Type
value
- factory
-
HibernateException
public Object fromString(String xml) throws HibernateException
Type
fromString
in interface Type
xml
-
HibernateException
public String getName()
Type
public Object deepCopy(Object value)
Type
value
- generally a collection element or entity field
public boolean isMutable()
Type
public abstract boolean isOneToOne()
public Object copy(Object original, Object target, SessionImplementor session, Object owner, Map copiedAlready) throws HibernateException
copy
in interface Type
copy
in class AbstractType
HibernateException
public boolean hasNiceEquals()
Type
hasNiceEquals
in interface Type
public boolean isAssociationType()
Type
isAssociationType
in interface Type
isAssociationType
in class AbstractType
public final Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException
Type
nullSafeGet
in interface Type
rs
- names
- the column namessession
- owner
- the parent entity
HibernateException
SQLException
alternative, 2-phase property initialization
public abstract Object hydrate(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException
Type
hydrate
in interface Type
hydrate
in class AbstractType
HibernateException
SQLException
public boolean isDirty(Object old, Object current, SessionImplementor session) throws HibernateException
Type
isDirty
in interface Type
isDirty
in class AbstractType
HibernateException
public boolean isUniqueKeyReference()
public Joinable getJoinable(SessionFactoryImplementor factory) throws MappingException
AssociationType
getJoinable
in interface AssociationType
MappingException
public String[] getReferencedColumns(SessionFactoryImplementor factory) throws MappingException
AssociationType
getReferencedColumns
in interface AssociationType
MappingException
public final Type getIdentifierOrUniqueKeyType(SessionFactoryImplementor factory) throws MappingException
MappingException
public final String getIdentifierOrUniqueKeyPropertyName(SessionFactoryImplementor factory) throws MappingException
MappingException
protected abstract Object resolveIdentifier(Serializable id, SessionImplementor session) throws HibernateException
HibernateException
public Object resolveIdentifier(Object value, SessionImplementor session, Object owner) throws HibernateException
resolveIdentifier
in interface Type
resolveIdentifier
in class AbstractType
HibernateException
public Class getAssociatedClass(SessionFactoryImplementor factory)
getAssociatedClass
in interface AssociationType
public Class getPersistentClass()
public boolean equals(Object object)
equals
in class AbstractType
public int hashCode()
hashCode
in class AbstractType
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |