net.sf.hibernate.mapping
Class RootClass

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

public class RootClass
extends PersistentClass

The root class of a table-per-subclass, or table-per-concrete-class inheritance hierarchy.

Author:
Gavin King

Field Summary
static String DEFAULT_DISCRIMINATOR_COLUMN_NAME
           
static String DEFAULT_IDENTIFIER_COLUMN_NAME
           
 
Fields inherited from class net.sf.hibernate.mapping.PersistentClass
NOT_NULL_DISCRIMINATOR_MAPPING, NULL_DISCRIMINATOR_MAPPING
 
Constructor Summary
RootClass()
           
 
Method Summary
 void addSubclass(Subclass subclass)
           
 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 isExplicitPolymorphism()
           
 boolean isForceDiscriminator()
          Returns the forceDiscriminator.
 boolean isInherited()
           
 boolean isMutable()
           
 boolean isPolymorphic()
           
 boolean isVersioned()
           
 void setCache(CacheConcurrencyStrategy cache)
          Sets the cache.
 void setClassPersisterClass(Class persister)
           
 void setDiscriminator(SimpleValue discriminator)
          Sets the discriminator.
 void setEmbeddedIdentifier(boolean embeddedIdentifier)
          Sets the embeddedIdentifier.
 void setExplicitPolymorphism(boolean explicitPolymorphism)
          Sets the explicitPolymorphism.
 void setForceDiscriminator(boolean forceDiscriminator)
          Sets the forceDiscriminator.
 void setIdentifier(SimpleValue identifier)
          Sets the identifier.
 void setIdentifierProperty(Property identifierProperty)
          Sets the identifierProperty.
 void setMutable(boolean mutable)
          Sets the mutable.
 void setPolymorphic(boolean polymorphic)
           
 void setVersion(Property version)
           
 void setWhere(String string)
           
 void validate(Mapping mapping)
           
 
Methods inherited from class net.sf.hibernate.mapping.PersistentClass
addNewProperty, addProperty, addSubclassProperty, addSubclassTable, createPrimaryKey, getBatchSize, getDirectSubclasses, getDiscriminatorValue, getMappedClass, getMetaAttribute, getMetaAttributes, getName, getOptimisticLockMode, getProperty, getPropertyIterator, getProxyInterface, getSubclassIterator, getSubclassPropertyClosureIterator, getSubclassSpan, getSubclassTableClosureIterator, getTable, hasSelectBeforeUpdate, hasSubclasses, isDiscriminatorValueNotNull, isDiscriminatorValueNull, setBatchSize, setDiscriminatorValue, setDynamicInsert, setDynamicUpdate, setMappedClass, setMetaAttributes, setOptimisticLockMode, setProxyInterface, setSelectBeforeUpdate, setTable, useDynamicInsert, useDynamicUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_IDENTIFIER_COLUMN_NAME

public static final String DEFAULT_IDENTIFIER_COLUMN_NAME
See Also:
Constant Field Values

DEFAULT_DISCRIMINATOR_COLUMN_NAME

public static final String DEFAULT_DISCRIMINATOR_COLUMN_NAME
See Also:
Constant Field Values
Constructor Detail

RootClass

public RootClass()
Method Detail

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

isInherited

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

isPolymorphic

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

setPolymorphic

public void setPolymorphic(boolean polymorphic)

getRootClass

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

getPropertyClosureIterator

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

getTableClosureIterator

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

addSubclass

public void addSubclass(Subclass subclass)
                 throws MappingException
Overrides:
addSubclass in class PersistentClass
Throws:
MappingException

isExplicitPolymorphism

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

getVersion

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

setVersion

public void setVersion(Property version)

isVersioned

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

getCache

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

isMutable

public boolean isMutable()
Specified by:
isMutable 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

setClassPersisterClass

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

getSuperclass

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

getKey

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

setDiscriminator

public void setDiscriminator(SimpleValue discriminator)
Sets the discriminator.

Parameters:
discriminator - The discriminator to set

setEmbeddedIdentifier

public void setEmbeddedIdentifier(boolean embeddedIdentifier)
Sets the embeddedIdentifier.

Parameters:
embeddedIdentifier - The embeddedIdentifier to set

setExplicitPolymorphism

public void setExplicitPolymorphism(boolean explicitPolymorphism)
Sets the explicitPolymorphism.

Parameters:
explicitPolymorphism - The explicitPolymorphism to set

setIdentifier

public void setIdentifier(SimpleValue identifier)
Sets the identifier.

Parameters:
identifier - The identifier to set

setIdentifierProperty

public void setIdentifierProperty(Property identifierProperty)
Sets the identifierProperty.

Parameters:
identifierProperty - The identifierProperty to set

setMutable

public void setMutable(boolean mutable)
Sets the mutable.

Parameters:
mutable - The mutable to set

setCache

public void setCache(CacheConcurrencyStrategy cache)
Sets the cache.

Parameters:
cache - The cache to set

isForceDiscriminator

public boolean isForceDiscriminator()
Returns the forceDiscriminator.

Overrides:
isForceDiscriminator in class PersistentClass
Returns:
boolean

setForceDiscriminator

public void setForceDiscriminator(boolean forceDiscriminator)
Sets the forceDiscriminator.

Parameters:
forceDiscriminator - The forceDiscriminator to set

getWhere

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

setWhere

public void setWhere(String string)

validate

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