站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 2.1.8 正式版 API 英文文档

PersistentClass (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档


net.sf.hibernate.mapping
Class PersistentClass

java.lang.Object
  extended bynet.sf.hibernate.mapping.PersistentClass
Direct Known Subclasses:
RootClass, Subclass

public abstract class PersistentClass
extends Object

Mapping for an entity class.

Author:
Gavin King

Field Summary
static String NOT_NULL_DISCRIMINATOR_MAPPING
           
static String NULL_DISCRIMINATOR_MAPPING
           
 
Constructor Summary
PersistentClass()
           
 
Method Summary
 void addNewProperty(Property prop)
          Add a new property definition
 void addProperty(Property prop)
          Change the property definition or add a new property definition
 void addSubclass(Subclass subclass)
           
protected  void addSubclassProperty(Property p)
           
protected  void addSubclassTable(Table subclassTable)
           
 void createPrimaryKey()
           
 int getBatchSize()
           
abstract  CacheConcurrencyStrategy getCache()
           
abstract  Class getClassPersisterClass()
           
 Iterator getDirectSubclasses()
           
abstract  Value getDiscriminator()
           
 String getDiscriminatorValue()
           
abstract  SimpleValue getIdentifier()
           
abstract  Property getIdentifierProperty()
           
abstract  SimpleValue getKey()
           
 Class getMappedClass()
           
 MetaAttribute getMetaAttribute(String name)
           
 Map getMetaAttributes()
           
 String getName()
           
 int getOptimisticLockMode()
           
 Property getProperty(String propertyName)
           
abstract  Iterator getPropertyClosureIterator()
           
 Iterator getPropertyIterator()
           
 Class getProxyInterface()
           
abstract  RootClass getRootClass()
           
abstract  Table getRootTable()
           
 Iterator getSubclassIterator()
          Iterate over subclasses in a special 'order', most derived subclasses first.
 Iterator getSubclassPropertyClosureIterator()
           
 int getSubclassSpan()
           
 Iterator getSubclassTableClosureIterator()
           
abstract  PersistentClass getSuperclass()
           
 Table getTable()
           
abstract  Iterator getTableClosureIterator()
           
abstract  Property getVersion()
           
abstract  String getWhere()
           
abstract  boolean hasEmbeddedIdentifier()
           
abstract  boolean hasIdentifierProperty()
           
 boolean hasSelectBeforeUpdate()
           
 boolean hasSubclasses()
           
abstract  boolean isDiscriminatorInsertable()
           
 boolean isDiscriminatorValueNotNull()
           
 boolean isDiscriminatorValueNull()
           
abstract  boolean isExplicitPolymorphism()
           
 boolean isForceDiscriminator()
           
abstract  boolean isInherited()
           
abstract  boolean isJoinedSubclass()
           
abstract  boolean isMutable()
           
abstract  boolean isPolymorphic()
           
abstract  boolean isVersioned()
           
 void setBatchSize(int batchSize)
           
abstract  void setClassPersisterClass(Class classPersisterClass)
           
 void setDiscriminatorValue(String discriminatorValue)
          Sets the discriminatorValue.
 void setDynamicInsert(boolean dynamicInsert)
           
 void setDynamicUpdate(boolean dynamicUpdate)
           
 void setMappedClass(Class persistentClass)
          Sets the persistentClass.
 void setMetaAttributes(Map metas)
           
 void setOptimisticLockMode(int optimisticLockMode)
           
 void setProxyInterface(Class proxyInterface)
          Sets the proxyInterface.
 void setSelectBeforeUpdate(boolean selectBeforeUpdate)
           
 void setTable(Table table)
           
 String toString()
           
 boolean useDynamicInsert()
           
 boolean useDynamicUpdate()
           
 void validate(Mapping mapping)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

PersistentClass

public PersistentClass()
Method Detail

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()