|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.hibernate.persister.entity.BasicEntityPersister
org.hibernate.persister.entity.UnionSubclassEntityPersister
Implementation of the "table-per-concrete-class" or "roll-down" mapping strategy for an entity and its inheritence hierarchy.
| Field Summary |
| Fields inherited from class org.hibernate.persister.entity.BasicEntityPersister |
customSQLDelete, customSQLInsert, customSQLUpdate, deleteCallable, ENTITY_CLASS, insertCallable, propertyMapping, rowIdName, updateCallable |
| Fields inherited from interface org.hibernate.persister.entity.Loadable |
ROWID_ALIAS |
| Fields inherited from interface org.hibernate.persister.entity.EntityPersister |
ENTITY_ID |
| Fields inherited from interface org.hibernate.intercept.LazyPropertyInitializer |
UNFETCHED_PROPERTY |
| Constructor Summary | |
UnionSubclassEntityPersister(PersistentClass persistentClass,
CacheConcurrencyStrategy cache,
SessionFactoryImplementor factory,
Mapping mapping)
|
|
| Method Summary | |
protected void |
addDiscriminatorToSelect(SelectFragment select,
String name,
String suffix)
|
String |
filterFragment(String name)
|
String |
fromTableFragment(String name)
Get the main from table fragment, given a query alias. |
protected String |
generateSelectString(LockMode lockMode)
Generate the SQL that selects a row by id |
protected String |
generateSubquery(PersistentClass model,
Mapping mapping)
|
protected String |
getDiscriminatorFormula()
|
String |
getDiscriminatorSQLValue()
Get the discriminator value for this particular concrete subclass, as a string that may be embedded in a select statement |
Type |
getDiscriminatorType()
Get the discriminator type |
protected String[] |
getKeyColumns(int j)
|
Serializable[] |
getPropertySpaces()
Returns an array of objects that identify spaces in which properties of this class are persisted, for instances of this class only. |
String |
getPropertyTableName(String propertyName)
Get the table name for the given property path |
protected int[] |
getPropertyTableNumbers()
|
protected int[] |
getPropertyTableNumbersInSelect()
|
Serializable[] |
getQuerySpaces()
Returns an array of objects that identify spaces in which properties of this class are persisted, for instances of this class and its subclasses. |
String[] |
getSubclassClosure()
|
protected int[] |
getSubclassColumnTableNumberClosure()
|
String |
getSubclassForDiscriminatorValue(Object value)
Get the concrete subclass corresponding to the given discriminator value |
protected int[] |
getSubclassFormulaTableNumberClosure()
|
String |
getSubclassPropertyTableName(int i)
Return the table name used to persist the numbered property of the class or a subclass. |
protected int |
getSubclassPropertyTableNumber(int i)
|
protected 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. |
protected String[] |
getSubclassTableKeyColumns(int j)
|
protected String |
getSubclassTableName(int j)
|
protected int |
getSubclassTableSpan()
|
protected boolean[] |
getTableHasColumns()
|
String |
getTableName()
The table to join to. |
protected String |
getTableName(int j)
|
protected int |
getTableSpan()
|
protected boolean |
isClassOrSuperclassTable(int j)
|
protected boolean |
isDiscriminatorFormula()
|
protected boolean |
isPropertyOfTable(int property,
int j)
|
protected boolean |
isTableCascadeDeleteEnabled(int j)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public UnionSubclassEntityPersister(PersistentClass persistentClass,
CacheConcurrencyStrategy cache,
SessionFactoryImplementor factory,
Mapping mapping)
throws HibernateException
| Method Detail |
public Serializable[] getQuerySpaces()
EntityPersister
getQuerySpaces in interface EntityPersistergetQuerySpaces in class BasicEntityPersisterpublic String getTableName()
Joinable
public Type getDiscriminatorType()
Loadable
public String getDiscriminatorSQLValue()
Queryable
public String[] getSubclassClosure()
public String getSubclassForDiscriminatorValue(Object value)
Loadable
public Serializable[] getPropertySpaces()
EntityPersister
protected boolean isDiscriminatorFormula()
protected String generateSelectString(LockMode lockMode)
protected String getDiscriminatorFormula()
protected String getTableName(int j)
getTableName in class BasicEntityPersisterprotected String[] getKeyColumns(int j)
getKeyColumns in class BasicEntityPersisterprotected boolean isTableCascadeDeleteEnabled(int j)
isTableCascadeDeleteEnabled in class BasicEntityPersister
protected boolean isPropertyOfTable(int property,
int j)
isPropertyOfTable in class BasicEntityPersisterpublic String fromTableFragment(String name)
OuterJoinLoadable
public String filterFragment(String name)
filterFragment in class BasicEntityPersisterpublic String getSubclassPropertyTableName(int i)
OuterJoinLoadable
protected void addDiscriminatorToSelect(SelectFragment select,
String name,
String suffix)
addDiscriminatorToSelect in class BasicEntityPersisterprotected int[] getPropertyTableNumbersInSelect()
getPropertyTableNumbersInSelect in class BasicEntityPersisterprotected int getSubclassPropertyTableNumber(int i)
getSubclassPropertyTableNumber in class BasicEntityPersisterprotected int getSubclassPropertyTableNumber(String propertyName)
BasicEntityPersister
getSubclassPropertyTableNumber in class BasicEntityPersisterprotected int getTableSpan()
getTableSpan in class BasicEntityPersisterprotected int[] getSubclassColumnTableNumberClosure()
getSubclassColumnTableNumberClosure in class BasicEntityPersisterprotected int[] getSubclassFormulaTableNumberClosure()
getSubclassFormulaTableNumberClosure in class BasicEntityPersisterprotected boolean[] getTableHasColumns()
protected int[] getPropertyTableNumbers()
getPropertyTableNumbers in class BasicEntityPersister
protected String generateSubquery(PersistentClass model,
Mapping mapping)
protected String[] getSubclassTableKeyColumns(int j)
getSubclassTableKeyColumns in class BasicEntityPersisterprotected String getSubclassTableName(int j)
getSubclassTableName in class BasicEntityPersisterprotected int getSubclassTableSpan()
getSubclassTableSpan in class BasicEntityPersisterprotected boolean isClassOrSuperclassTable(int j)
isClassOrSuperclassTable in class BasicEntityPersisterpublic String getPropertyTableName(String propertyName)
OuterJoinLoadable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||