Package org.hibernate.persister.entity
Interface Queryable
- All Superinterfaces:
EntityPersister,Joinable,Loadable,OptimisticCacheSource,PropertyMapping
- All Known Implementing Classes:
AbstractEntityPersister,JoinedSubclassEntityPersister,SingleTableEntityPersister,UnionSubclassEntityPersister
Extends the generic EntityPersister contract to add
operations required by the Hibernate Query Language
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.hibernate.persister.entity.EntityPersister
ENTITY_IDFields inherited from interface org.hibernate.persister.entity.Loadable
ROWID_ALIAS -
Method Summary
Modifier and TypeMethodDescriptiongenerateFilterConditionAlias(String rootAlias) The alias used for any filter conditions (mapped where-fragments or enabled-filters).String[]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[][]For each table specified ingetConstraintOrderedTableNameClosure(), get the columns that define the key between the various hierarchy classes.Get the discriminator value for this particular concrete subclass, as a string that may be embedded in a select statementString[]Get the names of columns used to persist the identifierGet the class that this class is mapped as a subclass of - not necessarily the direct superclassgetSubclassPropertyDeclarer(String propertyPath) Determine whether the given property is declared by our mapped class, our super class, or one of our subclasses...intgetSubclassPropertyTableNumber(String propertyPath) Given a property name, determine the number of the table which contains the column to which this property is mapped.getSubclassTableName(int number) Get the name of the table with the given index from the internal array.Get the appropriate DDL command for generating the temporary table to be used to (potentially) store id values when performing bulk update/deletes.Get the name of the temporary table to be used to (potentially) store id values when performing bulk update/deletes.Retrieve the information needed to properly deal with this entity's discriminator in a query.identifierSelectFragment(String name, String suffix) Given a query alias and an identifying suffix, render the intentifier select fragment.booleanIs this an abstract class?booleanIs this class explicit polymorphism only?booleanIs the inheritence hierarchy described by this persister contained across multiple tables?booleanIs the version property included in insert statements?propertySelectFragment(String alias, String suffix, boolean allProperties) Given a query alias and an identifying suffix, render the property select fragment.propertySelectFragmentFragment(String alias, String suffix, boolean allProperties) Methods inherited from interface org.hibernate.persister.entity.EntityPersister
afterInitialize, afterReassociate, canExtractIdOutOfEntity, createProxy, delete, findDirty, findModified, forceVersionIncrement, getCacheAccessStrategy, getCacheEntryStructure, getClassMetadata, getConcreteProxyClass, getCurrentVersion, getDatabaseSnapshot, getEntityMetamodel, getEntityName, getFactory, getIdentifier, getIdentifier, getIdentifierGenerator, getIdentifierPropertyName, getIdentifierType, getMappedClass, getNaturalIdentifierProperties, getNaturalIdentifierSnapshot, getPropertyCascadeStyles, getPropertyCheckability, getPropertyInsertability, getPropertyInsertGenerationInclusions, getPropertyLaziness, getPropertyNames, getPropertyNullability, getPropertySpaces, getPropertyType, getPropertyTypes, getPropertyUpdateability, getPropertyUpdateGenerationInclusions, getPropertyValue, getPropertyValue, getPropertyValues, getPropertyValuesToInsert, getPropertyVersionability, getQuerySpaces, getRootEntityName, getSubclassEntityPersister, getVersion, getVersionProperty, getVersionType, guessEntityMode, hasCache, hasCascades, hasCollections, hasIdentifierProperty, hasInsertGeneratedProperties, hasLazyProperties, hasMutableProperties, hasNaturalIdentifier, hasProxy, hasSubselectLoadableCollections, hasUninitializedLazyProperties, hasUpdateGeneratedProperties, implementsLifecycle, implementsValidatable, insert, insert, instantiate, instantiate, isBatchLoadable, isCacheInvalidationRequired, isIdentifierAssignedByInsert, isInherited, isInstance, isInstrumented, isLazyPropertiesCacheable, isMutable, isSelectBeforeUpdateRequired, isSubclassEntityName, isTransient, isVersioned, isVersionPropertyGenerated, load, load, lock, lock, postInstantiate, processInsertGeneratedProperties, processUpdateGeneratedProperties, resetIdentifier, resetIdentifier, setIdentifier, setIdentifier, setPropertyValue, setPropertyValues, updateMethods inherited from interface org.hibernate.persister.entity.Joinable
consumesCollectionAlias, consumesEntityAlias, filterFragment, fromJoinFragment, getKeyColumnNames, getName, getTableName, isCollection, oneToManyFilterFragment, selectFragment, whereJoinFragmentMethods inherited from interface org.hibernate.persister.entity.Loadable
getDiscriminatorAlias, getDiscriminatorColumnName, getDiscriminatorType, getIdentifierAliases, getPropertyAliases, getPropertyColumnNames, getSubclassForDiscriminatorValue, hasRowId, hasSubclasses, hydrate, registerAffectingFetchProfileMethods inherited from interface org.hibernate.cache.OptimisticCacheSource
getVersionComparatorMethods inherited from interface org.hibernate.persister.entity.PropertyMapping
getType, toColumns, toColumns, toType
-
Method Details
-
isAbstract
boolean isAbstract()Is this an abstract class?- Specified by:
isAbstractin interfaceLoadable
-
isExplicitPolymorphism
boolean isExplicitPolymorphism()Is this class explicit polymorphism only? -
getMappedSuperclass
String getMappedSuperclass()Get the class that this class is mapped as a subclass of - not necessarily the direct superclass -
getDiscriminatorSQLValue
String getDiscriminatorSQLValue()Get the discriminator value for this particular concrete subclass, as a string that may be embedded in a select statement -
identifierSelectFragment
Given a query alias and an identifying suffix, render the intentifier select fragment. -
propertySelectFragment
Given a query alias and an identifying suffix, render the property select fragment. -
propertySelectFragmentFragment
-
getIdentifierColumnNames
String[] getIdentifierColumnNames()Get the names of columns used to persist the identifier- Specified by:
getIdentifierColumnNamesin interfaceLoadable
-
isMultiTable
boolean isMultiTable()Is the inheritence hierarchy described by this persister contained across multiple tables?- Returns:
- True if the inheritence hierarchy is spread across multiple tables; false otherwise.
-
getConstraintOrderedTableNameClosure
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.- Returns:
- The ordered array of table names.
-
getContraintOrderedTableKeyColumnClosure
String[][] getContraintOrderedTableKeyColumnClosure()For each table specified ingetConstraintOrderedTableNameClosure(), get the columns that define the key between the various hierarchy classes. The first dimension here corresponds to the table indexes returned ingetConstraintOrderedTableNameClosure(). The second dimension should have the same length across all the elements in the first dimension. If not, that'd be a problem ;)- Returns:
-
getTemporaryIdTableName
String getTemporaryIdTableName()Get the name of the temporary table to be used to (potentially) store id values when performing bulk update/deletes.- Returns:
- The appropriate temporary table name.
-
getTemporaryIdTableDDL
String getTemporaryIdTableDDL()Get the appropriate DDL command for generating the temporary table to be used to (potentially) store id values when performing bulk update/deletes.- Returns:
- The appropriate temporary table creation command.
-
getSubclassPropertyTableNumber
Given a property name, determine the number of the table which contains the column to which this property is mapped. Note that this is not relative to the results fromgetConstraintOrderedTableNameClosure(). It is relative to the subclass table name closure maintained internal to the persister (yick!). It is also relative to the indexing used to resolvegetSubclassTableName(int)...- Parameters:
propertyPath- The name of the property.- Returns:
- The nunber of the table to which the property is mapped.
-
getSubclassPropertyDeclarer
Determine whether the given property is declared by our mapped class, our super class, or one of our subclasses... Note: the method is called 'subclass property...' simply for consistency sake (e.g.getSubclassPropertyTableNumber(java.lang.String)- Parameters:
propertyPath- The property name.- Returns:
- The property declarer
-
getSubclassTableName
Get the name of the table with the given index from the internal array.- Parameters:
number- The index into the internal array.- Returns:
-
isVersionPropertyInsertable
boolean isVersionPropertyInsertable()Is the version property included in insert statements? -
generateFilterConditionAlias
The alias used for any filter conditions (mapped where-fragments or enabled-filters). This may or may not be different from the root alias depending upon the inheritence mapping strategy.- Parameters:
rootAlias- The root alias- Returns:
- The alias used for "filter conditions" within the where clause.
-
getTypeDiscriminatorMetadata
DiscriminatorMetadata getTypeDiscriminatorMetadata()Retrieve the information needed to properly deal with this entity's discriminator in a query.- Returns:
- The entity discriminator metadata
-