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

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


net.sf.hibernate.mapping
Class Subclass

java.lang.Object
  extended bynet.sf.hibernate.mapping.PersistentClass
      extended bynet.sf.hibernate.mapping.Subclass

public class Subclass
extends PersistentClass

A sublass in a table-per-subclass, or table-per-concrete-class inheritance hierarchy.

Author:
Gavin King

Field Summary
 
Fields inherited from class net.sf.hibernate.mapping.PersistentClass
NOT_NULL_DISCRIMINATOR_MAPPING, NULL_DISCRIMINATOR_MAPPING
 
Constructor Summary
Subclass(PersistentClass superclass)
           
 
Method Summary
 void addNewProperty(Property p)
          Add a new property definition
protected  void addSubclassProperty(Property p)
           
protected  void addSubclassTable(Table table)
           
 void createForeignKey()
           
 CacheConcurrencyStrategy getCache()
           
 Class getClassPersisterClass()
           
 Value getDiscriminator()
           
 SimpleValue getIdentifier()
           
 Property getIdentifierProperty()
           
 SimpleValue getKey()
           
 Iterator getPropertyClosureIterator()
           
 RootClass getRootClass()
           
 Table getRootTable()
           
 PersistentClass getSuperclass()
           
 Iterator getTableClosureIterator()
           
 Property getVersion()
           
 String getWhere()
           
 boolean hasEmbeddedIdentifier()
           
 boolean hasIdentifierProperty()
           
 boolean isDiscriminatorInsertable()
           
 boolean isExplicitPolymorphism()
           
 boolean isInherited()
           
 boolean isJoinedSubclass()
           
 boolean isMutable()
           
 boolean isPolymorphic()
           
 boolean isVersioned()
           
 void setClassPersisterClass(Class classPersisterClass)
           
 void setKey(SimpleValue key)
           
 void setSuperclass(PersistentClass superclass)
           
 void setTable(Table table)
           
 void validate(Mapping mapping)
           
 
Methods inherited from class net.sf.hibernate.mapping.PersistentClass
addProperty, addSubclass, createPrimaryKey, getBatchSize, getDirectSubclasses, getDiscriminatorValue, getMappedClass, getMetaAttribute, getMetaAttributes, getName, getOptimisticLockMode, getProperty, getPropertyIterator, getProxyInterface, getSubclassIterator, getSubclassPropertyClosureIterator, getSubclassSpan, getSubclassTableClosureIterator, getTable, hasSelectBeforeUpdate, hasSubclasses, isDiscriminatorValueNotNull, isDiscriminatorValueNull, isForceDiscriminator, setBatchSize, setDiscriminatorValue, setDynamicInsert, setDynamicUpdate, setMappedClass, setMetaAttributes, setOptimisticLockMode, setProxyInterface, setSelectBeforeUpdate, toString, useDynamicInsert, useDynamicUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Subclass

public Subclass(PersistentClass superclass)
Method Detail

getCache

public CacheConcurrencyStrategy getCache()
Specified by:
getCache in class PersistentClass

getRootClass

public RootClass getRootClass()
Specified by:
getRootClass in class PersistentClass

getSuperclass

public PersistentClass getSuperclass()
Specified by:
getSuperclass in class PersistentClass

getIdentifierProperty

public Property getIdentifierProperty()
Specified by:
getIdentifierProperty in class PersistentClass

getIdentifier

public SimpleValue getIdentifier()
Specified by:
getIdentifier in class PersistentClass

hasIdentifierProperty

public boolean hasIdentifierProperty()
Specified by:
hasIdentifierProperty in class PersistentClass

getDiscriminator

public Value getDiscriminator()
Specified by:
getDiscriminator in class PersistentClass

isMutable

public boolean isMutable()
Specified by:
isMutable in class PersistentClass

isInherited

public boolean isInherited()
Specified by:
isInherited in class PersistentClass

isPolymorphic

public boolean isPolymorphic()
Specified by:
isPolymorphic in class PersistentClass

addNewProperty

public void addNewProperty(Property p)
                    throws MappingException
Description copied from class: PersistentClass
Add a new property definition

Overrides:
addNewProperty in class PersistentClass
Parameters:
p -
Throws:
MappingException - if the property was already defined

setTable

public void setTable(Table table)
Overrides:
setTable in class PersistentClass

getPropertyClosureIterator

public Iterator getPropertyClosureIterator()
Specified by:
getPropertyClosureIterator in class PersistentClass

getTableClosureIterator

public Iterator getTableClosureIterator()
Specified by:
getTableClosureIterator in class PersistentClass

addSubclassProperty

protected void addSubclassProperty(Property p)
Overrides:
addSubclassProperty in class PersistentClass

addSubclassTable

protected void addSubclassTable(Table table)
Overrides:
addSubclassTable in class PersistentClass

isVersioned

public boolean isVersioned()
Specified by:
isVersioned in class PersistentClass

getVersion

public Property getVersion()
Specified by:
getVersion in class PersistentClass

hasEmbeddedIdentifier

public boolean hasEmbeddedIdentifier()
Specified by:
hasEmbeddedIdentifier in class PersistentClass

getClassPersisterClass

public Class getClassPersisterClass()
Specified by:
getClassPersisterClass in class PersistentClass

getRootTable

public Table getRootTable()
Specified by:
getRootTable in class PersistentClass

getKey

public SimpleValue getKey()
Specified by:
getKey in class PersistentClass

isExplicitPolymorphism

public boolean isExplicitPolymorphism()
Specified by:
isExplicitPolymorphism in class PersistentClass

setKey

public void setKey(SimpleValue key)

setSuperclass

public void setSuperclass(PersistentClass superclass)

getWhere

public String getWhere()
Specified by:
getWhere in class PersistentClass

validate

public void validate(Mapping mapping)
              throws MappingException
Overrides:
validate in class PersistentClass
Throws:
MappingException

isJoinedSubclass

public boolean isJoinedSubclass()
Specified by:
isJoinedSubclass in class PersistentClass

createForeignKey

public void createForeignKey()

setClassPersisterClass

public void setClassPersisterClass(Class classPersisterClass)
Specified by:
setClassPersisterClass in class PersistentClass

isDiscriminatorInsertable

public boolean isDiscriminatorInsertable()
Specified by:
isDiscriminatorInsertable in class PersistentClass