public class SingleTableEntityPersister extends AbstractEntityPersister
hasIdentifierProperty
AbstractEntityPersister.CacheEntryHelper, AbstractEntityPersister.InclusionChecker
Queryable.Declarer
customSQLDelete, customSQLInsert, customSQLUpdate, deleteCallable, deleteResultCheckStyles, ENTITY_CLASS, insertCallable, insertResultCheckStyles, propertyMapping, rowIdName, updateCallable, updateResultCheckStyles
ROWID_ALIAS
ENTITY_ID
UNFETCHED_PROPERTY
Constructor and Description |
---|
SingleTableEntityPersister(EntityBinding entityBinding,
EntityRegionAccessStrategy cacheAccessStrategy,
NaturalIdRegionAccessStrategy naturalIdRegionAccessStrategy,
SessionFactoryImplementor factory,
Mapping mapping) |
SingleTableEntityPersister(PersistentClass persistentClass,
EntityRegionAccessStrategy cacheAccessStrategy,
NaturalIdRegionAccessStrategy naturalIdRegionAccessStrategy,
SessionFactoryImplementor factory,
Mapping mapping) |
Modifier and Type | Method and Description |
---|---|
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.
|
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 constraint violations.
|
String[][] |
getContraintOrderedTableKeyColumnClosure()
For each table specified in
Queryable.getConstraintOrderedTableNameClosure() , get
the columns that define the key between the various hierarchy classes. |
protected String |
getDiscriminatorAlias() |
String |
getDiscriminatorColumnName() |
String |
getDiscriminatorColumnReaders() |
String |
getDiscriminatorColumnReaderTemplate() |
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
|
Object |
getDiscriminatorValue()
Get the discriminator value
|
FilterAliasGenerator |
getFilterAliasGenerator(String rootAlias) |
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() |
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) |
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() |
boolean |
hasSequentialSelect() |
protected boolean |
isClassOrSuperclassTable(int j) |
protected boolean |
isDiscriminatorFormula() |
protected boolean |
isInverseSubclassTable(int j) |
protected boolean |
isInverseTable(int j) |
boolean |
isMultiTable()
Is the inheritance hierarchy described by this persister contained across
multiple tables?
|
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.
|
afterInitialize, afterReassociate, buildCacheEntry, buildCacheEntryHelper, canExtractIdOutOfEntity, canUseReferenceCacheEntries, check, concretePropertySelectFragment, concretePropertySelectFragment, concretePropertySelectFragment, concretePropertySelectFragmentSansLeadingComma, consumesCollectionAlias, consumesEntityAlias, countSubclassProperties, createEntityLoader, createEntityLoader, createEntityLoader, createFrom, createJoin, createJoin, createLoaders, createProxy, createQueryLoader, createSelect, createUniqueKeyLoaders, createWhereByKey, dehydrate, dehydrate, delete, delete, determineTableNumberForColumn, filterFragment, findDirty, findModified, forceVersionIncrement, fromJoinFragment, generateDeleteString, generateFilterConditionAlias, generateIdByUniqueKeySelectString, generateIdentityInsertString, generateInsertGeneratedValuesSelectString, generateInsertString, generateInsertString, generateInsertString, generateLazySelectString, generateLocker, generateSelectVersionString, generateSnapshotSelectString, generateTableAlias, generateUpdateGeneratedValuesSelectString, generateUpdateString, generateUpdateString, getCacheAccessStrategy, getCacheEntryStructure, getCascadeStyle, getClassMetadata, getConcreteProxyClass, getCurrentVersion, getDatabaseSnapshot, getDiscriminatorAlias, getEntityMetamodel, getEntityMode, getEntityName, getEntityTuplizer, getEntityType, getFactory, getFetchMode, getIdByUniqueKey, getIdentifier, getIdentifier, getIdentifierAliases, getIdentifierAliases, getIdentifierColumnNames, getIdentifierColumnReaders, getIdentifierColumnReaderTemplates, getIdentifierColumnSpan, getIdentifierGenerator, getIdentifierPropertyName, getIdentifierType, getIdentitySelectString, getInstrumentationMetadata, getKeyColumnNames, getLazyProperties, getLoaders, getMappedClass, getMappedSuperclass, getName, getNaturalIdCacheAccessStrategy, getNaturalIdentifierProperties, getNaturalIdentifierSnapshot, getNonLazyPropertyUpdateability, getPropertiesToInsert, getPropertiesToUpdate, getPropertyAliases, getPropertyCascadeStyles, getPropertyCheckability, getPropertyColumnInsertable, getPropertyColumnNames, getPropertyColumnNames, getPropertyColumnSpan, getPropertyColumnUpdateable, getPropertyColumnWriters, getPropertyIndex, getPropertyInsertability, getPropertyInsertGenerationInclusions, getPropertyLaziness, getPropertyNames, getPropertyNullability, getPropertySelectable, getPropertySpan, getPropertySubclassNames, getPropertyType, getPropertyTypes, getPropertyUniqueness, getPropertyUpdateability, getPropertyUpdateability, getPropertyUpdateGenerationInclusions, getPropertyValue, getPropertyValue, getPropertyValues, getPropertyValuesToInsert, getPropertyVersionability, getQuerySpaces, getRootEntityName, getRootTableAlias, getRootTableIdentifierColumnNames, getRootTableKeyColumnNames, getRootTableName, getSelectByUniqueKeyString, getSQLDeleteStrings, getSQLIdentityInsertString, getSQLInsertStrings, getSQLLazySelectString, getSQLLazyUpdateByRowIdStrings, getSQLLazyUpdateStrings, getSQLSnapshotSelectString, getSQLUpdateByRowIdStrings, getSQLUpdateStrings, getSQLWhereString, getSubclassColumnAliasClosure, getSubclassColumnClosure, getSubclassColumnLazyiness, getSubclassColumnReaderTemplateClosure, getSubclassEntityPersister, getSubclassFormulaAliasClosure, getSubclassFormulaClosure, getSubclassFormulaLazyiness, getSubclassFormulaTemplateClosure, getSubclassPropertyColumnAliases, getSubclassPropertyColumnNameClosure, getSubclassPropertyColumnNames, getSubclassPropertyColumnNames, getSubclassPropertyColumnReaderClosure, getSubclassPropertyColumnReaderTemplateClosure, getSubclassPropertyDeclarer, getSubclassPropertyFormulaTemplateClosure, getSubclassPropertyName, getSubclassPropertyNameClosure, getSubclassPropertySubclassNameClosure, getSubclassPropertyTableNumber, getSubclassPropertyType, getSubclassPropertyTypeClosure, getTableAliasForColumn, getTableId, getTableUpdateNeeded, getTemplateFromColumn, getTemplateFromString, getTemporaryIdTableDDL, getTemporaryIdTableName, getType, getTypeDiscriminatorMetadata, getVersion, getVersionColumnName, getVersionComparator, getVersionedTableName, getVersionProperty, getVersionSelectString, getVersionType, hasCache, hasCascades, hasCollections, hasEmbeddedCompositeIdentifier, hasFormulaProperties, hasIdentifierProperty, hasInsertGeneratedProperties, hasLazyProperties, hasMutableProperties, hasNaturalIdCache, hasNaturalIdentifier, hasProxy, hasRowId, hasSubclasses, hasSubselectLoadableCollections, hasUninitializedLazyProperties, hasUpdateGeneratedProperties, hasWhere, hydrate, identifierSelectFragment, implementsLifecycle, initializeLazyProperty, initLockers, initPropertyPaths, initSubclassPropertyAliasesMap, initSubclassPropertyAliasesMap, insert, insert, insert, insert, instantiate, isAbstract, isBatchable, isBatchLoadable, isCacheInvalidationRequired, isCollection, isDefinedOnSubclass, isDeleteCallable, isExplicitPolymorphism, isIdentifierAssignedByInsert, isInherited, isInsertCallable, isInstance, isInstrumented, isLazyPropertiesCacheable, isMutable, isNaturalIdNonNullable, isPolymorphic, isSelectBeforeUpdateRequired, isSubclassEntityName, isSubclassPropertyNullable, isTransient, isUpdateCallable, isVersioned, isVersionPropertyGenerated, isVersionPropertyInsertable, load, load, loadByUniqueKey, loadEntityIdByNaturalId, lock, lock, logStaticSQL, optimisticLockStyle, postConstruct, processInsertGeneratedProperties, processUpdateGeneratedProperties, propertySelectFragment, propertySelectFragmentFragment, registerAffectingFetchProfile, renderSelect, resetIdentifier, resolveAttributeIndexes, selectFragment, selectFragment, setIdentifier, setPropertyValue, setPropertyValue, setPropertyValues, toColumns, toColumns, toColumns, toString, toType, update, update, updateOrInsert, useDynamicInsert, useDynamicUpdate, useGetGeneratedKeys, useInsertSelectIdentity, whereJoinFragment
public SingleTableEntityPersister(PersistentClass persistentClass, EntityRegionAccessStrategy cacheAccessStrategy, NaturalIdRegionAccessStrategy naturalIdRegionAccessStrategy, SessionFactoryImplementor factory, Mapping mapping) throws HibernateException
HibernateException
public SingleTableEntityPersister(EntityBinding entityBinding, EntityRegionAccessStrategy cacheAccessStrategy, NaturalIdRegionAccessStrategy naturalIdRegionAccessStrategy, SessionFactoryImplementor factory, Mapping mapping) throws HibernateException
HibernateException
protected boolean isInverseTable(int j)
isInverseTable
in class AbstractEntityPersister
protected boolean isInverseSubclassTable(int j)
isInverseSubclassTable
in class AbstractEntityPersister
public String getDiscriminatorColumnName()
getDiscriminatorColumnName
in interface Loadable
getDiscriminatorColumnName
in class AbstractEntityPersister
public String getDiscriminatorColumnReaders()
getDiscriminatorColumnReaders
in class AbstractEntityPersister
public String getDiscriminatorColumnReaderTemplate()
getDiscriminatorColumnReaderTemplate
in class AbstractEntityPersister
protected String getDiscriminatorAlias()
getDiscriminatorAlias
in class AbstractEntityPersister
protected String getDiscriminatorFormulaTemplate()
getDiscriminatorFormulaTemplate
in class AbstractEntityPersister
public String getTableName()
Joinable
public Type getDiscriminatorType()
Loadable
public Object getDiscriminatorValue()
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 AbstractEntityPersister
protected String[] getKeyColumns(int j)
getKeyColumns
in class AbstractEntityPersister
protected boolean isTableCascadeDeleteEnabled(int j)
isTableCascadeDeleteEnabled
in class AbstractEntityPersister
protected boolean isPropertyOfTable(int property, int j)
isPropertyOfTable
in class AbstractEntityPersister
protected boolean isSubclassTableSequentialSelect(int j)
isSubclassTableSequentialSelect
in class AbstractEntityPersister
public String fromTableFragment(String name)
OuterJoinLoadable
public String filterFragment(String alias) throws MappingException
filterFragment
in class AbstractEntityPersister
MappingException
public String oneToManyFilterFragment(String alias) throws MappingException
oneToManyFilterFragment
in interface Joinable
oneToManyFilterFragment
in class AbstractEntityPersister
MappingException
public String getSubclassPropertyTableName(int i)
OuterJoinLoadable
protected void addDiscriminatorToSelect(SelectFragment select, String name, String suffix)
addDiscriminatorToSelect
in class AbstractEntityPersister
protected int[] getPropertyTableNumbersInSelect()
getPropertyTableNumbersInSelect
in class AbstractEntityPersister
protected int getSubclassPropertyTableNumber(int i)
getSubclassPropertyTableNumber
in class AbstractEntityPersister
public int getTableSpan()
getTableSpan
in class AbstractEntityPersister
protected void addDiscriminatorToInsert(Insert insert)
addDiscriminatorToInsert
in class AbstractEntityPersister
protected int[] getSubclassColumnTableNumberClosure()
getSubclassColumnTableNumberClosure
in class AbstractEntityPersister
protected int[] getSubclassFormulaTableNumberClosure()
getSubclassFormulaTableNumberClosure
in class AbstractEntityPersister
protected int[] getPropertyTableNumbers()
getPropertyTableNumbers
in class AbstractEntityPersister
protected boolean isSubclassPropertyDeferred(String propertyName, String entityName)
isSubclassPropertyDeferred
in class AbstractEntityPersister
public boolean hasSequentialSelect()
hasSequentialSelect
in class AbstractEntityPersister
protected String getSequentialSelect(String entityName)
getSequentialSelect
in class AbstractEntityPersister
protected String[] getSubclassTableKeyColumns(int j)
getSubclassTableKeyColumns
in class AbstractEntityPersister
public String getSubclassTableName(int j)
Queryable
getSubclassTableName
in interface Queryable
getSubclassTableName
in class AbstractEntityPersister
j
- The index into the internal array.public int getSubclassTableSpan()
getSubclassTableSpan
in class AbstractEntityPersister
protected boolean isClassOrSuperclassTable(int j)
isClassOrSuperclassTable
in class AbstractEntityPersister
protected boolean isSubclassTableLazy(int j)
isSubclassTableLazy
in class AbstractEntityPersister
protected boolean isNullableTable(int j)
isNullableTable
in class AbstractEntityPersister
protected boolean isNullableSubclassTable(int j)
isNullableSubclassTable
in class AbstractEntityPersister
public String getPropertyTableName(String propertyName)
OuterJoinLoadable
public void postInstantiate()
EntityPersister
SessionFactory
lifecycle,
after all entity persisters have been instantiated.postInstantiate
in interface EntityPersister
postInstantiate
in class AbstractEntityPersister
public boolean isMultiTable()
Queryable
isMultiTable
in interface Queryable
isMultiTable
in class AbstractEntityPersister
public String[] getConstraintOrderedTableNameClosure()
Queryable
public String[][] getContraintOrderedTableKeyColumnClosure()
Queryable
Queryable.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 would be a problem ;)public FilterAliasGenerator getFilterAliasGenerator(String rootAlias)
Copyright © 2018 JBoss by Red Hat. All rights reserved.