当前页面:
在线文档首页 >
Hibernate 2.1.8 正式版 API 英文文档
PersistentClass (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档
net.sf.hibernate.mapping
Class PersistentClass
java.lang.Object
net.sf.hibernate.mapping.PersistentClass
- Direct Known Subclasses:
- RootClass, Subclass
- public abstract class PersistentClass
- extends Object
Mapping for an entity class.
- Author:
- Gavin King
NULL_DISCRIMINATOR_MAPPING
public static final String NULL_DISCRIMINATOR_MAPPING
- See Also:
- Constant Field Values
NOT_NULL_DISCRIMINATOR_MAPPING
public static final String NOT_NULL_DISCRIMINATOR_MAPPING
- See Also:
- Constant Field Values
PersistentClass
public PersistentClass()
useDynamicInsert
public boolean useDynamicInsert()
useDynamicUpdate
public boolean useDynamicUpdate()
setDynamicInsert
public void setDynamicInsert(boolean dynamicInsert)
setDynamicUpdate
public void setDynamicUpdate(boolean dynamicUpdate)
getDiscriminatorValue
public String getDiscriminatorValue()
addSubclass
public void addSubclass(Subclass subclass)
throws MappingException
- Throws:
MappingException
hasSubclasses
public boolean hasSubclasses()
getSubclassSpan
public int getSubclassSpan()
getSubclassIterator
public Iterator getSubclassIterator()
- Iterate over subclasses in a special 'order', most derived subclasses
first.
getDirectSubclasses
public Iterator getDirectSubclasses()
addNewProperty
public void addNewProperty(Property prop)
throws MappingException
- Add a new property definition
- Parameters:
prop
-
- Throws:
MappingException
- if the property was already defined
addProperty
public void addProperty(Property prop)
- Change the property definition or add a new property
definition
- Parameters:
prop
-
setTable
public void setTable(Table table)
getPropertyIterator
public Iterator getPropertyIterator()
getTable
public Table getTable()
getMappedClass
public Class getMappedClass()
getName
public String getName()
isMutable
public abstract boolean isMutable()
hasIdentifierProperty
public abstract boolean hasIdentifierProperty()
getIdentifierProperty
public abstract Property getIdentifierProperty()
getIdentifier
public abstract SimpleValue getIdentifier()
getVersion
public abstract Property getVersion()
getDiscriminator
public abstract Value getDiscriminator()
isInherited
public abstract boolean isInherited()
isPolymorphic
public abstract boolean isPolymorphic()
isVersioned
public abstract boolean isVersioned()
getCache
public abstract CacheConcurrencyStrategy getCache()
getSuperclass
public abstract PersistentClass getSuperclass()
isExplicitPolymorphism
public abstract boolean isExplicitPolymorphism()
getPropertyClosureIterator
public abstract Iterator getPropertyClosureIterator()
getTableClosureIterator
public abstract Iterator getTableClosureIterator()
addSubclassProperty
protected void addSubclassProperty(Property p)
addSubclassTable
protected void addSubclassTable(Table subclassTable)
getSubclassPropertyClosureIterator
public Iterator getSubclassPropertyClosureIterator()
getSubclassTableClosureIterator
public Iterator getSubclassTableClosureIterator()
getProxyInterface
public Class getProxyInterface()
hasEmbeddedIdentifier
public abstract boolean hasEmbeddedIdentifier()
getClassPersisterClass
public abstract Class getClassPersisterClass()
setClassPersisterClass
public abstract void setClassPersisterClass(Class classPersisterClass)
getRootTable
public abstract Table getRootTable()
getRootClass
public abstract RootClass getRootClass()
getKey
public abstract SimpleValue getKey()
setDiscriminatorValue
public void setDiscriminatorValue(String discriminatorValue)
- Sets the discriminatorValue.
- Parameters:
discriminatorValue
- The discriminatorValue to set
setMappedClass
public void setMappedClass(Class persistentClass)
- Sets the persistentClass.
- Parameters:
persistentClass
- The persistentClass to set
setProxyInterface
public void setProxyInterface(Class proxyInterface)
- Sets the proxyInterface.
- Parameters:
proxyInterface
- The proxyInterface to set
isForceDiscriminator
public boolean isForceDiscriminator()
createPrimaryKey
public void createPrimaryKey()
getWhere
public abstract String getWhere()
getBatchSize
public int getBatchSize()
setBatchSize
public void setBatchSize(int batchSize)
hasSelectBeforeUpdate
public boolean hasSelectBeforeUpdate()
setSelectBeforeUpdate
public void setSelectBeforeUpdate(boolean selectBeforeUpdate)
getProperty
public Property getProperty(String propertyName)
throws MappingException
- Throws:
MappingException
getOptimisticLockMode
public int getOptimisticLockMode()
setOptimisticLockMode
public void setOptimisticLockMode(int optimisticLockMode)
validate
public void validate(Mapping mapping)
throws MappingException
- Throws:
MappingException
isDiscriminatorValueNotNull
public boolean isDiscriminatorValueNotNull()
isDiscriminatorValueNull
public boolean isDiscriminatorValueNull()
getMetaAttributes
public Map getMetaAttributes()
setMetaAttributes
public void setMetaAttributes(Map metas)
getMetaAttribute
public MetaAttribute getMetaAttribute(String name)
toString
public String toString()
isJoinedSubclass
public abstract boolean isJoinedSubclass()
isDiscriminatorInsertable
public abstract boolean isDiscriminatorInsertable()