|
|||||||||||
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.SingleTableEntityPersister
The default implementation of the EntityPersister interface. Implements the "table-per-class-hierarchy" or "roll-up" mapping strategy for an entity class and its inheritence hierarchy. This is implemented as a single table holding all classes in the hierarchy with a discrimator column used to determine which concrete class is referenced.
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 | |
SingleTableEntityPersister(PersistentClass persistentClass,
CacheConcurrencyStrategy cache,
SessionFactoryImplementor factory,
Mapping mapping)
|
Method Summary | |
protected void |
addDiscriminatorToInsert(Insert insert)
|
protected void |
addDiscriminatorToSelect(SelectFragment select,
String name,
String suffix)
|
String |
filterFragment(String alias)
|
String |
fromTableFragment(String name)
Get the main from table fragment, given a query alias. |
protected String |
getDiscriminatorAlias()
|
String |
getDiscriminatorColumnName()
|
protected String |
getDiscriminatorFormula()
|
protected String |
getDiscriminatorFormulaTemplate()
|
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()
|
protected String |
getSequentialSelect(String entityName)
|
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 String[] |
getSubclassTableKeyColumns(int j)
|
protected String |
getSubclassTableName(int j)
|
protected int |
getSubclassTableSpan()
|
String |
getTableName()
The table to join to. |
protected String |
getTableName(int j)
|
protected int |
getTableSpan()
|
boolean |
hasSequentialSelect()
|
protected boolean |
isClassOrSuperclassTable(int j)
|
protected boolean |
isDiscriminatorFormula()
|
protected boolean |
isInverseSubclassTable(int j)
|
protected boolean |
isInverseTable(int j)
|
protected boolean |
isNullableSubclassTable(int j)
|
protected boolean |
isNullableTable(int j)
|
protected boolean |
isPropertyOfTable(int property,
int j)
|
protected boolean |
isSubclassPropertyDeferred(String propertyName,
String entityName)
|
protected boolean |
isSubclassTableLazy(int j)
|
protected boolean |
isSubclassTableSequentialSelect(int j)
|
protected boolean |
isTableCascadeDeleteEnabled(int j)
|
String |
oneToManyFilterFragment(String alias)
|
void |
postInstantiate()
Finish the initialization of this object, once all ClassPersisters have been instantiated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SingleTableEntityPersister(PersistentClass persistentClass, CacheConcurrencyStrategy cache, SessionFactoryImplementor factory, Mapping mapping) throws HibernateException
Method Detail |
protected boolean isInverseTable(int j)
isInverseTable
in class BasicEntityPersister
protected boolean isInverseSubclassTable(int j)
isInverseSubclassTable
in class BasicEntityPersister
public String getDiscriminatorColumnName()
getDiscriminatorColumnName
in interface Loadable
getDiscriminatorColumnName
in class BasicEntityPersister
protected String getDiscriminatorAlias()
getDiscriminatorAlias
in class BasicEntityPersister
protected String getDiscriminatorFormulaTemplate()
getDiscriminatorFormulaTemplate
in class BasicEntityPersister
public 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 getDiscriminatorFormula()
protected String getTableName(int j)
getTableName
in class BasicEntityPersister
protected String[] getKeyColumns(int j)
getKeyColumns
in class BasicEntityPersister
protected boolean isTableCascadeDeleteEnabled(int j)
isTableCascadeDeleteEnabled
in class BasicEntityPersister
protected boolean isPropertyOfTable(int property, int j)
isPropertyOfTable
in class BasicEntityPersister
protected boolean isSubclassTableSequentialSelect(int j)
isSubclassTableSequentialSelect
in class BasicEntityPersister
public String fromTableFragment(String name)
OuterJoinLoadable
public String filterFragment(String alias) throws MappingException
filterFragment
in class BasicEntityPersister
MappingException
public String oneToManyFilterFragment(String alias) throws MappingException
oneToManyFilterFragment
in interface Joinable
oneToManyFilterFragment
in class BasicEntityPersister
MappingException
public String getSubclassPropertyTableName(int i)
OuterJoinLoadable
protected void addDiscriminatorToSelect(SelectFragment select, String name, String suffix)
addDiscriminatorToSelect
in class BasicEntityPersister
protected int[] getPropertyTableNumbersInSelect()
getPropertyTableNumbersInSelect
in class BasicEntityPersister
protected int getSubclassPropertyTableNumber(int i)
getSubclassPropertyTableNumber
in class BasicEntityPersister
protected int getTableSpan()
getTableSpan
in class BasicEntityPersister
protected void addDiscriminatorToInsert(Insert insert)
addDiscriminatorToInsert
in class BasicEntityPersister
protected int[] getSubclassColumnTableNumberClosure()
getSubclassColumnTableNumberClosure
in class BasicEntityPersister
protected int[] getSubclassFormulaTableNumberClosure()
getSubclassFormulaTableNumberClosure
in class BasicEntityPersister
protected int[] getPropertyTableNumbers()
getPropertyTableNumbers
in class BasicEntityPersister
protected boolean isSubclassPropertyDeferred(String propertyName, String entityName)
isSubclassPropertyDeferred
in class BasicEntityPersister
public boolean hasSequentialSelect()
hasSequentialSelect
in class BasicEntityPersister
protected String getSequentialSelect(String entityName)
getSequentialSelect
in class BasicEntityPersister
protected String[] getSubclassTableKeyColumns(int j)
getSubclassTableKeyColumns
in class BasicEntityPersister
protected String getSubclassTableName(int j)
getSubclassTableName
in class BasicEntityPersister
protected int getSubclassTableSpan()
getSubclassTableSpan
in class BasicEntityPersister
protected boolean isClassOrSuperclassTable(int j)
isClassOrSuperclassTable
in class BasicEntityPersister
protected boolean isSubclassTableLazy(int j)
isSubclassTableLazy
in class BasicEntityPersister
protected boolean isNullableTable(int j)
isNullableTable
in class BasicEntityPersister
protected boolean isNullableSubclassTable(int j)
isNullableSubclassTable
in class BasicEntityPersister
public String getPropertyTableName(String propertyName)
OuterJoinLoadable
public void postInstantiate()
EntityPersister
postInstantiate
in interface EntityPersister
postInstantiate
in class BasicEntityPersister
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |