public class JoinedSubclassEntityPersister extends AbstractEntityPersister
AbstractEntityPersister.CacheEntryHelper, AbstractEntityPersister.InclusionCheckerQueryable.DeclarerLazyPropertyInitializer.InterceptorImplementorbatchSize, customSQLDelete, customSQLInsert, customSQLUpdate, deleteCallable, deleteResultCheckStyles, ENTITY_CLASS, insertCallable, insertResultCheckStyles, propertyMapping, rowIdName, updateCallable, updateResultCheckStyles, VERSION_COLUMN_ALIASROWID_ALIASENTITY_IDUNFETCHED_PROPERTY| Constructor and Description |
|---|
JoinedSubclassEntityPersister(PersistentClass persistentClass,
EntityDataAccess cacheAccessStrategy,
NaturalIdDataAccess naturalIdRegionAccessStrategy,
PersisterCreationContext creationContext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDiscriminatorToInsert(Insert insert) |
void |
addDiscriminatorToSelect(SelectFragment select,
String name,
String suffix) |
boolean |
canOmitSuperclassTableJoin()
If true, persister can omit superclass tables during joining if they are not needed in the query.
|
int |
determineTableNumberForColumn(String columnName) |
protected String |
filterFragment(String alias) |
protected String |
filterFragment(String alias,
Set<String> treatAsDeclarations) |
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 constraint violations.
|
String[][] |
getContraintOrderedTableKeyColumnClosure()
For each table specified in
Queryable.getConstraintOrderedTableNameClosure(), get
the columns that define the key between the various hierarchy classes. |
String |
getDiscriminatorAlias() |
String |
getDiscriminatorColumnName() |
String |
getDiscriminatorColumnReaders() |
String |
getDiscriminatorColumnReaderTemplate() |
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
|
org.hibernate.internal.FilterAliasGenerator |
getFilterAliasGenerator(String rootAlias) |
String[] |
getIdentifierColumnNames()
Get the names of columns used to persist the identifier
|
String[] |
getIdentifierColumnReaders() |
String[] |
getIdentifierColumnReaderTemplates() |
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.
|
String |
getTableName(int j) |
int |
getTableSpan() |
protected boolean |
isClassOrSuperclassTable(int j) |
protected boolean |
isInverseSubclassTable(int j) |
boolean |
isInverseTable(int j) |
boolean |
isMultiTable()
Is the inheritance hierarchy described by this persister contained across
multiple tables?
|
protected boolean |
isNullableSubclassTable(int j) |
boolean |
isNullableTable(int j) |
boolean |
isPropertyOfTable(int property,
int j) |
protected boolean |
isSubclassTableIndicatedByTreatAsDeclarations(int subclassTableNumber,
Set<String> treatAsDeclarations) |
protected boolean |
isSubclassTableLazy(int j) |
protected boolean |
isSubclassTableSequentialSelect(int j) |
boolean |
isTableCascadeDeleteEnabled(int j) |
String[] |
toColumns(String alias,
String propertyName)
Obtain aliased column/formula fragments for the specified property path.
|
afterInitialize, afterReassociate, buildCacheEntry, buildCacheEntryHelper, buildMergeCascadeEntityLoader, buildRefreshCascadeEntityLoader, canExtractIdOutOfEntity, canReadFromCache, canUseReferenceCacheEntries, canWriteToCache, check, checkVersion, concretePropertySelectFragment, concretePropertySelectFragment, concretePropertySelectFragmentSansLeadingComma, consumesCollectionAlias, consumesEntityAlias, countSubclassProperties, createDelete, createEntityLoader, createEntityLoader, createEntityLoader, createFrom, createInsert, createJoin, createJoin, createJoin, createLoaders, createNaturalIdLoaders, createProxy, createQueryLoader, createSelect, createUniqueKeyLoader, createUniqueKeyLoaders, createUpdate, createWhereByKey, dehydrate, dehydrate, delete, delete, determinePkByNaturalIdQuery, determineSubclassTableJoinType, determineSubclassTableJoinType, determineTableName, determineValueNullness, doPostInstantiate, filterFragment, filterFragment, findDirty, findModified, forceVersionIncrement, fromJoinFragment, fromJoinFragment, fromJoinFragment, generateDeleteString, generateEntityDefinition, generateIdByUniqueKeySelectString, generateIdentityInsertString, generateInsertGeneratedValuesSelectString, generateInsertString, generateInsertString, generateInsertString, generateLazySelectStringsByFetchGroup, generateLocker, generateSelectVersionString, generateSnapshotSelectString, generateSQLDeleteStrings, generateTableAlias, generateUpdateGeneratedValuesSelectString, generateUpdateString, generateUpdateString, getAppropriateLoader, getAppropriateUniqueKeyLoader, getAttributes, getBytecodeEnhancementMetadata, getCacheAccessStrategy, getCacheEntryStructure, getCascadeStyle, getClassMetadata, getCollectionKey, getConcreteProxyClass, getCurrentVersion, getDatabaseSnapshot, getDeleteResultCheckStyles, getDiscriminatorAlias, getDiscriminatorFormulaTemplate, getEntityEntryFactory, getEntityKeyDefinition, getEntityMetamodel, getEntityMode, getEntityName, getEntityPersister, getEntityTuplizer, getEntityType, getFactory, getFetchMode, getIdByUniqueKey, getIdentifier, getIdentifier, getIdentifierAliases, getIdentifierAliases, getIdentifierColumnSpan, getIdentifierGenerator, getIdentifierPropertyName, getIdentifierType, getIdentitySelectString, getInsertResultCheckStyles, getInstrumentationMetadata, getKeyColumnNames, getLazyPropertyColumnAliases, getLazyPropertyNames, getLazyPropertyNumbers, getLazyPropertyTypes, getLoaderByLockMode, getMappedClass, getMappedSuperclass, getName, getNaturalIdCacheAccessStrategy, getNaturalIdentifierProperties, getNaturalIdentifierSnapshot, getNavigableRole, getNonLazyPropertyUpdateability, getPolymorphicJoinColumns, 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, getRootTableIdentifierColumnNames, getRootTableKeyColumnNames, getSelectByUniqueKeyString, getSequentialSelect, 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, getSubclassPropertyFormulaTemplateClosure, getSubclassPropertyName, getSubclassPropertyNameClosure, getSubclassPropertySubclassNameClosure, getSubclassPropertyTableNumber, getSubclassPropertyType, getSubclassPropertyTypeClosure, getTableAliasForColumn, getTableId, getTableNames, getTableUpdateNeeded, getTemplateFromString, getType, getTypeDiscriminatorMetadata, getUpdateResultCheckStyles, getUpdateStrings, getVersion, getVersionColumnName, getVersionComparator, getVersionedTableName, getVersionProperty, getVersionSelectString, getVersionType, hasCache, hasCascades, hasCollections, hasEmbeddedCompositeIdentifier, hasFormulaProperties, hasIdentifierProperty, hasInsertGeneratedProperties, hasLazyProperties, hasMutableProperties, hasNaturalIdCache, hasNaturalIdentifier, hasProxy, hasRowId, hasSequentialSelect, hasSubclasses, hasSubselectLoadableCollections, hasUninitializedLazyProperties, hasUpdateGeneratedProperties, hasWhere, hydrate, identifierSelectFragment, implementsLifecycle, initializeEnhancedEntityUsedAsProxy, initializeLazyPropertiesFromCache, initializeLazyPropertiesFromDatastore, initializeLazyProperty, initializeLazyProperty, initPropertyPaths, initSubclassPropertyAliasesMap, insert, insert, insert, insert, instantiate, isAbstract, isAllNull, isAllOrDirtyOptLocking, isBatchable, isBatchLoadable, isCacheInvalidationRequired, isClassOrSuperclassJoin, isCollection, isDefinedOnSubclass, isDeleteCallable, isExplicitPolymorphism, isIdentifierAssignedByInsert, isInherited, isInsertCallable, isInstance, isInstrumented, isLazyPropertiesCacheable, isModifiableEntity, isMutable, isNaturalIdNonNullable, isPolymorphic, isSelectBeforeUpdateRequired, isSubclassEntityName, isSubclassPropertyDeferred, isSubclassPropertyNullable, isTransient, isUpdateCallable, isValueGenerationRequired, isVersioned, isVersionPropertyGenerated, isVersionPropertyInsertable, load, load, load, loadByNaturalId, loadByUniqueKey, loadEntityIdByNaturalId, lock, lock, logStaticSQL, multiLoad, oneToManyFilterFragment, oneToManyFilterFragment, optimisticLockStyle, postConstruct, postInstantiate, preInsertInMemoryValueGeneration, processInsertGeneratedProperties, processUpdateGeneratedProperties, propertySelectFragment, propertySelectFragmentFragment, registerAffectingFetchProfile, renderSelect, resetIdentifier, resolveAttributeIndexes, resolveDirtyAttributeIndexes, selectFragment, selectFragment, setIdentifier, setPropertyValue, setPropertyValue, setPropertyValues, toColumns, toColumns, toString, toType, update, update, updateOrInsert, useDynamicInsert, useDynamicUpdate, useGetGeneratedKeys, useInsertSelectIdentity, whereJoinFragment, whereJoinFragmentclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetIdentifier, getPropertyValuesToInsert, instantiate, setIdentifiercanIdentityInsertBeDelayed, loadpublic JoinedSubclassEntityPersister(PersistentClass persistentClass, EntityDataAccess cacheAccessStrategy, NaturalIdDataAccess naturalIdRegionAccessStrategy, PersisterCreationContext creationContext) throws HibernateException
HibernateExceptionpublic boolean isNullableTable(int j)
isNullableTable in class AbstractEntityPersisterpublic boolean isInverseTable(int j)
isInverseTable in class AbstractEntityPersisterprotected boolean isSubclassTableSequentialSelect(int j)
isSubclassTableSequentialSelect in class AbstractEntityPersisterpublic String getSubclassPropertyTableName(int i)
OuterJoinLoadableprotected boolean isInverseSubclassTable(int j)
isInverseSubclassTable in class AbstractEntityPersisterprotected boolean isNullableSubclassTable(int j)
isNullableSubclassTable in class AbstractEntityPersisterpublic Type getDiscriminatorType()
Loadablepublic Object getDiscriminatorValue()
Loadablepublic String getDiscriminatorSQLValue()
Queryablepublic String getDiscriminatorColumnName()
getDiscriminatorColumnName in interface LoadablegetDiscriminatorColumnName in class AbstractEntityPersisterpublic String getDiscriminatorColumnReaders()
getDiscriminatorColumnReaders in class AbstractEntityPersisterpublic String getDiscriminatorColumnReaderTemplate()
getDiscriminatorColumnReaderTemplate in class AbstractEntityPersisterpublic String getDiscriminatorAlias()
getDiscriminatorAlias in class AbstractEntityPersisterpublic String getSubclassForDiscriminatorValue(Object value)
Loadableprotected void addDiscriminatorToInsert(Insert insert)
addDiscriminatorToInsert in class AbstractEntityPersisterpublic Serializable[] getPropertySpaces()
EntityPersisterpublic String getTableName(int j)
getTableName in class AbstractEntityPersisterpublic String[] getKeyColumns(int j)
getKeyColumns in class AbstractEntityPersisterpublic boolean isTableCascadeDeleteEnabled(int j)
isTableCascadeDeleteEnabled in class AbstractEntityPersisterpublic boolean isPropertyOfTable(int property,
int j)
isPropertyOfTable in class AbstractEntityPersisterpublic String fromTableFragment(String alias)
OuterJoinLoadablepublic String getTableName()
Joinablepublic void addDiscriminatorToSelect(SelectFragment select, String name, String suffix)
addDiscriminatorToSelect in class AbstractEntityPersisterprotected String filterFragment(String alias)
filterFragment in class AbstractEntityPersisterprotected String filterFragment(String alias, Set<String> treatAsDeclarations)
filterFragment in class AbstractEntityPersisterpublic String generateFilterConditionAlias(String rootAlias)
QueryablegenerateFilterConditionAlias in interface QueryablegenerateFilterConditionAlias in class AbstractEntityPersisterrootAlias - The root aliaspublic String[] getIdentifierColumnNames()
LoadablegetIdentifierColumnNames in interface PostInsertIdentityPersistergetIdentifierColumnNames in interface LoadablegetIdentifierColumnNames in interface QueryablegetIdentifierColumnNames in class AbstractEntityPersisterpublic String[] getIdentifierColumnReaderTemplates()
getIdentifierColumnReaderTemplates in class AbstractEntityPersisterpublic String[] getIdentifierColumnReaders()
getIdentifierColumnReaders in class AbstractEntityPersisterpublic String[] toColumns(String alias, String propertyName) throws QueryException
AbstractEntityPersistertoColumns 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()
QueryableisMultiTable 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)
QueryablegetSubclassTableName in interface QueryablegetSubclassTableName in class AbstractEntityPersisterj - The index into the internal array.public int getSubclassTableSpan()
getSubclassTableSpan in class AbstractEntityPersisterprotected boolean isSubclassTableLazy(int j)
isSubclassTableLazy in class AbstractEntityPersisterprotected boolean isClassOrSuperclassTable(int j)
isClassOrSuperclassTable in class AbstractEntityPersisterprotected boolean isSubclassTableIndicatedByTreatAsDeclarations(int subclassTableNumber,
Set<String> treatAsDeclarations)
isSubclassTableIndicatedByTreatAsDeclarations in class AbstractEntityPersisterpublic String getPropertyTableName(String propertyName)
OuterJoinLoadablepublic String[] getConstraintOrderedTableNameClosure()
Queryablepublic 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 would be a problem ;)public String getRootTableName()
LockablegetRootTableName in interface LockablegetRootTableName in class AbstractEntityPersisterpublic String getRootTableAlias(String drivingAlias)
LockablegetRootTableAlias 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.public int determineTableNumberForColumn(String columnName)
determineTableNumberForColumn in class AbstractEntityPersisterpublic org.hibernate.internal.FilterAliasGenerator getFilterAliasGenerator(String rootAlias)
public boolean canOmitSuperclassTableJoin()
AbstractEntityPersistercanOmitSuperclassTableJoin in class AbstractEntityPersisterCopyright © 2001-2021 Red Hat, Inc. All Rights Reserved.