public class

UnionSubclassEntityPersister

extends AbstractEntityPersister
java.lang.Object
   ↳ org.hibernate.persister.entity.AbstractEntityPersister
     ↳ org.hibernate.persister.entity.UnionSubclassEntityPersister

Class Overview

Implementation of the "table-per-concrete-class" or "roll-down" mapping strategy for an entity and its inheritence hierarchy.

Summary

[Expand]
Inherited Constants
From class org.hibernate.persister.entity.AbstractEntityPersister
From interface org.hibernate.persister.entity.EntityPersister
From interface org.hibernate.persister.entity.Loadable
[Expand]
Inherited Fields
From class org.hibernate.persister.entity.AbstractEntityPersister
From interface org.hibernate.intercept.LazyPropertyInitializer
Public Constructors
UnionSubclassEntityPersister(PersistentClass persistentClass, EntityRegionAccessStrategy cacheAccessStrategy, SessionFactoryImplementor factory, Mapping mapping)
Public Methods
String filterFragment(String name)
String fromTableFragment(String name)
String[] getConstraintOrderedTableNameClosure()
String[][] getContraintOrderedTableKeyColumnClosure()
String getDiscriminatorSQLValue()
Type getDiscriminatorType()
Serializable[] getPropertySpaces()
String getPropertyTableName(String propertyName)
Serializable[] getQuerySpaces()
Returns an array of objects that identify spaces in which properties of this entity are persisted, for instances of this class and its subclasses.
String[] getSubclassClosure()
String getSubclassForDiscriminatorValue(Object value)
String getSubclassPropertyTableName(int i)
int getSubclassPropertyTableNumber(String propertyName)
Warning: When there are duplicated property names in the subclasses of the class, this method may return the wrong table number for the duplicated subclass property (note that SingleTableEntityPersister defines an overloaded form which takes the entity name.
String getSubclassTableName(int j)
Get the name of the table with the given index from the internal array.
int getSubclassTableSpan()
String getTableName()
int getTableSpan()
boolean isMultiTable()
Is the inheritence hierarchy described by this persister contained across multiple tables?
Protected Methods
void addDiscriminatorToSelect(SelectFragment select, String name, String suffix)
String generateSelectString(LockMode lockMode)
Generate the SQL that selects a row by id
String generateSubquery(PersistentClass model, Mapping mapping)
String getDiscriminatorFormula()
String[] getKeyColumns(int j)
int[] getPropertyTableNumbers()
int[] getPropertyTableNumbersInSelect()
int[] getSubclassColumnTableNumberClosure()
int[] getSubclassFormulaTableNumberClosure()
int getSubclassPropertyTableNumber(int i)
String[] getSubclassTableKeyColumns(int j)
boolean[] getTableHasColumns()
String getTableName(int j)
boolean isClassOrSuperclassTable(int j)
boolean isDiscriminatorFormula()
boolean isPropertyOfTable(int property, int j)
boolean isTableCascadeDeleteEnabled(int j)
[Expand]
Inherited Methods
From class org.hibernate.persister.entity.AbstractEntityPersister
From class java.lang.Object
From interface org.hibernate.cache.OptimisticCacheSource
From interface org.hibernate.id.PostInsertIdentityPersister
From interface org.hibernate.intercept.LazyPropertyInitializer
From interface org.hibernate.metadata.ClassMetadata
From interface org.hibernate.persister.entity.EntityPersister
From interface org.hibernate.persister.entity.Joinable
From interface org.hibernate.persister.entity.Loadable
From interface org.hibernate.persister.entity.Lockable
From interface org.hibernate.persister.entity.OuterJoinLoadable
From interface org.hibernate.persister.entity.PropertyMapping
From interface org.hibernate.persister.entity.Queryable
From interface org.hibernate.persister.entity.SQLLoadable
From interface org.hibernate.persister.entity.UniqueKeyLoadable

Public Constructors

public UnionSubclassEntityPersister (PersistentClass persistentClass, EntityRegionAccessStrategy cacheAccessStrategy, SessionFactoryImplementor factory, Mapping mapping)

Public Methods

public String filterFragment (String name)

public String fromTableFragment (String name)

public String[] getConstraintOrderedTableNameClosure ()

public String[][] getContraintOrderedTableKeyColumnClosure ()

public String getDiscriminatorSQLValue ()

public Type getDiscriminatorType ()

public Serializable[] getPropertySpaces ()

public String getPropertyTableName (String propertyName)

public Serializable[] getQuerySpaces ()

Returns an array of objects that identify spaces in which properties of this entity are persisted, for instances of this class and its subclasses.

Much like getPropertySpaces(), except that here we include subclass entity spaces.

Returns
  • The query spaces.

public String[] getSubclassClosure ()

public String getSubclassForDiscriminatorValue (Object value)

public String getSubclassPropertyTableName (int i)

public int getSubclassPropertyTableNumber (String propertyName)

Warning: When there are duplicated property names in the subclasses of the class, this method may return the wrong table number for the duplicated subclass property (note that SingleTableEntityPersister defines an overloaded form which takes the entity name.

Parameters
propertyName The name of the property.
Returns
  • The nunber of the table to which the property is mapped.

public String getSubclassTableName (int j)

Get the name of the table with the given index from the internal array.

Parameters
j The index into the internal array.

public int getSubclassTableSpan ()

public String getTableName ()

public int getTableSpan ()

public boolean isMultiTable ()

Is the inheritence hierarchy described by this persister contained across multiple tables?

Returns
  • True if the inheritence hierarchy is spread across multiple tables; false otherwise.

Protected Methods

protected void addDiscriminatorToSelect (SelectFragment select, String name, String suffix)

protected String generateSelectString (LockMode lockMode)

Generate the SQL that selects a row by id

protected String generateSubquery (PersistentClass model, Mapping mapping)

protected String getDiscriminatorFormula ()

protected String[] getKeyColumns (int j)

protected int[] getPropertyTableNumbers ()

protected int[] getPropertyTableNumbersInSelect ()

protected int[] getSubclassColumnTableNumberClosure ()

protected int[] getSubclassFormulaTableNumberClosure ()

protected int getSubclassPropertyTableNumber (int i)

protected String[] getSubclassTableKeyColumns (int j)

protected boolean[] getTableHasColumns ()

protected String getTableName (int j)

protected boolean isClassOrSuperclassTable (int j)

protected boolean isDiscriminatorFormula ()

protected boolean isPropertyOfTable (int property, int j)

protected boolean isTableCascadeDeleteEnabled (int j)