|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.persister.entity.AbstractEntityPersister
org.hibernate.persister.entity.JoinedSubclassEntityPersister
public class JoinedSubclassEntityPersister
An EntityPersister implementing the normalized "table-per-subclass" mapping strategy
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.hibernate.persister.entity.AbstractEntityPersister |
|---|
AbstractEntityPersister.InclusionChecker |
| Nested classes/interfaces inherited from interface org.hibernate.persister.entity.Queryable |
|---|
Queryable.Declarer |
| Field Summary |
|---|
| Fields inherited from class org.hibernate.persister.entity.AbstractEntityPersister |
|---|
customSQLDelete, customSQLInsert, customSQLUpdate, deleteCallable, deleteResultCheckStyles, ENTITY_CLASS, insertCallable, insertResultCheckStyles, propertyMapping, rowIdName, updateCallable, updateResultCheckStyles |
| 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.persister.entity.Loadable |
|---|
ROWID_ALIAS |
| Fields inherited from interface org.hibernate.persister.entity.EntityPersister |
|---|
ENTITY_ID |
| 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.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 | |
|---|---|
JoinedSubclassEntityPersister(PersistentClass persistentClass,
CacheConcurrencyStrategy cache,
SessionFactoryImplementor factory,
Mapping mapping)
|
|
| Method Summary | |
|---|---|
void |
addDiscriminatorToSelect(SelectFragment select,
String name,
String suffix)
|
String |
filterFragment(String alias)
|
String |
fromTableFragment(String alias)
Get the main from table fragment, given a query alias. |
String |
generateFilterConditionAlias(String rootAlias)
The alias used for any filter conditions (mapped where-fragments or enabled-filters). |
String[] |
getConstraintOrderedTableNameClosure()
Get the names of all tables used in the hierarchy (up and down) ordered such that deletes in the given order would not cause contraint violations. |
String[][] |
getContraintOrderedTableKeyColumnClosure()
For each table specified in Queryable.getConstraintOrderedTableNameClosure(), get
the columns that define the key between the various hierarchy classes. |
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 |
String[] |
getIdentifierColumnNames()
Get the names of columns used to persist the identifier |
protected String[] |
getKeyColumns(int j)
|
Serializable[] |
getPropertySpaces()
Returns an array of objects that identify spaces in which properties of this entity 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()
|
String |
getRootTableAlias(String drivingAlias)
Get the SQL alias this persister would use for the root table given the passed driving alias. |
String |
getRootTableName()
Locks are always applied to the "root table". |
protected int[] |
getSubclassColumnTableNumberClosure()
|
String |
getSubclassForDiscriminatorValue(Object value)
Get the concrete subclass corresponding to the given discriminator value |
protected int[] |
getSubclassFormulaTableNumberClosure()
|
Queryable.Declarer |
getSubclassPropertyDeclarer(String propertyPath)
Determine whether the given property is declared by our mapped class, our super class, or one of our subclasses... |
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 String[] |
getSubclassTableKeyColumns(int j)
|
String |
getSubclassTableName(int j)
Get the name of the table with the given index from the internal array. |
int |
getSubclassTableSpan()
|
String |
getTableName()
The table to join to. |
protected String |
getTableName(int j)
|
int |
getTableSpan()
|
protected boolean |
isClassOrSuperclassTable(int j)
|
boolean |
isMultiTable()
Is the inheritence hierarchy described by this persister contained across multiple tables? |
protected boolean |
isPropertyOfTable(int property,
int j)
|
protected boolean |
isTableCascadeDeleteEnabled(int j)
|
String[] |
toColumns(String alias,
String propertyName)
Given a query alias and a property path, return the qualified column name |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JoinedSubclassEntityPersister(PersistentClass persistentClass,
CacheConcurrencyStrategy cache,
SessionFactoryImplementor factory,
Mapping mapping)
throws HibernateException
HibernateException| Method Detail |
|---|
public String getSubclassPropertyTableName(int i)
OuterJoinLoadable
public Type getDiscriminatorType()
Loadable
public String getDiscriminatorSQLValue()
Queryable
public String getSubclassForDiscriminatorValue(Object value)
Loadable
public Serializable[] getPropertySpaces()
EntityPersister
protected String getTableName(int j)
getTableName in class AbstractEntityPersisterprotected String[] getKeyColumns(int j)
getKeyColumns in class AbstractEntityPersisterprotected boolean isTableCascadeDeleteEnabled(int j)
isTableCascadeDeleteEnabled in class AbstractEntityPersister
protected boolean isPropertyOfTable(int property,
int j)
isPropertyOfTable in class AbstractEntityPersisterpublic String fromTableFragment(String alias)
OuterJoinLoadable
public String getTableName()
Joinable
public void addDiscriminatorToSelect(SelectFragment select,
String name,
String suffix)
addDiscriminatorToSelect in class AbstractEntityPersisterpublic String filterFragment(String alias)
filterFragment in class AbstractEntityPersisterpublic String generateFilterConditionAlias(String rootAlias)
Queryable
generateFilterConditionAlias in interface QueryablegenerateFilterConditionAlias in class AbstractEntityPersisterrootAlias - The root alias
public String[] getIdentifierColumnNames()
Loadable
getIdentifierColumnNames in interface LoadablegetIdentifierColumnNames in interface QueryablegetIdentifierColumnNames in class AbstractEntityPersister
public String[] toColumns(String alias,
String propertyName)
throws QueryException
PropertyMapping
toColumns in interface PropertyMappingtoColumns in class AbstractEntityPersisterQueryExceptionprotected int[] getPropertyTableNumbersInSelect()
getPropertyTableNumbersInSelect in class AbstractEntityPersisterprotected int getSubclassPropertyTableNumber(int i)
getSubclassPropertyTableNumber in class AbstractEntityPersisterpublic int getTableSpan()
getTableSpan in class AbstractEntityPersisterpublic boolean isMultiTable()
Queryable
isMultiTable in interface QueryableisMultiTable in class AbstractEntityPersisterprotected int[] getSubclassColumnTableNumberClosure()
getSubclassColumnTableNumberClosure in class AbstractEntityPersisterprotected int[] getSubclassFormulaTableNumberClosure()
getSubclassFormulaTableNumberClosure in class AbstractEntityPersisterprotected int[] getPropertyTableNumbers()
getPropertyTableNumbers in class AbstractEntityPersisterprotected String[] getSubclassTableKeyColumns(int j)
getSubclassTableKeyColumns in class AbstractEntityPersisterpublic String getSubclassTableName(int j)
Queryable
getSubclassTableName in interface QueryablegetSubclassTableName in class AbstractEntityPersisterj - The index into the internal array.
public int getSubclassTableSpan()
getSubclassTableSpan in class AbstractEntityPersisterprotected boolean isClassOrSuperclassTable(int j)
isClassOrSuperclassTable in class AbstractEntityPersisterpublic String getPropertyTableName(String propertyName)
OuterJoinLoadable
public String[] getConstraintOrderedTableNameClosure()
Queryable
public String[][] getContraintOrderedTableKeyColumnClosure()
QueryableQueryable.getConstraintOrderedTableNameClosure(), get
the columns that define the key between the various hierarchy classes.
The first dimension here corresponds to the table indexes returned in
Queryable.getConstraintOrderedTableNameClosure().
The second dimension should have the same length across all the elements in
the first dimension. If not, that'd be a problem ;)
public String getRootTableName()
Lockable
getRootTableName in interface LockablegetRootTableName in class AbstractEntityPersisterpublic String getRootTableAlias(String drivingAlias)
Lockable
getRootTableAlias in interface LockablegetRootTableAlias in class AbstractEntityPersisterdrivingAlias - The driving alias; or the alias for the table
mapped by this persister in the hierarchy.
public Queryable.Declarer getSubclassPropertyDeclarer(String propertyPath)
QueryableQueryable.getSubclassPropertyTableNumber(java.lang.String)
getSubclassPropertyDeclarer in interface QueryablegetSubclassPropertyDeclarer in class AbstractEntityPersisterpropertyPath - The property name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||