|
|||||||||||
| 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
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 TypeisEntityType in class AbstractTypepublic final Class getAssociatedClass()
public final boolean equals(Object x,
Object y)
Type
equals in interface Typex - y -
public Object nullSafeGet(ResultSet rs,
String name,
SessionImplementor session,
Object owner)
throws HibernateException,
SQLException
Type
nullSafeGet in interface Typers - name - the column namesession - owner - the parent entity
SQLException
HibernateExceptionpublic 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
toString in interface Typevalue - factory -
HibernateException
public Object fromString(String xml)
throws HibernateException
Type
fromString in interface Typexml -
HibernateExceptionpublic String getName()
Type
getName in interface Typepublic Object deepCopy(Object value)
Type
deepCopy in interface Typevalue - generally a collection element or entity field
public boolean isMutable()
Type
isMutable in interface Typepublic abstract boolean isOneToOne()
public Object copy(Object original,
Object target,
SessionImplementor session,
Object owner,
Map copiedAlready)
throws HibernateException
copy in interface Typecopy in class AbstractTypeHibernateExceptionpublic boolean hasNiceEquals()
Type
hasNiceEquals in interface TypeObject.equals(java.lang.Object),
Type.equals(java.lang.Object, java.lang.Object)public boolean isAssociationType()
Type
isAssociationType in interface TypeisAssociationType in class AbstractType
public final Object nullSafeGet(ResultSet rs,
String[] names,
SessionImplementor session,
Object owner)
throws HibernateException,
SQLException
Type
nullSafeGet in interface Typers - names - the column namessession - owner - the parent entity
HibernateException
SQLExceptionalternative, 2-phase property initialization
public abstract Object hydrate(ResultSet rs,
String[] names,
SessionImplementor session,
Object owner)
throws HibernateException,
SQLException
Type
hydrate in interface Typehydrate in class AbstractTypeHibernateException
SQLException
public boolean isDirty(Object old,
Object current,
SessionImplementor session)
throws HibernateException
Type
isDirty in interface TypeisDirty in class AbstractTypeHibernateExceptionpublic boolean isUniqueKeyReference()
public Joinable getJoinable(SessionFactoryImplementor factory)
throws MappingException
AssociationType
getJoinable in interface AssociationTypeMappingException
public String[] getReferencedColumns(SessionFactoryImplementor factory)
throws MappingException
AssociationType
getReferencedColumns in interface AssociationTypeMappingException
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 TyperesolveIdentifier in class AbstractTypeHibernateExceptionpublic Class getAssociatedClass(SessionFactoryImplementor factory)
getAssociatedClass in interface AssociationTypepublic Class getPersistentClass()
public boolean equals(Object object)
equals in class AbstractTypepublic int hashCode()
hashCode in class AbstractType
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||