Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.hibernate.persister.entity.AbstractEntityPersister
org.hibernate.persister.entity.SingleTableEntityPersister
public class SingleTableEntityPersister
extends AbstractEntityPersister
Nested Class Summary |
Nested classes/interfaces inherited from class org.hibernate.persister.entity.AbstractEntityPersister | |
AbstractEntityPersister.InclusionChecker |
Field Summary |
Fields inherited from class org.hibernate.persister.entity.AbstractEntityPersister | |
ENTITY_CLASS , customSQLDelete , customSQLInsert , customSQLUpdate , deleteCallable , deleteResultCheckStyles , insertCallable , insertResultCheckStyles , propertyMapping , rowIdName , updateCallable , updateResultCheckStyles |
Fields inherited from interface org.hibernate.persister.entity.EntityPersister | |
ENTITY_ID |
Fields inherited from interface org.hibernate.intercept.LazyPropertyInitializer | |
UNFETCHED_PROPERTY |
Fields inherited from interface org.hibernate.persister.entity.Loadable | |
ROWID_ALIAS |
Constructor Summary | |
|
Method Summary | |
protected void |
|
protected void |
|
String |
|
String |
|
String[] |
|
String[][] |
|
protected String | |
String | |
protected String | |
protected String | |
String |
|
Type | |
protected String[] |
|
Serializable[] |
|
String |
|
protected int[] | |
protected int[] | |
protected String |
|
String[] | |
protected int[] | |
String |
|
protected int[] | |
String |
|
protected int | |
protected String[] |
|
String |
|
int | |
String |
|
protected String |
|
int | |
boolean | |
protected boolean |
|
protected boolean | |
protected boolean |
|
protected boolean |
|
boolean |
|
protected boolean |
|
protected boolean |
|
protected boolean |
|
protected boolean |
|
protected boolean |
|
protected boolean | |
protected boolean |
|
String |
|
void |
|
public SingleTableEntityPersister(PersistentClass persistentClass, EntityRegionAccessStrategy cacheAccessStrategy, SessionFactoryImplementor factory, Mapping mapping) throws HibernateException
protected void addDiscriminatorToInsert(Insert insert)
- Overrides:
- addDiscriminatorToInsert in interface AbstractEntityPersister
protected void addDiscriminatorToSelect(SelectFragment select, String name, String suffix)
- Overrides:
- addDiscriminatorToSelect in interface AbstractEntityPersister
public String filterFragment(String alias) throws MappingException
- Overrides:
- filterFragment in interface AbstractEntityPersister
public String fromTableFragment(String name)
- Specified by:
- fromTableFragment in interface OuterJoinLoadable
public 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.
- Specified by:
- getConstraintOrderedTableNameClosure in interface Queryable
- Returns:
- The ordered array of table names.
public String[][] getContraintOrderedTableKeyColumnClosure()
For each table specified inQueryable.getConstraintOrderedTableNameClosure()
, get the columns that define the key between the various hierarchy classes. The first dimension here corresponds to the table indexes returned inQueryable.getConstraintOrderedTableNameClosure()
. The second dimension should have the same length across all the elements in the first dimension. If not, that'd be a problem ;)
- Specified by:
- getContraintOrderedTableKeyColumnClosure in interface Queryable
- Returns:
protected String getDiscriminatorAlias()
- Overrides:
- getDiscriminatorAlias in interface AbstractEntityPersister
public String getDiscriminatorColumnName()
- Specified by:
- getDiscriminatorColumnName in interface Loadable
- Overrides:
- getDiscriminatorColumnName in interface AbstractEntityPersister
protected String getDiscriminatorFormula()
protected String getDiscriminatorFormulaTemplate()
- Overrides:
- getDiscriminatorFormulaTemplate in interface AbstractEntityPersister
public String getDiscriminatorSQLValue()
Get the discriminator value for this particular concrete subclass, as a string that may be embedded in a select statement
- Specified by:
- getDiscriminatorSQLValue in interface Queryable
public Type getDiscriminatorType()
- Specified by:
- getDiscriminatorType in interface Loadable
protected String[] getKeyColumns(int j)
- Overrides:
- getKeyColumns in interface AbstractEntityPersister
public Serializable[] getPropertySpaces()
Returns an array of objects that identify spaces in which properties of this entity are persisted, for instances of this class only. For most implementations, this returns the complete set of table names to which instances of the mapped entity are persisted (not accounting for superclass entity mappings).
- Specified by:
- getPropertySpaces in interface EntityPersister
- Returns:
- The property spaces.
public String getPropertyTableName(String propertyName)
- Specified by:
- getPropertyTableName in interface OuterJoinLoadable
protected int[] getPropertyTableNumbers()
- Overrides:
- getPropertyTableNumbers in interface AbstractEntityPersister
protected int[] getPropertyTableNumbersInSelect()
- Overrides:
- getPropertyTableNumbersInSelect in interface AbstractEntityPersister
protected String getSequentialSelect(String entityName)
- Overrides:
- getSequentialSelect in interface AbstractEntityPersister
public String[] getSubclassClosure()
protected int[] getSubclassColumnTableNumberClosure()
- Overrides:
- getSubclassColumnTableNumberClosure in interface AbstractEntityPersister
public String getSubclassForDiscriminatorValue(Object value)
- Specified by:
- getSubclassForDiscriminatorValue in interface Loadable
protected int[] getSubclassFormulaTableNumberClosure()
- Overrides:
- getSubclassFormulaTableNumberClosure in interface AbstractEntityPersister
public String getSubclassPropertyTableName(int i)
- Specified by:
- getSubclassPropertyTableName in interface OuterJoinLoadable
protected int getSubclassPropertyTableNumber(int i)
- Overrides:
- getSubclassPropertyTableNumber in interface AbstractEntityPersister
protected String[] getSubclassTableKeyColumns(int j)
- Overrides:
- getSubclassTableKeyColumns in interface AbstractEntityPersister
public String getSubclassTableName(int j)
Get the name of the table with the given index from the internal array.
- Specified by:
- getSubclassTableName in interface Queryable
- Overrides:
- getSubclassTableName in interface AbstractEntityPersister
- Parameters:
- Returns:
public int getSubclassTableSpan()
- Overrides:
- getSubclassTableSpan in interface AbstractEntityPersister
public String getTableName()
The table to join to.
- Specified by:
- getTableName in interface Joinable
protected String getTableName(int j)
- Overrides:
- getTableName in interface AbstractEntityPersister
public boolean hasSequentialSelect()
- Overrides:
- hasSequentialSelect in interface AbstractEntityPersister
protected boolean isClassOrSuperclassTable(int j)
- Overrides:
- isClassOrSuperclassTable in interface AbstractEntityPersister
protected boolean isDiscriminatorFormula()
protected boolean isInverseSubclassTable(int j)
- Overrides:
- isInverseSubclassTable in interface AbstractEntityPersister
protected boolean isInverseTable(int j)
- Overrides:
- isInverseTable in interface AbstractEntityPersister
public boolean isMultiTable()
Is the inheritence hierarchy described by this persister contained across multiple tables?
- Specified by:
- isMultiTable in interface Queryable
- Overrides:
- isMultiTable in interface AbstractEntityPersister
- Returns:
- True if the inheritence hierarchy is spread across multiple tables; false otherwise.
protected boolean isNullableSubclassTable(int j)
- Overrides:
- isNullableSubclassTable in interface AbstractEntityPersister
protected boolean isNullableTable(int j)
- Overrides:
- isNullableTable in interface AbstractEntityPersister
protected boolean isPropertyOfTable(int property, int j)
- Overrides:
- isPropertyOfTable in interface AbstractEntityPersister
protected boolean isSubclassPropertyDeferred(String propertyName, String entityName)
- Overrides:
- isSubclassPropertyDeferred in interface AbstractEntityPersister
protected boolean isSubclassTableLazy(int j)
- Overrides:
- isSubclassTableLazy in interface AbstractEntityPersister
protected boolean isSubclassTableSequentialSelect(int j)
- Overrides:
- isSubclassTableSequentialSelect in interface AbstractEntityPersister
protected boolean isTableCascadeDeleteEnabled(int j)
- Overrides:
- isTableCascadeDeleteEnabled in interface AbstractEntityPersister
public String oneToManyFilterFragment(String alias) throws MappingException
- Specified by:
- oneToManyFilterFragment in interface Joinable
- Overrides:
- oneToManyFilterFragment in interface AbstractEntityPersister
public void postInstantiate()
Finish the initialization of this object. Called only once perSessionFactory
lifecycle, after all entity persisters have been instantiated.
- Specified by:
- postInstantiate in interface EntityPersister
- Overrides:
- postInstantiate in interface AbstractEntityPersister