Package org.hibernate.persister.entity
Class AbstractEntityPersister
- java.lang.Object
-
- org.hibernate.persister.entity.AbstractEntityPersister
-
- All Implemented Interfaces:
LazyPropertyInitializer,PostInsertIdentityPersister,Loadable,ClassMetadata,Bindable,Discriminatable,EntityMappingType,EntityValuedModelPart,FilterRestrictable,org.hibernate.metamodel.mapping.internal.InFlightEntityMappingType,JdbcMappingContainer,ManagedMappingType,MappingModelExpressible,MappingType,ModelPart,ModelPartContainer,Queryable,Restrictable,WhereRestrictable,EntityPersister,Joinable,Loadable,Lockable,OuterJoinLoadable,PropertyMapping,Queryable,SQLLoadable,UniqueKeyLoadable,AttributeSource,RootTableGroupProducer,TableGroupProducer,FetchableContainer
- Direct Known Subclasses:
JoinedSubclassEntityPersister,SingleTableEntityPersister,UnionSubclassEntityPersister
public abstract class AbstractEntityPersister extends Object implements OuterJoinLoadable, Queryable, ClassMetadata, UniqueKeyLoadable, SQLLoadable, LazyPropertyInitializer, PostInsertIdentityPersister, Lockable, Queryable, org.hibernate.metamodel.mapping.internal.InFlightEntityMappingType
Basic functionality for persisting an entity via JDBC through either generated or custom SQL
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAbstractEntityPersister.CacheEntryHelperConsolidated these onto a single helper because the 2 pieces work in tandem.-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesConsumer
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.EntityMappingType
EntityMappingType.ConstraintOrderedTableConsumer
-
Nested classes/interfaces inherited from interface org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer
LazyPropertyInitializer.InterceptorImplementor
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueConsumer
-
Nested classes/interfaces inherited from interface org.hibernate.persister.entity.Queryable
Queryable.Declarer
-
-
Field Summary
Fields Modifier and Type Field Description protected ReflectionOptimizer.AccessOptimizeraccessOptimizerprotected intbatchSizeprotected String[]customSQLDeleteprotected String[]customSQLInsertprotected String[]customSQLUpdateprotected Map<String,AttributeMapping>declaredAttributeMappingsprotected boolean[]deleteCallableprotected ExecuteUpdateResultCheckStyle[]deleteResultCheckStylesstatic StringENTITY_CLASSprotected boolean[]insertCallableprotected ExecuteUpdateResultCheckStyle[]insertResultCheckStylesprotected BasicEntityPropertyMappingpropertyMappingWarning: When there are duplicated property names in the subclasses then propertyMapping will only contain one of those properties.protected StringrowIdNameprotected List<Fetchable>staticFetchableListprotected boolean[]updateCallableprotected ExecuteUpdateResultCheckStyle[]updateResultCheckStylesstatic StringVERSION_COLUMN_ALIAS-
Fields inherited from interface org.hibernate.persister.entity.EntityPersister
ENTITY_ID
-
Fields inherited from interface org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer
UNFETCHED_PROPERTY
-
Fields inherited from interface org.hibernate.persister.entity.Loadable
ROWID_ALIAS
-
-
Constructor Summary
Constructors Constructor Description AbstractEntityPersister(PersistentClass bootDescriptor, EntityDataAccess cacheAccessStrategy, NaturalIdDataAccess naturalIdRegionAccessStrategy, RuntimeModelCreationContext creationContext)AbstractEntityPersister(PersistentClass bootDescriptor, EntityDataAccess cacheAccessStrategy, NaturalIdDataAccess naturalIdRegionAccessStrategy, PersisterCreationContext creationContext)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaddDiscriminatorToInsert(Insert insert)voidafterInitialize(Object entity, SharedSessionContractImplementor session)Called just after the entities properties have been initializedvoidafterReassociate(Object entity, SharedSessionContractImplementor session)Called just after the entity has been reassociated with the sessionvoidapplyBaseRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, Set<String> treatAsDeclarations, SqlAstCreationState creationState)Applies the base set of restrictions.voidapplyDiscriminator(Consumer<Predicate> predicateConsumer, String alias, TableGroup tableGroup, SqlAstCreationState creationState)voidapplyFilterRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, SqlAstCreationState creationState)Applies just theFiltervalues enabled for the associated entityvoidapplySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState)Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.voidapplySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState, BiConsumer<SqlSelection,JdbcMapping> selectionConsumer)Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.voidapplyWhereRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, SqlAstCreationState creationState)Apply theWhererestrictionsCacheEntrybuildCacheEntry(Object entity, Object[] state, Object version, SharedSessionContractImplementor session)protected AbstractEntityPersister.CacheEntryHelperbuildCacheEntryHelper()booleancanExtractIdOutOfEntity()Determine whether detached instances of this entity carry their own identifier value.booleancanReadFromCache()booleancanUseReferenceCacheEntries()booleancanWriteToCache()protected booleancheck(int rows, Object id, int tableNumber, Expectation expectation, PreparedStatement statement, String statementSQL)booleancheckVersion(boolean[] includeProperty)booleanconsumesCollectionAlias()Very, very, very ugly...booleanconsumesEntityAlias()Very, very, very ugly...booleancontainsTableReference(String tableExpression)intcountSubclassProperties()How many properties are there, for this class and all subclasses?protected DeletecreateDelete()<T> DomainResult<T>createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState)Create a DomainResult for a specific reference to this ModelPart.protected InsertcreateInsert()TableReferencecreatePrimaryTableReference(SqlAliasBase sqlAliasBase, SqlExpressionResolver sqlExpressionResolver, SqlAstCreationContext creationContext)ObjectcreateProxy(Object id, SharedSessionContractImplementor session)Create a new proxy instanceTableGroupcreateRootTableGroup(boolean canUseInnerJoins, NavigablePath navigablePath, String explicitSourceAlias, Supplier<Consumer<Predicate>> additionalPredicateCollectorAccess, SqlAliasBase sqlAliasBase, SqlExpressionResolver sqlExpressionResolver, FromClauseAccess fromClauseAccess, SqlAstCreationContext creationContext)TableReferenceJoincreateTableReferenceJoin(String joinTableExpression, SqlAliasBase sqlAliasBase, TableReference lhs, SqlExpressionResolver sqlExpressionResolver, SqlAstCreationContext creationContext)protected UpdatecreateUpdate()intdehydrate(Object id, Object[] fields, boolean[] includeProperty, boolean[][] includeColumns, int j, PreparedStatement st, SharedSessionContractImplementor session, boolean isUpdate)intdehydrate(Object id, Object[] fields, Object rowId, boolean[] includeProperty, boolean[][] includeColumns, int j, PreparedStatement ps, SharedSessionContractImplementor session, int index, boolean isUpdate)Marshall the fields of a persistent instance to a prepared statementvoiddelete(Object id, Object version, int j, Object object, String sql, SharedSessionContractImplementor session, Object[] loadedState)Perform an SQL DELETEvoiddelete(Object id, Object version, Object object, SharedSessionContractImplementor session)Delete an objectprotected StringdetermineTableName(Table table)intdetermineTableNumberForColumn(String columnName)Objectdisassemble(Object value, SharedSessionContractImplementor session)protected voiddoPostInstantiate()AttributeMappingfindAttributeMapping(String name)AttributeMappingfindDeclaredAttributeMapping(String name)int[]findDirty(Object[] currentState, Object[] previousState, Object entity, SharedSessionContractImplementor session)Locate the property-indices of all properties considered to be dirty.int[]findModified(Object[] old, Object[] current, Object entity, SharedSessionContractImplementor session)Locate the property-indices of all properties considered to be dirty.ModelPartfindSubPart(String name, EntityMappingType treatTargetType)For an entity, this form allows for Hibernate's "implicit treat" support - meaning it should find a sub-part whether defined on the entity, its super-type or even one of its sub-types.ModelPartfindSubTypesSubPart(String name, EntityMappingType treatTargetType)For an entity, this form allows for Hibernate's "implicit treat" support - meaning it should find a sub-part whether defined on the entity or one of its sub-types.ObjectforceVersionIncrement(Object id, Object currentVersion, SharedSessionContractImplementor session)voidforEachAttributeMapping(IndexedConsumer<AttributeMapping> consumer)Visit attributes defined on this class and any supersintforEachDisassembledJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session)intforEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action)Visit each JdbcMapping starting from the given offsetintforEachJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer consumer, SharedSessionContractImplementor session)intforEachSelectable(int offset, SelectableConsumer selectableConsumer)StringgenerateDeleteString(int j)Generate the SQL that deletes a row by id (and version)protected EntityDiscriminatorMappinggenerateDiscriminatorMapping(PersistentClass bootEntityDescriptor, org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess modelCreationProcess)StringgenerateFilterConditionAlias(String rootAlias)The alias used for any filter conditions (mapped where-fragments or enabled-filters).protected EntityIdentifierMappinggenerateIdentifierMapping(Supplier<?> templateInstanceCreator, PersistentClass bootEntityDescriptor, org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)StringgenerateIdentityInsertString(boolean[] includeProperty)Used to generate an insert statement against the root table in the case of identifier generation strategies where the insert statement executions actually generates the identifier value.StringgenerateInsertString(boolean[] includeProperty)StringgenerateInsertString(boolean[] includeProperty, int j)Generate the SQL that inserts a rowprotected PredicategenerateJoinPredicate(TableReference rootTableReference, TableReference joinedTableReference, int subClassTablePosition, SqlExpressionResolver sqlExpressionResolver)protected PredicategenerateJoinPredicate(TableReference rootTableReference, TableReference joinedTableReference, String[] fkColumnNames, SqlExpressionResolver sqlExpressionResolver)protected Map<String,org.hibernate.loader.ast.internal.SingleIdArrayLoadPlan>generateLazySelectStringsByFetchGroup()protected LockingStrategygenerateLocker(LockMode lockMode)protected EntityIdentifierMappinggenerateNonEncapsulatedCompositeIdentifierMapping(org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess, PersistentClass bootEntityDescriptor)StringgenerateSelectVersionString()Generate the SQL that selects the version number by idprotected String[]generateSQLDeleteStrings(Object[] loadedState)static StringgenerateTableAlias(String rootAlias, int tableNumber)protected TableReferenceJoingenerateTableReferenceJoin(TableReference lhs, String joinTableExpression, SqlAliasBase sqlAliasBase, boolean innerJoin, String[] targetColumns, SqlExpressionResolver sqlExpressionResolver)StringgenerateUpdateString(boolean[] includeProperty, int j, boolean useRowId)StringgenerateUpdateString(boolean[] includeProperty, int j, Object[] oldFields, boolean useRowId)Generate the SQL that updates a row by id (and version)protected EntityVersionMappinggenerateVersionMapping(Supplier<?> templateInstanceCreator, PersistentClass bootEntityDescriptor, org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)protected static EntityVersionMappinggenerateVersionMapping(AbstractEntityPersister entityPersister, Supplier<?> templateInstanceCreator, PersistentClass bootModelRootEntityDescriptor, org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)AttributeMappinggetAttributeMapping(int position)Retrieve an attribute by its contributor positionList<AttributeMapping>getAttributeMappings()Get access to the attributes defined on this class and any supersBytecodeEnhancementMetadatagetBytecodeEnhancementMetadata()EntityDataAccessgetCacheAccessStrategy()Get the cache (optional operation)CacheEntryStructuregetCacheEntryStructure()Get the cache structureCascadeStylegetCascadeStyle(int i)Get the cascade style of this (subclass closure) propertyClassMetadatagetClassMetadata()Deprecated.ObjectgetCollectionKey(CollectionPersister persister, Object owner, EntityEntry ownerEntry, SharedSessionContractImplementor session)Class<?>getConcreteProxyClass()Get the proxy interface that instances of this concrete class will be cast to (optional operation).ObjectgetCurrentVersion(Object id, SharedSessionContractImplementor session)Retrieve the version numberObject[]getDatabaseSnapshot(Object id, SharedSessionContractImplementor session)Get the current database state of the object, in a "hydrated" form, without resolving identifiersCollection<AttributeMapping>getDeclaredAttributeMappings()Get access to the attributes defined on this class - do not access attributes defined on the superprotected ExecuteUpdateResultCheckStyle[]getDeleteResultCheckStyles()StringgetDiscriminatorAlias()StringgetDiscriminatorAlias(String suffix)Get the result set aliases used for the identifier columns, given a suffixStringgetDiscriminatorColumnName()StringgetDiscriminatorColumnReaders()StringgetDiscriminatorColumnReaderTemplate()StringgetDiscriminatorFormulaTemplate()EntityDiscriminatorMappinggetDiscriminatorMapping()EntityEntryFactorygetEntityEntryFactory()Get the EntityEntryFactory indicated for the entity mapped by this persister.EntityMappingTypegetEntityMappingType()EntityMetamodelgetEntityMetamodel()Retrieve the underlying entity metamodel instance...StringgetEntityName()The entity name which this persister maps.EntityPersistergetEntityPersister()Safety-net.EntityTypegetEntityType()SessionFactoryImplementorgetFactory()Return the SessionFactory to which this persister "belongs".FetchablegetFetchable(int position)FetchModegetFetchMode(int i)May this (subclass closure) property be fetched using an SQL outerjoin?ObjectgetIdByUniqueKey(Object key, String uniquePropertyName, SharedSessionContractImplementor session)ObjectgetIdentifier(Object entity, SharedSessionContractImplementor session)Get the identifier of an instance (throw an exception if no identifier property)String[]getIdentifierAliases()String[]getIdentifierAliases(String suffix)Get the result set aliases used for the identifier columns, given a suffixString[]getIdentifierColumnNames()Get the names of columns used to persist the identifierString[]getIdentifierColumnReaders()String[]getIdentifierColumnReaderTemplates()intgetIdentifierColumnSpan()IdentifierGeneratorgetIdentifierGenerator()Determine which identifier generation strategy is used for this entity.EntityIdentifierMappinggetIdentifierMapping()StringgetIdentifierPropertyName()Get the name of the identifier property (or return null) - need not return the name of an actual Java propertyTypegetIdentifierType()Get the identifier typeStringgetIdentitySelectString()Get the database-specific SQL command to retrieve the last generated IDENTITY value.protected ExecuteUpdateResultCheckStyle[]getInsertResultCheckStyles()BytecodeEnhancementMetadatagetInstrumentationMetadata()intgetJdbcTypeCount()The number of JDBC mappingsString[]getKeyColumnNames()The columns to join onabstract String[]getKeyColumns(int j)FetchablegetKeyFetchable(int position)protected String[][]getLazyPropertyColumnAliases()Class<?>getMappedClass()The persistent class, or nullJavaType<?>getMappedJavaType()StringgetMappedSuperclass()Get the class that this class is mapped as a subclass of - not necessarily the direct superclassMultiNaturalIdLoader<?>getMultiNaturalIdLoader()Access to performing multi-value natural-id database selection.StringgetName()An identifying name; a class name or collection role name.NaturalIdDataAccessgetNaturalIdCacheAccessStrategy()Get the NaturalId cache (optional operation)int[]getNaturalIdentifierProperties()If the entity defines a natural id (EntityPersister.hasNaturalIdentifier()), which properties make up the natural id.ObjectgetNaturalIdentifierSnapshot(Object id, SharedSessionContractImplementor session)Retrieve the current state of the natural-id properties from the database.NaturalIdLoader<?>getNaturalIdLoader()Access to performing natural-id database selection.NaturalIdMappinggetNaturalIdMapping()NavigableRolegetNavigableRole()boolean[]getNonLazyPropertyUpdateability()intgetNumberOfAttributeMappings()Get the number of attributes defined on this class and any supersintgetNumberOfDeclaredAttributeMappings()Get the number of attributes defined on this class - do not access attributes defined on the superintgetNumberOfFetchables()The number of fetchables in the containerintgetNumberOfKeyFetchables()The number of key fetchables in the containerStringgetPartName()boolean[]getPropertiesToInsert(Object[] fields)Transform the array of property indexes to an array of booleans, true when the property is insertable and non-nullboolean[]getPropertiesToUpdate(int[] dirtyProperties, boolean hasDirtyCollection)Transform the array of property indexes to an array of booleans, true when the property is dirtyString[]getPropertyAliases(String suffix, int i)Get the result set aliases used for the property columns, given a suffix (properties of this class, only).CascadeStyle[]getPropertyCascadeStyles()Get the cascade styles of the properties (optional operation)boolean[]getPropertyCheckability()Get the "checkability" of the properties of this class (is the property dirty checked, does the cache need to be updated)boolean[][]getPropertyColumnInsertable()String[]getPropertyColumnNames(int i)Get the result set column names mapped for this property (properties of this class, only).String[]getPropertyColumnNames(String propertyName)Get the column names for the given property pathintgetPropertyColumnSpan(int i)boolean[][]getPropertyColumnUpdateable()String[]getPropertyColumnWriters(int i)intgetPropertyIndex(String propertyName)Get the property number of the unique key propertyboolean[]getPropertyInsertability()Get the "insertability" of the properties of this class (does the property appear in an SQL INSERT)boolean[]getPropertyLaziness()Get the "laziness" of the properties of this classString[]getPropertyNames()Get the names of the class properties - doesn't have to be the names of the actual Java properties (used for XML generation only)boolean[]getPropertyNullability()Get the nullability of the properties of this classintgetPropertySpan()StringgetPropertyTableName(String propertyName)Get the table name for the given property pathprotected abstract int[]getPropertyTableNumbers()TypegetPropertyType(String propertyName)Get the type of a particular property by name.Type[]getPropertyTypes()Get the Hibernate types of the class propertiesboolean[]getPropertyUpdateability()Get the "updateability" of the properties of this class (does the property appear in an SQL UPDATE)boolean[]getPropertyUpdateability(Object entity)Which properties appear in the SQL update? (Initialized, updateable ones!)ObjectgetPropertyValue(Object object, int i)ObjectgetPropertyValue(Object object, String propertyName)Get the value of a particular propertyObject[]getPropertyValues(Object object)Extract the property values from the given entity.Object[]getPropertyValuesToInsert(Object entity, Map<Object,Object> mergeMap, SharedSessionContractImplementor session)Return the values of the insertable properties of the object (including backrefs)boolean[]getPropertyVersionability()Get the "versionability" of the properties of this class (is the property optimistic-locked)Serializable[]getQuerySpaces()Returns an array of objects that identify spaces in which properties of this entity are persisted, for instances of this class and its subclasses.EntityRepresentationStrategygetRepresentationStrategy()StringgetRootEntityName()Returns an object that identifies the space in which identifiers of this entity hierarchy are unique.StringgetRootTableAlias(String drivingAlias)Get the SQL alias this persister would use for the root table given the passed driving alias.String[]getRootTableIdentifierColumnNames()Get the names of columns on the root table used to persist the identifier.String[]getRootTableKeyColumnNames()The names of the primary key columns in the root table.StringgetRootTableName()Locks are always applied to the "root table".EntityRowIdMappinggetRowIdMapping()StringgetSelectByUniqueKeyString(String propertyName)Get a SQL select string that performs a select based on a unique key determined by the given property name).SingleIdEntityLoader<?>getSingleIdEntityLoader()StringgetSqlAliasStem()Get the "stem" used as the base for generating SQL table aliases for table references that are part of the TableGroup being generatedString[]getSQLDeleteStrings()StringgetSQLIdentityInsertString()The query that inserts a row, letting the database generate an idString[]getSQLInsertStrings()String[]getSQLLazyUpdateByRowIdStrings()String[]getSQLLazyUpdateStrings()String[]getSQLUpdateByRowIdStrings()String[]getSQLUpdateStrings()SqmMultiTableInsertStrategygetSqmMultiTableInsertStrategy()SqmMultiTableMutationStrategygetSqmMultiTableMutationStrategy()The strategy to use for SQM mutation statements where the target entity has multiple tables.protected intgetStateArrayInitialPosition(org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)protected List<Fetchable>getStaticFetchableList()protected String[]getSubclassColumnAliasClosure()EntityPersistergetSubclassEntityPersister(Object instance, SessionFactoryImplementor factory)A request has already identified the entity-name of this persister as the mapping for the given instance.protected String[]getSubclassFormulaAliasClosure()String[]getSubclassPropertyColumnAliases(String propertyName, String suffix)Return the column alias names used to persist/query the named property of the class or a subclass (optional operation).protected String[][]getSubclassPropertyColumnNameClosure()String[]getSubclassPropertyColumnNames(int i)Return the column names used to persist the numbered property of the class or a subclass.String[]getSubclassPropertyColumnNames(String propertyName)Return the column names used to persist/query the named property of the class or a subclass (optional operation).String[][]getSubclassPropertyColumnReaderClosure()String[][]getSubclassPropertyColumnReaderTemplateClosure()Queryable.DeclarergetSubclassPropertyDeclarer(String propertyPath)Determine whether the given property is declared by our mapped class, our super class, or one of our subclasses...String[][]getSubclassPropertyFormulaTemplateClosure()StringgetSubclassPropertyName(int i)Get the name of the numbered property of the class or a subclass.protected String[]getSubclassPropertyNameClosure()protected abstract intgetSubclassPropertyTableNumber(int i)intgetSubclassPropertyTableNumber(String propertyPath)Warning: When there are duplicated property names in the subclasses of the class, this method may return the wrong table number for the duplicated subclass property (note that SingleTableEntityPersister defines an overloaded form which takes the entity name.TypegetSubclassPropertyType(int i)Get the type of the numbered property of the class or a subclass.protected Type[]getSubclassPropertyTypeClosure()protected abstract String[]getSubclassTableKeyColumns(int j)abstract StringgetSubclassTableName(int j)Get the name of the table with the given index from the internal array.protected abstract String[]getSubclassTableNames()abstract intgetSubclassTableSpan()EntityMappingTypegetSuperMappingType()StringgetTableAliasForColumn(String columnName, String rootAlias)Given a column name and the root table alias in use for the entity hierarchy, determine the proper table alias for the table in that hierarchy that contains said column.protected boolean[]getTableHasColumns()static intgetTableId(String tableName, String[] tables)abstract StringgetTableName(int j)String[]getTableNames()abstract intgetTableSpan()boolean[]getTableUpdateNeeded(int[] dirtyProperties, boolean hasDirtyCollection)Decide which tables need to be updated.TypegetType()Get the typeDiscriminatorMetadatagetTypeDiscriminatorMetadata()Retrieve the information needed to properly deal with this entity's discriminator in a query.protected SingleUniqueKeyEntityLoader<?>getUniqueKeyLoader(String attributeName)protected ExecuteUpdateResultCheckStyle[]getUpdateResultCheckStyles()protected String[]getUpdateStrings(boolean byRowId, boolean lazy)ObjectgetVersion(Object object)Get the version number (or timestamp) from the object's version property (or return null if not versioned)StringgetVersionColumnName()For versioned entities, get the name of the column (again, expected on the root table) used to store the version values.Comparator<?>getVersionComparator()StringgetVersionedTableName()EntityVersionMappinggetVersionMapping()intgetVersionProperty()IfEntityPersister.isVersioned(), then what is the index of the property holding the locking value.StringgetVersionSelectString()BasicType<?>getVersionType()IfEntityPersister.isVersioned(), then what is the type of the property holding the locking value.booleanhasCache()Does this class have a cache.booleanhasCascades()Determine whether this entity has any non-none cascading.booleanhasCollections()Determine whether this entity contains references to persistent collections.abstract booleanhasDuplicateTables()booleanhasFormulaProperties()booleanhasIdentifierProperty()Determine whether the entity has a particular property holding the identifier value.booleanhasInsertGeneratedProperties()Does this entity define any properties as being database generated on insert?booleanhasLazyProperties()Determine whether this entity defines any lazy properties (ala bytecode instrumentation).protected booleanhasMultipleTables()booleanhasMutableProperties()Determine whether any properties of this entity are considered mutable.booleanhasNaturalIdCache()Does this class have a natural id cachebooleanhasNaturalIdentifier()Determine whether this entity defines a natural identifier.booleanhasProxy()Determine whether this entity supports dynamic proxies.booleanhasRowId()Does the result set contain rowids?booleanhasSubclasses()Does this persistent class have subclasses?booleanhasSubselectLoadableCollections()Determine whether this entity contains references to persistent collections which are fetchable by subselect?booleanhasUninitializedLazyProperties(Object object)Does the given instance have any uninitialized lazy properties?booleanhasUpdateGeneratedProperties()Does this entity define any properties as being database generated on update?booleanimplementsLifecycle()Does the class implement theLifecycleinterface.ObjectinitializeEnhancedEntityUsedAsProxy(Object entity, String nameOfAttributeBeingAccessed, SharedSessionContractImplementor session)Called fromEnhancementAsProxyLazinessInterceptorto trigger load of the entity's non-lazy state as well as the named attribute we are accessing if it is still uninitialized after fetching non-lazy stateprotected ObjectinitializeLazyPropertiesFromCache(String fieldName, Object entity, SharedSessionContractImplementor session, EntityEntry entry, CacheEntry cacheEntry)protected ObjectinitializeLazyPropertiesFromDatastore(Object entity, Object id, EntityEntry entry, String fieldName, SharedSessionContractImplementor session)protected booleaninitializeLazyProperty(String fieldName, Object entity, EntityEntry entry, int index, Object propValue)ObjectinitializeLazyProperty(String fieldName, Object entity, SharedSessionContractImplementor session)Initialize the property, and return its new value.protected voidinitPropertyPaths(Metadata mapping)protected voidinitSubclassPropertyAliasesMap(PersistentClass model)Must be called by subclasses, at the end of their constructorsObjectinsert(Object[] fields, boolean[] notNull, String sql, Object object, SharedSessionContractImplementor session)Perform an SQL INSERT, and then retrieve a generated identifier.Objectinsert(Object[] fields, Object object, SharedSessionContractImplementor session)Persist an instance, using a natively generated identifier (optional operation)voidinsert(Object id, Object[] fields, boolean[] notNull, int j, String sql, Object object, SharedSessionContractImplementor session)Perform an SQL INSERT.voidinsert(Object id, Object[] fields, Object object, SharedSessionContractImplementor session)Persist an instanceObjectinstantiate(Object id, SharedSessionContractImplementor session)Create a class instance initialized with the given identifierprotected static SqmMultiTableInsertStrategyinterpretSqmMultiTableInsertStrategy(AbstractEntityPersister entityMappingDescriptor, org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)protected static SqmMultiTableMutationStrategyinterpretSqmMultiTableStrategy(AbstractEntityPersister entityMappingDescriptor, org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)booleanisAbstract()Is this an abstract class?booleanisAffectedByEnabledFetchProfiles(LoadQueryInfluencers loadQueryInfluencers)booleanisAffectedByEnabledFilters(LoadQueryInfluencers loadQueryInfluencers)booleanisAffectedByEntityGraph(LoadQueryInfluencers loadQueryInfluencers)booleanisAllNull(Object[] array, int tableNumber)protected booleanisAllOrDirtyOptLocking()booleanisBatchable()booleanisBatchLoadable()Is batch loading enabled?booleanisCacheInvalidationRequired()We can't immediately add to the cache if we have formulas which must be evaluated, or if we have the possibility of two concurrent updates to the same item being merged on the database.protected booleanisClassOrSuperclassJoin(int j)protected abstract booleanisClassOrSuperclassTable(int j)booleanisCollection()Is this instance actually a CollectionPersister?booleanisDefinedOnSubclass(int i)Is this property defined on a subclass of the mapped class.booleanisDeleteCallable(int j)booleanisExplicitPolymorphism()Is this class explicit polymorphism only?booleanisIdentifierAssignedByInsert()Are identifiers of this entity assigned known before the insert execution? Or, are they generated (in the database) by the insert execution.booleanisInherited()Determine whether the entity is inherited one or more other entities.booleanisInsertCallable(int j)booleanisInstance(Object object)Is the given object an instance of this entity?booleanisInstrumented()Has the class actually been bytecode instrumented?protected booleanisInverseSubclassTable(int j)booleanisInverseTable(int j)booleanisLazyPropertiesCacheable()Should lazy properties of this entity be cached?booleanisModifiableEntity(EntityEntry entry)booleanisMultiTable()Deprecated.booleanisMutable()Determine whether instances of this entity are considered mutable.protected booleanisNullableSubclassTable(int j)booleanisNullableTable(int j)protected booleanisPhysicalDiscriminator()booleanisPolymorphic()abstract booleanisPropertyOfTable(int property, int j)booleanisSelectBeforeUpdateRequired()Is select snapshot before update enabled?booleanisSubclassEntityName(String entityName)Determine whether the given name represents a subclass entity (or this entity itself) of the entity mapped by this persister.booleanisSubclassPropertyNullable(int i)Is the numbered property of the class of subclass nullable?protected booleanisSubclassTableIndicatedByTreatAsDeclarations(int subclassTableNumber, Set<String> treatAsDeclarations)protected booleanisSubclassTableSequentialSelect(int j)abstract booleanisTableCascadeDeleteEnabled(int j)BooleanisTransient(Object entity, SharedSessionContractImplementor session)Is this a new transient instance?booleanisTypeOrSuperType(EntityMappingType targetType)booleanisUpdateCallable(int j)booleanisVersioned()Determine whether optimistic locking by column is enabled for this entity.booleanisVersionPropertyGenerated()Does this entity contain a version property that is defined to be database generated?booleanisVersionPropertyInsertable()Is the version property included in insert statements?protected voidlinkToSession(Object entity, SharedSessionContractImplementor session)voidlinkWithSubType(EntityMappingType sub, org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)voidlinkWithSuperType(org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)Objectload(Object id, Object optionalObject, LockMode lockMode, SharedSessionContractImplementor session)Load an instance using either theforUpdateLoaderor the outer joiningloader, depending upon the value of thelockparameterObjectload(Object id, Object optionalObject, LockOptions lockOptions, SharedSessionContractImplementor session)Load an instance using either theforUpdateLoaderor the outer joiningloader, depending upon the value of thelockparameterObjectload(Object id, Object optionalObject, LockOptions lockOptions, SharedSessionContractImplementor session, Boolean readOnly)ObjectloadByUniqueKey(String propertyName, Object uniqueKey, Boolean readOnly, SharedSessionContractImplementor session)ObjectloadByUniqueKey(String propertyName, Object uniqueKey, SharedSessionContractImplementor session)Load an instance of the persistent class, by a unique key other than the primary key.ObjectloadEntityIdByNaturalId(Object[] naturalIdValues, LockOptions lockOptions, SharedSessionContractImplementor session)Load the id for the entity based on the natural id.voidlock(Object id, Object version, Object object, LockMode lockMode, SharedSessionContractImplementor session)Do a version check (optional operation)voidlock(Object id, Object version, Object object, LockOptions lockOptions, SharedSessionContractImplementor session)Do a version check (optional operation)protected voidlogStaticSQL()List<?>multiLoad(Object[] ids, SharedSessionContractImplementor session, MultiIdLoadOptions loadOptions)Performs a load of multiple entities (of this type) by identifier simultaneously.protected OptimisticLockStyleoptimisticLockStyle()protected voidpostConstruct(Metadata mapping)Post-construct is a callback for AbstractEntityPersister subclasses to call after they are all done with their constructor processing.voidpostInstantiate()Finish the initialization of this object.protected voidpreInsertInMemoryValueGeneration(Object[] fields, Object object, SharedSessionContractImplementor session)voidprepareMappingModel(org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)voidprocessInsertGeneratedProperties(Object id, Object entity, Object[] state, SharedSessionContractImplementor session)Perform a select to retrieve the values of any generated properties back from the database, injecting these generated values into the given entity as well as writing this state to thePersistenceContext.voidprocessUpdateGeneratedProperties(Object id, Object entity, Object[] state, SharedSessionContractImplementor session)Perform a select to retrieve the values of any generated properties back from the database, injecting these generated values into the given entity as well as writing this state to thePersistenceContext.voidregisterAffectingFetchProfile(String fetchProfileName)Register the name of a fetch profile determined to have an affect on the underlying loadable in regards to the fact that the underlying load SQL needs to be adjust when the given fetch profile is enabled.voidresetIdentifier(Object entity, Object currentId, Object currentVersion, SharedSessionContractImplementor session)Set the identifier and version of the given instance back to its "unsaved" value.int[]resolveAttributeIndexes(String[] attributeNames)Converts an array of attribute names to a set of indexes, according to the entity metamodelint[]resolveDirtyAttributeIndexes(Object[] currentState, Object[] previousState, String[] attributeNames, SessionImplementor session)LikeEntityPersister.resolveAttributeIndexes(String[])but also always returns mutable attributesprotected TableReferenceresolvePrimaryTableReference(SqlAliasBase sqlAliasBase)StringselectFragment(String alias, String suffix)Generate a list of collection index, key and element columnsvoidsetIdentifier(Object entity, Object id, SharedSessionContractImplementor session)Inject the identifier value into the given entity.voidsetPropertyValue(Object object, int i, Object value)Set the value of a particular propertyvoidsetPropertyValue(Object object, String propertyName, Object value)Set the value of a particular (named) propertyvoidsetPropertyValues(Object object, Object[] values)Set the given values to the mapped properties of the given objectprotected booleanshouldGetAllProperties(Object entity)protected booleanshouldInnerJoinSubclassTable(int subclassTableNumber, Set<String> treatAsDeclarations)protected booleanshouldProcessSuperMapping()String[]toColumns(String propertyName)Given a property path, return the corresponding column name(s).String[]toColumns(String name, int i)Given the number of a property of a subclass, and a table alias, return the aliased column names.StringtoString()TypetoType(String propertyName)Given a component path expression, get the type of the propertyvoidupdate(Object id, Object[] fields, int[] dirtyFields, boolean hasDirtyCollection, Object[] oldFields, Object oldVersion, Object object, Object rowId, SharedSessionContractImplementor session)Update an objectbooleanupdate(Object id, Object[] fields, Object[] oldFields, Object rowId, boolean[] includeProperty, int j, Object oldVersion, Object object, String sql, SharedSessionContractImplementor session)voidupdateOrInsert(Object id, Object[] fields, Object[] oldFields, Object rowId, boolean[] includeProperty, int j, Object oldVersion, Object object, String sql, SharedSessionContractImplementor session)Perform an SQL UPDATE or SQL INSERTbooleanuseGetGeneratedKeys()voidvisitAttributeMappings(Consumer<? super AttributeMapping> action)Visit attributes defined on this class and any supersvoidvisitAttributeMappings(Consumer<? super AttributeMapping> action, EntityMappingType targetType)Visit the mappings, but limited to just attributes defined in the targetType or its super-type(s) if any.voidvisitDeclaredAttributeMappings(Consumer<? super AttributeMapping> action)Visit attributes defined on this class - do not visit attributes defined on the supervoidvisitFetchables(Consumer<Fetchable> fetchableConsumer, EntityMappingType treatTargetType)voidvisitFetchables(IndexedConsumer<Fetchable> fetchableConsumer, EntityMappingType treatTargetType)voidvisitKeyFetchables(Consumer<Fetchable> fetchableConsumer, EntityMappingType treatTargetType)voidvisitKeyFetchables(IndexedConsumer<Fetchable> fetchableConsumer, EntityMappingType treatTargetType)voidvisitSubParts(Consumer<ModelPart> consumer, EntityMappingType treatTargetType)LikeQueryable.findSubPart(java.lang.String, org.hibernate.metamodel.mapping.EntityMappingType), this form visits all parts defined on the entity, its super-types and its sub-types.voidvisitSubTypeAttributeMappings(Consumer<? super AttributeMapping> action)Walk this type's attributes as well as its sub-type'svoidvisitSuperTypeAttributeMappings(Consumer<? super AttributeMapping> action)Walk this type's attributes as well as its super-type's-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, getJdbcMappings
-
Methods inherited from interface org.hibernate.metadata.ClassMetadata
getIdentifier, getIdentifier, getPropertyValuesToInsert, instantiate, setIdentifier
-
Methods inherited from interface org.hibernate.metamodel.mapping.EntityMappingType
createRootTableGroup, extractConcreteTypeStateValues, findContainingEntityMapping, findSubPart, getContributor, getJavaType, getPartMappingType, getRootEntityDescriptor, getRootPathName, getSubclassEntityNames, isTypeOrSuperType, pruneForSubclasses, visitConstraintOrderedTables
-
Methods inherited from interface org.hibernate.persister.entity.EntityPersister
breakDownJdbcValues, getFilterAliasGenerator, getFilterAliasGenerator, getPropertySpaces, getSynchronizationSpaces, getSynchronizedQuerySpaces, getValue, getValues, getVersionJavaType, load, setValue, setValues, visitQuerySpaces
-
Methods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
visitFetchables, visitKeyFetchables
-
Methods inherited from interface org.hibernate.persister.entity.Joinable
getTableName
-
Methods inherited from interface org.hibernate.persister.entity.Loadable
getDiscriminatorType, getDiscriminatorValue, getSubclassForDiscriminatorValue
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, forEachSelectable
-
Methods inherited from interface org.hibernate.persister.entity.OuterJoinLoadable
fromTableFragment, getSubclassPropertyTableName
-
Methods inherited from interface org.hibernate.metamodel.mapping.Queryable
findByPath, resolveSubPart
-
Methods inherited from interface org.hibernate.persister.entity.Queryable
getConstraintOrderedTableNameClosure, getContraintOrderedTableKeyColumnClosure, getDiscriminatorSQLValue
-
-
-
-
Field Detail
-
ENTITY_CLASS
public static final String ENTITY_CLASS
- See Also:
- Constant Field Values
-
VERSION_COLUMN_ALIAS
public static final String VERSION_COLUMN_ALIAS
- See Also:
- Constant Field Values
-
batchSize
protected final int batchSize
-
rowIdName
protected final String rowIdName
-
insertCallable
protected boolean[] insertCallable
-
updateCallable
protected boolean[] updateCallable
-
deleteCallable
protected boolean[] deleteCallable
-
customSQLInsert
protected String[] customSQLInsert
-
customSQLUpdate
protected String[] customSQLUpdate
-
customSQLDelete
protected String[] customSQLDelete
-
insertResultCheckStyles
protected ExecuteUpdateResultCheckStyle[] insertResultCheckStyles
-
updateResultCheckStyles
protected ExecuteUpdateResultCheckStyle[] updateResultCheckStyles
-
deleteResultCheckStyles
protected ExecuteUpdateResultCheckStyle[] deleteResultCheckStyles
-
propertyMapping
protected final BasicEntityPropertyMapping propertyMapping
Warning: When there are duplicated property names in the subclasses then propertyMapping will only contain one of those properties. To ensure correct results, propertyMapping should only be used for the concrete EntityPersister (since the concrete EntityPersister cannot have duplicated property names).
-
declaredAttributeMappings
protected Map<String,AttributeMapping> declaredAttributeMappings
-
accessOptimizer
protected ReflectionOptimizer.AccessOptimizer accessOptimizer
-
-
Constructor Detail
-
AbstractEntityPersister
@Deprecated(since="6.0") public AbstractEntityPersister(PersistentClass bootDescriptor, EntityDataAccess cacheAccessStrategy, NaturalIdDataAccess naturalIdRegionAccessStrategy, PersisterCreationContext creationContext) throws HibernateException
Deprecated.- Throws:
HibernateException
-
AbstractEntityPersister
public AbstractEntityPersister(PersistentClass bootDescriptor, EntityDataAccess cacheAccessStrategy, NaturalIdDataAccess naturalIdRegionAccessStrategy, RuntimeModelCreationContext creationContext) throws HibernateException
- Throws:
HibernateException
-
-
Method Detail
-
addDiscriminatorToInsert
protected void addDiscriminatorToInsert(Insert insert)
-
getSubclassTableName
public abstract String getSubclassTableName(int j)
Description copied from interface:QueryableGet the name of the table with the given index from the internal array.- Specified by:
getSubclassTableNamein interfaceQueryable- Parameters:
j- The index into the internal array.
-
getSubclassTableNames
protected abstract String[] getSubclassTableNames()
-
getSubclassTableKeyColumns
protected abstract String[] getSubclassTableKeyColumns(int j)
-
isClassOrSuperclassTable
protected abstract boolean isClassOrSuperclassTable(int j)
-
isClassOrSuperclassJoin
protected boolean isClassOrSuperclassJoin(int j)
-
getSubclassTableSpan
public abstract int getSubclassTableSpan()
-
getTableSpan
public abstract int getTableSpan()
-
isTableCascadeDeleteEnabled
public abstract boolean isTableCascadeDeleteEnabled(int j)
-
hasDuplicateTables
public abstract boolean hasDuplicateTables()
-
getTableName
public abstract String getTableName(int j)
-
getKeyColumns
public abstract String[] getKeyColumns(int j)
-
isPropertyOfTable
public abstract boolean isPropertyOfTable(int property, int j)
-
getPropertyTableNumbers
protected abstract int[] getPropertyTableNumbers()
-
getSubclassPropertyTableNumber
protected abstract int getSubclassPropertyTableNumber(int i)
-
getDiscriminatorColumnName
public String getDiscriminatorColumnName()
- Specified by:
getDiscriminatorColumnNamein interfaceLoadable- Returns:
- the column name for the discriminator as specified in the mapping.
-
getDiscriminatorColumnReaders
public String getDiscriminatorColumnReaders()
-
getDiscriminatorColumnReaderTemplate
public String getDiscriminatorColumnReaderTemplate()
-
getDiscriminatorAlias
public String getDiscriminatorAlias()
-
getDiscriminatorFormulaTemplate
public String getDiscriminatorFormulaTemplate()
-
isInverseTable
public boolean isInverseTable(int j)
-
isNullableTable
public boolean isNullableTable(int j)
-
isNullableSubclassTable
protected boolean isNullableSubclassTable(int j)
-
isInverseSubclassTable
protected boolean isInverseSubclassTable(int j)
-
isSubclassEntityName
public boolean isSubclassEntityName(String entityName)
Description copied from interface:EntityPersisterDetermine whether the given name represents a subclass entity (or this entity itself) of the entity mapped by this persister.- Specified by:
isSubclassEntityNamein interfaceEntityPersister- Parameters:
entityName- The entity name to be checked.- Returns:
- True if the given entity name represents either the entity mapped by this persister or one of its subclass entities; false otherwise.
-
getTableHasColumns
protected boolean[] getTableHasColumns()
-
getRootTableKeyColumnNames
public String[] getRootTableKeyColumnNames()
Description copied from interface:PostInsertIdentityPersisterThe names of the primary key columns in the root table.- Specified by:
getRootTableKeyColumnNamesin interfacePostInsertIdentityPersister- Returns:
- The primary key column names.
-
getSQLUpdateByRowIdStrings
public String[] getSQLUpdateByRowIdStrings()
-
getSQLLazyUpdateByRowIdStrings
public String[] getSQLLazyUpdateByRowIdStrings()
-
getSQLDeleteStrings
public String[] getSQLDeleteStrings()
-
getSQLInsertStrings
public String[] getSQLInsertStrings()
-
getSQLUpdateStrings
public String[] getSQLUpdateStrings()
-
getSQLLazyUpdateStrings
public String[] getSQLLazyUpdateStrings()
-
getInsertResultCheckStyles
protected ExecuteUpdateResultCheckStyle[] getInsertResultCheckStyles()
-
getUpdateResultCheckStyles
protected ExecuteUpdateResultCheckStyle[] getUpdateResultCheckStyles()
-
getDeleteResultCheckStyles
protected ExecuteUpdateResultCheckStyle[] getDeleteResultCheckStyles()
-
getSQLIdentityInsertString
public String getSQLIdentityInsertString()
The query that inserts a row, letting the database generate an id- Returns:
- The IDENTITY-based insertion query.
-
getVersionSelectString
public String getVersionSelectString()
-
isInsertCallable
public boolean isInsertCallable(int j)
-
isUpdateCallable
public boolean isUpdateCallable(int j)
-
isDeleteCallable
public boolean isDeleteCallable(int j)
-
isSubclassTableSequentialSelect
protected boolean isSubclassTableSequentialSelect(int j)
-
getTableUpdateNeeded
public boolean[] getTableUpdateNeeded(int[] dirtyProperties, boolean hasDirtyCollection)Decide which tables need to be updated. The return here is an array of boolean values with each index corresponding to a given table in the scope of this persister.- Parameters:
dirtyProperties- The indices of all the entity properties considered dirty.hasDirtyCollection- Whether any collections owned by the entity which were considered dirty.- Returns:
- Array of booleans indicating which table require updating.
-
hasRowId
public boolean hasRowId()
Description copied from interface:LoadableDoes the result set contain rowids?
-
getPropertyColumnUpdateable
public boolean[][] getPropertyColumnUpdateable()
-
getPropertyColumnInsertable
public boolean[][] getPropertyColumnInsertable()
-
getTableNames
public String[] getTableNames()
-
buildCacheEntryHelper
protected AbstractEntityPersister.CacheEntryHelper buildCacheEntryHelper()
-
canUseReferenceCacheEntries
public boolean canUseReferenceCacheEntries()
- Specified by:
canUseReferenceCacheEntriesin interfaceEntityPersister
-
generateLazySelectStringsByFetchGroup
protected Map<String,org.hibernate.loader.ast.internal.SingleIdArrayLoadPlan> generateLazySelectStringsByFetchGroup()
-
getSqlAliasStem
public String getSqlAliasStem()
Description copied from interface:TableGroupProducerGet the "stem" used as the base for generating SQL table aliases for table references that are part of the TableGroup being generated Note that this is a metadata-ive value. It is only ever used internal to the producer producing its TableGroup.- Specified by:
getSqlAliasStemin interfaceEntityMappingType- Specified by:
getSqlAliasStemin interfaceEntityPersister- Specified by:
getSqlAliasStemin interfaceTableGroupProducer- See Also:
SqlAliasBaseManager.createSqlAliasBase(java.lang.String)
-
containsTableReference
public boolean containsTableReference(String tableExpression)
- Specified by:
containsTableReferencein interfaceTableGroupProducer
-
getPartName
public String getPartName()
- Specified by:
getPartNamein interfaceEntityMappingType- Specified by:
getPartNamein interfaceModelPart
-
createDomainResult
public <T> DomainResult<T> createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState)
Description copied from interface:ModelPartCreate a DomainResult for a specific reference to this ModelPart.- Specified by:
createDomainResultin interfaceEntityMappingType- Specified by:
createDomainResultin interfaceEntityValuedModelPart- Specified by:
createDomainResultin interfaceModelPart
-
applySqlSelections
public void applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState)
Description copied from interface:ModelPartApply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.- Specified by:
applySqlSelectionsin interfaceEntityMappingType- Specified by:
applySqlSelectionsin interfaceEntityValuedModelPart- Specified by:
applySqlSelectionsin interfaceModelPart
-
applySqlSelections
public void applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState, BiConsumer<SqlSelection,JdbcMapping> selectionConsumer)
Description copied from interface:ModelPartApply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.- Specified by:
applySqlSelectionsin interfaceEntityMappingType- Specified by:
applySqlSelectionsin interfaceEntityValuedModelPart- Specified by:
applySqlSelectionsin interfaceModelPart
-
getNaturalIdMapping
public NaturalIdMapping getNaturalIdMapping()
- Specified by:
getNaturalIdMappingin interfaceEntityMappingType
-
getEntityMappingType
public EntityMappingType getEntityMappingType()
- Specified by:
getEntityMappingTypein interfaceEntityPersister- Specified by:
getEntityMappingTypein interfaceEntityValuedModelPart
-
createRootTableGroup
public TableGroup createRootTableGroup(boolean canUseInnerJoins, NavigablePath navigablePath, String explicitSourceAlias, Supplier<Consumer<Predicate>> additionalPredicateCollectorAccess, SqlAliasBase sqlAliasBase, SqlExpressionResolver sqlExpressionResolver, FromClauseAccess fromClauseAccess, SqlAstCreationContext creationContext)
- Specified by:
createRootTableGroupin interfaceEntityMappingType- Specified by:
createRootTableGroupin interfaceRootTableGroupProducer
-
createPrimaryTableReference
public TableReference createPrimaryTableReference(SqlAliasBase sqlAliasBase, SqlExpressionResolver sqlExpressionResolver, SqlAstCreationContext creationContext)
- Specified by:
createPrimaryTableReferencein interfaceEntityMappingType
-
createTableReferenceJoin
public TableReferenceJoin createTableReferenceJoin(String joinTableExpression, SqlAliasBase sqlAliasBase, TableReference lhs, SqlExpressionResolver sqlExpressionResolver, SqlAstCreationContext creationContext)
- Specified by:
createTableReferenceJoinin interfaceEntityMappingType
-
generateTableReferenceJoin
protected TableReferenceJoin generateTableReferenceJoin(TableReference lhs, String joinTableExpression, SqlAliasBase sqlAliasBase, boolean innerJoin, String[] targetColumns, SqlExpressionResolver sqlExpressionResolver)
-
resolvePrimaryTableReference
protected TableReference resolvePrimaryTableReference(SqlAliasBase sqlAliasBase)
-
generateJoinPredicate
protected Predicate generateJoinPredicate(TableReference rootTableReference, TableReference joinedTableReference, String[] fkColumnNames, SqlExpressionResolver sqlExpressionResolver)
-
generateJoinPredicate
protected Predicate generateJoinPredicate(TableReference rootTableReference, TableReference joinedTableReference, int subClassTablePosition, SqlExpressionResolver sqlExpressionResolver)
-
initializeLazyProperty
public Object initializeLazyProperty(String fieldName, Object entity, SharedSessionContractImplementor session)
Description copied from interface:LazyPropertyInitializerInitialize the property, and return its new value.- Specified by:
initializeLazyPropertyin interfaceLazyPropertyInitializer- Parameters:
fieldName- The name of the field being initializedentity- The entity on which the initialization is occurringsession- The session from which the initialization originated.- Returns:
- ?
-
getCollectionKey
public Object getCollectionKey(CollectionPersister persister, Object owner, EntityEntry ownerEntry, SharedSessionContractImplementor session)
-
initializeLazyPropertiesFromDatastore
protected Object initializeLazyPropertiesFromDatastore(Object entity, Object id, EntityEntry entry, String fieldName, SharedSessionContractImplementor session)
-
initializeLazyPropertiesFromCache
protected Object initializeLazyPropertiesFromCache(String fieldName, Object entity, SharedSessionContractImplementor session, EntityEntry entry, CacheEntry cacheEntry)
-
initializeLazyProperty
protected boolean initializeLazyProperty(String fieldName, Object entity, EntityEntry entry, int index, Object propValue)
-
isBatchable
public boolean isBatchable()
-
getNavigableRole
public NavigableRole getNavigableRole()
- Specified by:
getNavigableRolein interfaceModelPart- See Also:
ModelPart.getPartName()
-
getQuerySpaces
public Serializable[] getQuerySpaces()
Description copied from interface:EntityPersisterReturns an array of objects that identify spaces in which properties of this entity are persisted, for instances of this class and its subclasses. Much likeEntityPersister.getPropertySpaces(), except that here we include subclass entity spaces.- Specified by:
getQuerySpacesin interfaceEntityPersister- Returns:
- The query spaces.
-
isBatchLoadable
public boolean isBatchLoadable()
Description copied from interface:EntityPersisterIs batch loading enabled?- Specified by:
isBatchLoadablein interfaceEntityPersister
-
getIdentifierColumnNames
public String[] getIdentifierColumnNames()
Description copied from interface:LoadableGet the names of columns used to persist the identifier- Specified by:
getIdentifierColumnNamesin interfaceLoadable- Specified by:
getIdentifierColumnNamesin interfacePostInsertIdentityPersister- Specified by:
getIdentifierColumnNamesin interfaceQueryable
-
getIdentifierColumnReaders
public String[] getIdentifierColumnReaders()
-
getIdentifierColumnReaderTemplates
public String[] getIdentifierColumnReaderTemplates()
-
getIdentifierColumnSpan
public int getIdentifierColumnSpan()
-
getIdentifierAliases
public String[] getIdentifierAliases()
-
getVersionColumnName
public String getVersionColumnName()
Description copied from interface:LockableFor versioned entities, get the name of the column (again, expected on the root table) used to store the version values.- Specified by:
getVersionColumnNamein interfaceLockable- Returns:
- The version column name.
-
getVersionedTableName
public String getVersionedTableName()
-
isCacheInvalidationRequired
public boolean isCacheInvalidationRequired()
We can't immediately add to the cache if we have formulas which must be evaluated, or if we have the possibility of two concurrent updates to the same item being merged on the database. This second case can happen if:- the item is not versioned, and either
- we have dynamic update enabled, or
- the state of the item spans multiple tables.
- Specified by:
isCacheInvalidationRequiredin interfaceEntityPersister
-
isLazyPropertiesCacheable
public boolean isLazyPropertiesCacheable()
Description copied from interface:EntityPersisterShould lazy properties of this entity be cached?- Specified by:
isLazyPropertiesCacheablein interfaceEntityPersister
-
selectFragment
public String selectFragment(String alias, String suffix)
Description copied from interface:OuterJoinLoadableGenerate a list of collection index, key and element columns- Specified by:
selectFragmentin interfaceOuterJoinLoadable- Specified by:
selectFragmentin interfaceSQLLoadable
-
getIdentifierAliases
public String[] getIdentifierAliases(String suffix)
Description copied from interface:LoadableGet the result set aliases used for the identifier columns, given a suffix- Specified by:
getIdentifierAliasesin interfaceLoadable
-
getPropertyAliases
public String[] getPropertyAliases(String suffix, int i)
Description copied from interface:LoadableGet the result set aliases used for the property columns, given a suffix (properties of this class, only).- Specified by:
getPropertyAliasesin interfaceLoadable
-
getDiscriminatorAlias
public String getDiscriminatorAlias(String suffix)
Description copied from interface:LoadableGet the result set aliases used for the identifier columns, given a suffix- Specified by:
getDiscriminatorAliasin interfaceLoadable
-
getDatabaseSnapshot
public Object[] getDatabaseSnapshot(Object id, SharedSessionContractImplementor session) throws HibernateException
Description copied from interface:EntityPersisterGet the current database state of the object, in a "hydrated" form, without resolving identifiers- Specified by:
getDatabaseSnapshotin interfaceEntityPersister- Returns:
- null if there is no row in the database
- Throws:
HibernateException
-
getIdByUniqueKey
public Object getIdByUniqueKey(Object key, String uniquePropertyName, SharedSessionContractImplementor session)
- Specified by:
getIdByUniqueKeyin interfaceEntityPersister
-
generateSelectVersionString
public String generateSelectVersionString()
Generate the SQL that selects the version number by id
-
forceVersionIncrement
public Object forceVersionIncrement(Object id, Object currentVersion, SharedSessionContractImplementor session)
- Specified by:
forceVersionIncrementin interfaceEntityPersister
-
getCurrentVersion
public Object getCurrentVersion(Object id, SharedSessionContractImplementor session) throws HibernateException
Retrieve the version number- Specified by:
getCurrentVersionin interfaceEntityPersister- Throws:
HibernateException
-
generateLocker
protected LockingStrategy generateLocker(LockMode lockMode)
-
lock
public void lock(Object id, Object version, Object object, LockMode lockMode, SharedSessionContractImplementor session) throws HibernateException
Description copied from interface:EntityPersisterDo a version check (optional operation)- Specified by:
lockin interfaceEntityPersister- Throws:
HibernateException
-
lock
public void lock(Object id, Object version, Object object, LockOptions lockOptions, SharedSessionContractImplementor session) throws HibernateException
Description copied from interface:EntityPersisterDo a version check (optional operation)- Specified by:
lockin interfaceEntityPersister- Throws:
HibernateException
-
getRootTableName
public String getRootTableName()
Description copied from interface:LockableLocks are always applied to the "root table".- Specified by:
getRootTableNamein interfaceLockable- Returns:
- The root table name
-
getRootTableAlias
public String getRootTableAlias(String drivingAlias)
Description copied from interface:LockableGet the SQL alias this persister would use for the root table given the passed driving alias.- Specified by:
getRootTableAliasin interfaceLockable- Parameters:
drivingAlias- The driving alias; or the alias for the table mapped by this persister in the hierarchy.- Returns:
- The root table alias.
-
getRootTableIdentifierColumnNames
public String[] getRootTableIdentifierColumnNames()
Description copied from interface:LockableGet the names of columns on the root table used to persist the identifier.- Specified by:
getRootTableIdentifierColumnNamesin interfaceLockable- Returns:
- The root table identifier column names.
-
toColumns
public String[] toColumns(String propertyName) throws QueryException
Given a property path, return the corresponding column name(s). Warning: When there are duplicated property names in the subclasses then this method may return the wrong results. To ensure correct results, this method should only be used when this is the concrete EntityPersister (since the concrete EntityPersister cannot have duplicated property names).- Specified by:
toColumnsin interfacePropertyMapping- Throws:
QueryException
-
toType
public Type toType(String propertyName) throws QueryException
Given a component path expression, get the type of the property Warning: When there are duplicated property names in the subclasses then this method may return the wrong results. To ensure correct results, this method should only be used when this is the concrete EntityPersister (since the concrete EntityPersister cannot have duplicated property names).- Specified by:
toTypein interfacePropertyMapping- Throws:
QueryException
-
getPropertyColumnNames
public String[] getPropertyColumnNames(String propertyName)
Get the column names for the given property path Warning: When there are duplicated property names in the subclasses then this method may return the wrong results. To ensure correct results, this method should only be used when this is the concrete EntityPersister (since the concrete EntityPersister cannot have duplicated property names).- Specified by:
getPropertyColumnNamesin interfaceOuterJoinLoadable
-
getSubclassPropertyTableNumber
public int getSubclassPropertyTableNumber(String propertyPath)
Warning: When there are duplicated property names in the subclasses of the class, this method may return the wrong table number for the duplicated subclass property (note that SingleTableEntityPersister defines an overloaded form which takes the entity name.- Specified by:
getSubclassPropertyTableNumberin interfaceQueryable- Parameters:
propertyPath- The name of the property.- Returns:
- The number of the table to which the property is mapped.
-
getSubclassPropertyDeclarer
public Queryable.Declarer getSubclassPropertyDeclarer(String propertyPath)
Description copied from interface:QueryableDetermine 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.Queryable.getSubclassPropertyTableNumber(java.lang.String)- Specified by:
getSubclassPropertyDeclarerin interfaceQueryable- Parameters:
propertyPath- The property name.- Returns:
- The property declarer
-
getPropertyTableName
public String getPropertyTableName(String propertyName)
Description copied from interface:OuterJoinLoadableGet the table name for the given property path- Specified by:
getPropertyTableNamein interfaceOuterJoinLoadable
-
getTypeDiscriminatorMetadata
public DiscriminatorMetadata getTypeDiscriminatorMetadata()
Description copied from interface:QueryableRetrieve the information needed to properly deal with this entity's discriminator in a query.- Specified by:
getTypeDiscriminatorMetadatain interfaceQueryable- Returns:
- The entity discriminator metadata
-
toColumns
public String[] toColumns(String name, int i)
Description copied from interface:OuterJoinLoadableGiven the number of a property of a subclass, and a table alias, return the aliased column names.- Specified by:
toColumnsin interfaceOuterJoinLoadable
-
getPropertyColumnNames
public String[] getPropertyColumnNames(int i)
Description copied from interface:LoadableGet the result set column names mapped for this property (properties of this class, only).- Specified by:
getPropertyColumnNamesin interfaceLoadable
-
getPropertyColumnWriters
public String[] getPropertyColumnWriters(int i)
-
getPropertyColumnSpan
public int getPropertyColumnSpan(int i)
-
hasFormulaProperties
public boolean hasFormulaProperties()
-
getFetchMode
public FetchMode getFetchMode(int i)
Description copied from interface:OuterJoinLoadableMay this (subclass closure) property be fetched using an SQL outerjoin?- Specified by:
getFetchModein interfaceOuterJoinLoadable
-
getCascadeStyle
public CascadeStyle getCascadeStyle(int i)
Description copied from interface:OuterJoinLoadableGet the cascade style of this (subclass closure) property- Specified by:
getCascadeStylein interfaceOuterJoinLoadable
-
getSubclassPropertyType
public Type getSubclassPropertyType(int i)
Description copied from interface:OuterJoinLoadableGet the type of the numbered property of the class or a subclass.- Specified by:
getSubclassPropertyTypein interfaceOuterJoinLoadable
-
getSubclassPropertyName
public String getSubclassPropertyName(int i)
Description copied from interface:OuterJoinLoadableGet the name of the numbered property of the class or a subclass.- Specified by:
getSubclassPropertyNamein interfaceOuterJoinLoadable
-
countSubclassProperties
public int countSubclassProperties()
Description copied from interface:OuterJoinLoadableHow many properties are there, for this class and all subclasses?- Specified by:
countSubclassPropertiesin interfaceOuterJoinLoadable
-
getSubclassPropertyColumnNames
public String[] getSubclassPropertyColumnNames(int i)
Description copied from interface:OuterJoinLoadableReturn the column names used to persist the numbered property of the class or a subclass.- Specified by:
getSubclassPropertyColumnNamesin interfaceOuterJoinLoadable
-
isDefinedOnSubclass
public boolean isDefinedOnSubclass(int i)
Description copied from interface:OuterJoinLoadableIs this property defined on a subclass of the mapped class.- Specified by:
isDefinedOnSubclassin interfaceOuterJoinLoadable
-
getSubclassPropertyFormulaTemplateClosure
public String[][] getSubclassPropertyFormulaTemplateClosure()
- Specified by:
getSubclassPropertyFormulaTemplateClosurein interfaceQueryable
-
getSubclassPropertyTypeClosure
protected Type[] getSubclassPropertyTypeClosure()
-
getSubclassPropertyColumnNameClosure
protected String[][] getSubclassPropertyColumnNameClosure()
-
getSubclassPropertyColumnReaderClosure
public String[][] getSubclassPropertyColumnReaderClosure()
-
getSubclassPropertyColumnReaderTemplateClosure
public String[][] getSubclassPropertyColumnReaderTemplateClosure()
-
getSubclassPropertyNameClosure
protected String[] getSubclassPropertyNameClosure()
-
resolveAttributeIndexes
public int[] resolveAttributeIndexes(String[] attributeNames)
Description copied from interface:EntityPersisterConverts an array of attribute names to a set of indexes, according to the entity metamodel- Specified by:
resolveAttributeIndexesin interfaceEntityPersister- Parameters:
attributeNames- Array of names to be resolved- Returns:
- A set of unique indexes of the attribute names found in the metamodel
-
resolveDirtyAttributeIndexes
public int[] resolveDirtyAttributeIndexes(Object[] currentState, Object[] previousState, String[] attributeNames, SessionImplementor session)
Description copied from interface:EntityPersisterLikeEntityPersister.resolveAttributeIndexes(String[])but also always returns mutable attributes- Specified by:
resolveDirtyAttributeIndexesin interfaceEntityPersisterattributeNames- Array of names to be resolved- Returns:
- A set of unique indexes of the attribute names found in the metamodel
-
getSubclassColumnAliasClosure
protected String[] getSubclassColumnAliasClosure()
-
getSubclassFormulaAliasClosure
protected String[] getSubclassFormulaAliasClosure()
-
getSubclassPropertyColumnAliases
public String[] getSubclassPropertyColumnAliases(String propertyName, String suffix)
Description copied from interface:SQLLoadableReturn the column alias names used to persist/query the named property of the class or a subclass (optional operation).- Specified by:
getSubclassPropertyColumnAliasesin interfaceSQLLoadable
-
getSubclassPropertyColumnNames
public String[] getSubclassPropertyColumnNames(String propertyName)
Description copied from interface:SQLLoadableReturn the column names used to persist/query the named property of the class or a subclass (optional operation).- Specified by:
getSubclassPropertyColumnNamesin interfaceSQLLoadable
-
initSubclassPropertyAliasesMap
protected void initSubclassPropertyAliasesMap(PersistentClass model) throws MappingException
Must be called by subclasses, at the end of their constructors- Throws:
MappingException
-
getLazyPropertyColumnAliases
protected String[][] getLazyPropertyColumnAliases()
-
loadByUniqueKey
public Object loadByUniqueKey(String propertyName, Object uniqueKey, SharedSessionContractImplementor session) throws HibernateException
Description copied from interface:UniqueKeyLoadableLoad an instance of the persistent class, by a unique key other than the primary key.- Specified by:
loadByUniqueKeyin interfaceUniqueKeyLoadable- Throws:
HibernateException
-
loadByUniqueKey
public Object loadByUniqueKey(String propertyName, Object uniqueKey, Boolean readOnly, SharedSessionContractImplementor session) throws HibernateException
- Throws:
HibernateException
-
getUniqueKeyLoader
protected SingleUniqueKeyEntityLoader<?> getUniqueKeyLoader(String attributeName)
-
getPropertyIndex
public int getPropertyIndex(String propertyName)
Description copied from interface:UniqueKeyLoadableGet the property number of the unique key property- Specified by:
getPropertyIndexin interfaceUniqueKeyLoadable
-
initPropertyPaths
protected void initPropertyPaths(Metadata mapping) throws MappingException
- Throws:
MappingException
-
check
protected boolean check(int rows, Object id, int tableNumber, Expectation expectation, PreparedStatement statement, String statementSQL) throws HibernateException- Throws:
HibernateException
-
generateUpdateString
public String generateUpdateString(boolean[] includeProperty, int j, boolean useRowId)
-
generateUpdateString
public String generateUpdateString(boolean[] includeProperty, int j, Object[] oldFields, boolean useRowId)
Generate the SQL that updates a row by id (and version)
-
checkVersion
public final boolean checkVersion(boolean[] includeProperty)
-
generateInsertString
public String generateInsertString(boolean[] includeProperty)
-
generateInsertString
public String generateInsertString(boolean[] includeProperty, int j)
Generate the SQL that inserts a row
-
generateIdentityInsertString
public String generateIdentityInsertString(boolean[] includeProperty)
Used to generate an insert statement against the root table in the case of identifier generation strategies where the insert statement executions actually generates the identifier value.- Parameters:
includeProperty- indices of the properties to include in the insert statement.- Returns:
- The insert SQL statement string
-
generateDeleteString
public String generateDeleteString(int j)
Generate the SQL that deletes a row by id (and version)
-
dehydrate
public int dehydrate(Object id, Object[] fields, boolean[] includeProperty, boolean[][] includeColumns, int j, PreparedStatement st, SharedSessionContractImplementor session, boolean isUpdate) throws HibernateException, SQLException
- Throws:
HibernateExceptionSQLException
-
dehydrate
public int dehydrate(Object id, Object[] fields, Object rowId, boolean[] includeProperty, boolean[][] includeColumns, int j, PreparedStatement ps, SharedSessionContractImplementor session, int index, boolean isUpdate) throws SQLException, HibernateException
Marshall the fields of a persistent instance to a prepared statement- Throws:
SQLExceptionHibernateException
-
useGetGeneratedKeys
public boolean useGetGeneratedKeys()
-
insert
public Object insert(Object[] fields, boolean[] notNull, String sql, Object object, SharedSessionContractImplementor session) throws HibernateException
Perform an SQL INSERT, and then retrieve a generated identifier. This form is used for PostInsertIdentifierGenerator-style ids (IDENTITY, select, etc).- Throws:
HibernateException
-
getIdentitySelectString
public String getIdentitySelectString()
Description copied from interface:PostInsertIdentityPersisterGet the database-specific SQL command to retrieve the last generated IDENTITY value.- Specified by:
getIdentitySelectStringin interfacePostInsertIdentityPersister- Returns:
- The SQL command string
-
getSelectByUniqueKeyString
public String getSelectByUniqueKeyString(String propertyName)
Description copied from interface:PostInsertIdentityPersisterGet a SQL select string that performs a select based on a unique key determined by the given property name).- Specified by:
getSelectByUniqueKeyStringin interfacePostInsertIdentityPersister- Parameters:
propertyName- The name of the property which maps to the column(s) to use in the select statement restriction.- Returns:
- The SQL select string
-
insert
public void insert(Object id, Object[] fields, boolean[] notNull, int j, String sql, Object object, SharedSessionContractImplementor session) throws HibernateException
Perform an SQL INSERT. This for is used for all non-root tables as well as the root table in cases where the identifier value is known before the insert occurs.- Throws:
HibernateException
-
updateOrInsert
public void updateOrInsert(Object id, Object[] fields, Object[] oldFields, Object rowId, boolean[] includeProperty, int j, Object oldVersion, Object object, String sql, SharedSessionContractImplementor session) throws HibernateException
Perform an SQL UPDATE or SQL INSERT- Throws:
HibernateException
-
update
public boolean update(Object id, Object[] fields, Object[] oldFields, Object rowId, boolean[] includeProperty, int j, Object oldVersion, Object object, String sql, SharedSessionContractImplementor session) throws HibernateException
- Throws:
HibernateException
-
delete
public void delete(Object id, Object version, int j, Object object, String sql, SharedSessionContractImplementor session, Object[] loadedState) throws HibernateException
Perform an SQL DELETE- Throws:
HibernateException
-
getUpdateStrings
protected String[] getUpdateStrings(boolean byRowId, boolean lazy)
-
update
public void update(Object id, Object[] fields, int[] dirtyFields, boolean hasDirtyCollection, Object[] oldFields, Object oldVersion, Object object, Object rowId, SharedSessionContractImplementor session) throws HibernateException
Update an object- Specified by:
updatein interfaceEntityPersister- Throws:
HibernateException
-
insert
public Object insert(Object[] fields, Object object, SharedSessionContractImplementor session) throws HibernateException
Description copied from interface:EntityPersisterPersist an instance, using a natively generated identifier (optional operation)- Specified by:
insertin interfaceEntityPersister- Throws:
HibernateException
-
insert
public void insert(Object id, Object[] fields, Object object, SharedSessionContractImplementor session)
Description copied from interface:EntityPersisterPersist an instance- Specified by:
insertin interfaceEntityPersister
-
preInsertInMemoryValueGeneration
protected void preInsertInMemoryValueGeneration(Object[] fields, Object object, SharedSessionContractImplementor session)
-
delete
public void delete(Object id, Object version, Object object, SharedSessionContractImplementor session) throws HibernateException
Delete an object- Specified by:
deletein interfaceEntityPersister- Throws:
HibernateException
-
isAllOrDirtyOptLocking
protected boolean isAllOrDirtyOptLocking()
-
logStaticSQL
protected void logStaticSQL()
-
applyDiscriminator
public void applyDiscriminator(Consumer<Predicate> predicateConsumer, String alias, TableGroup tableGroup, SqlAstCreationState creationState)
- Specified by:
applyDiscriminatorin interfaceDiscriminatable- Specified by:
applyDiscriminatorin interfaceEntityMappingType
-
applyFilterRestrictions
public void applyFilterRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, SqlAstCreationState creationState)
Description copied from interface:FilterRestrictableApplies just theFiltervalues enabled for the associated entity- Specified by:
applyFilterRestrictionsin interfaceEntityMappingType- Specified by:
applyFilterRestrictionsin interfaceFilterRestrictable
-
applyBaseRestrictions
public void applyBaseRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, Set<String> treatAsDeclarations, SqlAstCreationState creationState)
Description copied from interface:RestrictableApplies the base set of restrictions. The impact varies based on Restrictable type - some apply restrictions for filter, where and/or discriminator- Specified by:
applyBaseRestrictionsin interfaceEntityMappingType- Specified by:
applyBaseRestrictionsin interfaceRestrictable
-
applyWhereRestrictions
public void applyWhereRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, SqlAstCreationState creationState)
Description copied from interface:WhereRestrictableApply theWhererestrictions- Specified by:
applyWhereRestrictionsin interfaceEntityMappingType- Specified by:
applyWhereRestrictionsin interfaceWhereRestrictable
-
generateFilterConditionAlias
public String generateFilterConditionAlias(String rootAlias)
Description copied from interface:QueryableThe 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 inheritance mapping strategy.- Specified by:
generateFilterConditionAliasin interfaceQueryable- Parameters:
rootAlias- The root alias- Returns:
- The alias used for "filter conditions" within the where clause.
-
shouldInnerJoinSubclassTable
protected boolean shouldInnerJoinSubclassTable(int subclassTableNumber, Set<String> treatAsDeclarations)
-
isSubclassTableIndicatedByTreatAsDeclarations
protected boolean isSubclassTableIndicatedByTreatAsDeclarations(int subclassTableNumber, Set<String> treatAsDeclarations)
-
postConstruct
protected void postConstruct(Metadata mapping) throws MappingException
Post-construct is a callback for AbstractEntityPersister subclasses to call after they are all done with their constructor processing. It allows AbstractEntityPersister to extend its construction after all subclass-specific details have been handled.- Parameters:
mapping- The mapping- Throws:
MappingException- Indicates a problem accessing the Mapping
-
postInstantiate
public final void postInstantiate() throws MappingExceptionDescription copied from interface:EntityPersisterFinish the initialization of this object.InFlightEntityMappingType.prepareMappingModel(org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess)must be called for all entity persisters before calling this method. Called only once perSessionFactorylifecycle, after all entity persisters have been instantiated.- Specified by:
postInstantiatein interfaceEntityPersister- Throws:
MappingException- Indicates an issue in the metadata.
-
doPostInstantiate
protected void doPostInstantiate()
-
load
public Object load(Object id, Object optionalObject, LockMode lockMode, SharedSessionContractImplementor session)
Load an instance using either theforUpdateLoaderor the outer joiningloader, depending upon the value of thelockparameter- Specified by:
loadin interfaceEntityPersister
-
load
public Object load(Object id, Object optionalObject, LockOptions lockOptions, SharedSessionContractImplementor session) throws HibernateException
Load an instance using either theforUpdateLoaderor the outer joiningloader, depending upon the value of thelockparameter- Specified by:
loadin interfaceEntityPersister- Throws:
HibernateException
-
load
public Object load(Object id, Object optionalObject, LockOptions lockOptions, SharedSessionContractImplementor session, Boolean readOnly) throws HibernateException
- Specified by:
loadin interfaceEntityPersister- Throws:
HibernateException
-
getSingleIdEntityLoader
public SingleIdEntityLoader<?> getSingleIdEntityLoader()
-
initializeEnhancedEntityUsedAsProxy
public Object initializeEnhancedEntityUsedAsProxy(Object entity, String nameOfAttributeBeingAccessed, SharedSessionContractImplementor session)
Description copied from interface:EntityPersisterCalled fromEnhancementAsProxyLazinessInterceptorto trigger load of the entity's non-lazy state as well as the named attribute we are accessing if it is still uninitialized after fetching non-lazy state- Specified by:
initializeEnhancedEntityUsedAsProxyin interfaceEntityPersister
-
multiLoad
public List<?> multiLoad(Object[] ids, SharedSessionContractImplementor session, MultiIdLoadOptions loadOptions)
Description copied from interface:EntityPersisterPerforms a load of multiple entities (of this type) by identifier simultaneously.- Specified by:
multiLoadin interfaceEntityPersister- Parameters:
ids- The identifiers to loadsession- The originating SessionloadOptions- The options for loading- Returns:
- The loaded, matching entities
-
registerAffectingFetchProfile
public void registerAffectingFetchProfile(String fetchProfileName)
Description copied from interface:LoadableRegister the name of a fetch profile determined to have an affect on the underlying loadable in regards to the fact that the underlying load SQL needs to be adjust when the given fetch profile is enabled.- Specified by:
registerAffectingFetchProfilein interfaceLoadable- Parameters:
fetchProfileName- The name of the profile affecting this.
-
isAffectedByEntityGraph
public boolean isAffectedByEntityGraph(LoadQueryInfluencers loadQueryInfluencers)
- Specified by:
isAffectedByEntityGraphin interfaceEntityMappingType- Specified by:
isAffectedByEntityGraphin interfaceLoadable
-
isAffectedByEnabledFetchProfiles
public boolean isAffectedByEnabledFetchProfiles(LoadQueryInfluencers loadQueryInfluencers)
- Specified by:
isAffectedByEnabledFetchProfilesin interfaceEntityMappingType- Specified by:
isAffectedByEnabledFetchProfilesin interfaceLoadable
-
isAffectedByEnabledFilters
public boolean isAffectedByEnabledFilters(LoadQueryInfluencers loadQueryInfluencers)
- Specified by:
isAffectedByEnabledFiltersin interfaceEntityMappingType- Specified by:
isAffectedByEnabledFiltersin interfaceLoadable
-
isAllNull
public final boolean isAllNull(Object[] array, int tableNumber)
-
isSubclassPropertyNullable
public boolean isSubclassPropertyNullable(int i)
Description copied from interface:OuterJoinLoadableIs the numbered property of the class of subclass nullable?- Specified by:
isSubclassPropertyNullablein interfaceOuterJoinLoadable
-
getPropertiesToUpdate
public final boolean[] getPropertiesToUpdate(int[] dirtyProperties, boolean hasDirtyCollection)Transform the array of property indexes to an array of booleans, true when the property is dirty
-
getPropertiesToInsert
public boolean[] getPropertiesToInsert(Object[] fields)
Transform the array of property indexes to an array of booleans, true when the property is insertable and non-null
-
findDirty
public int[] findDirty(Object[] currentState, Object[] previousState, Object entity, SharedSessionContractImplementor session) throws HibernateException
Locate the property-indices of all properties considered to be dirty.- Specified by:
findDirtyin interfaceEntityPersister- Parameters:
currentState- The current state of the entity (the state to be checked).previousState- The previous state of the entity (the state to be checked against).entity- The entity for which we are checking state dirtiness.session- The session in which the check is occurring.- Returns:
nullor the indices of the dirty properties- Throws:
HibernateException
-
findModified
public int[] findModified(Object[] old, Object[] current, Object entity, SharedSessionContractImplementor session) throws HibernateException
Locate the property-indices of all properties considered to be dirty.- Specified by:
findModifiedin interfaceEntityPersister- Parameters:
old- The old state of the entity.current- The current state of the entity.entity- The entity for which we are checking state modification.session- The session in which the check is occurring.- Returns:
nullor the indices of the modified properties- Throws:
HibernateException
-
getPropertyUpdateability
public boolean[] getPropertyUpdateability(Object entity)
Which properties appear in the SQL update? (Initialized, updateable ones!)
-
getFactory
public SessionFactoryImplementor getFactory()
Description copied from interface:EntityPersisterReturn the SessionFactory to which this persister "belongs".- Specified by:
getFactoryin interfaceEntityPersister- Returns:
- The owning SessionFactory.
-
getEntityMetamodel
public EntityMetamodel getEntityMetamodel()
Description copied from interface:EntityPersisterRetrieve the underlying entity metamodel instance...- Specified by:
getEntityMetamodelin interfaceEntityPersister- Returns:
- The metamodel
-
canReadFromCache
public boolean canReadFromCache()
- Specified by:
canReadFromCachein interfaceEntityPersister
-
canWriteToCache
public boolean canWriteToCache()
- Specified by:
canWriteToCachein interfaceEntityPersister
-
hasCache
public boolean hasCache()
Description copied from interface:EntityPersisterDoes this class have a cache.- Specified by:
hasCachein interfaceEntityPersister
-
getCacheAccessStrategy
public EntityDataAccess getCacheAccessStrategy()
Description copied from interface:EntityPersisterGet the cache (optional operation)- Specified by:
getCacheAccessStrategyin interfaceEntityPersister
-
getCacheEntryStructure
public CacheEntryStructure getCacheEntryStructure()
Description copied from interface:EntityPersisterGet the cache structure- Specified by:
getCacheEntryStructurein interfaceEntityPersister
-
buildCacheEntry
public CacheEntry buildCacheEntry(Object entity, Object[] state, Object version, SharedSessionContractImplementor session)
- Specified by:
buildCacheEntryin interfaceEntityPersister
-
hasNaturalIdCache
public boolean hasNaturalIdCache()
Description copied from interface:EntityPersisterDoes this class have a natural id cache- Specified by:
hasNaturalIdCachein interfaceEntityPersister
-
getNaturalIdCacheAccessStrategy
public NaturalIdDataAccess getNaturalIdCacheAccessStrategy()
Description copied from interface:EntityPersisterGet the NaturalId cache (optional operation)- Specified by:
getNaturalIdCacheAccessStrategyin interfaceEntityPersister
-
getVersionComparator
public Comparator<?> getVersionComparator()
-
getEntityName
public final String getEntityName()
Description copied from interface:EntityPersisterThe entity name which this persister maps.- Specified by:
getEntityNamein interfaceClassMetadata- Specified by:
getEntityNamein interfaceEntityMappingType- Specified by:
getEntityNamein interfaceEntityPersister- Returns:
- The name of the entity which this persister maps.
-
getEntityType
public EntityType getEntityType()
- Specified by:
getEntityTypein interfaceOuterJoinLoadable
-
isPolymorphic
public boolean isPolymorphic()
-
isInherited
public boolean isInherited()
Description copied from interface:EntityPersisterDetermine whether the entity is inherited one or more other entities. In other words, is this entity a subclass of other entities.- Specified by:
isInheritedin interfaceClassMetadata- Specified by:
isInheritedin interfaceEntityPersister- Returns:
- True if other entities extend this entity; false otherwise.
-
hasCascades
public boolean hasCascades()
Description copied from interface:EntityPersisterDetermine whether this entity has any non-none cascading.- Specified by:
hasCascadesin interfaceEntityPersister- Returns:
- True if the entity has any properties with a cascade other than NONE; false otherwise (aka, no cascading).
-
hasIdentifierProperty
public boolean hasIdentifierProperty()
Description copied from interface:EntityPersisterDetermine whether the entity has a particular property holding the identifier value.- Specified by:
hasIdentifierPropertyin interfaceClassMetadata- Specified by:
hasIdentifierPropertyin interfaceEntityPersister- Returns:
- True if the entity has a specific property holding identifier value.
-
getVersionType
public BasicType<?> getVersionType()
Description copied from interface:EntityPersisterIfEntityPersister.isVersioned(), then what is the type of the property holding the locking value.- Specified by:
getVersionTypein interfaceEntityPersister- Returns:
- The type of the version property; or null, if not versioned.
-
getVersionProperty
public int getVersionProperty()
Description copied from interface:EntityPersisterIfEntityPersister.isVersioned(), then what is the index of the property holding the locking value.- Specified by:
getVersionPropertyin interfaceClassMetadata- Specified by:
getVersionPropertyin interfaceEntityPersister- Returns:
- The type of the version property; or -66, if not versioned.
-
isVersioned
public boolean isVersioned()
Description copied from interface:EntityPersisterDetermine whether optimistic locking by column is enabled for this entity.- Specified by:
isVersionedin interfaceClassMetadata- Specified by:
isVersionedin interfaceEntityPersister- Returns:
- True if optimistic locking by column (i.e.,
or ) is enabled; false otherwise.
-
isIdentifierAssignedByInsert
public boolean isIdentifierAssignedByInsert()
Description copied from interface:EntityPersisterAre identifiers of this entity assigned known before the insert execution? Or, are they generated (in the database) by the insert execution.- Specified by:
isIdentifierAssignedByInsertin interfaceEntityPersister- Returns:
- True if identifiers for this entity are generated by the insert execution.
-
hasLazyProperties
public boolean hasLazyProperties()
Description copied from interface:EntityPersisterDetermine whether this entity defines any lazy properties (ala bytecode instrumentation).- Specified by:
hasLazyPropertiesin interfaceEntityPersister- Returns:
- True if the entity has properties mapped as lazy; false otherwise.
-
afterReassociate
public void afterReassociate(Object entity, SharedSessionContractImplementor session)
Description copied from interface:EntityPersisterCalled just after the entity has been reassociated with the session- Specified by:
afterReassociatein interfaceEntityPersister
-
isTransient
public Boolean isTransient(Object entity, SharedSessionContractImplementor session) throws HibernateException
Description copied from interface:EntityPersisterIs this a new transient instance?- Specified by:
isTransientin interfaceEntityPersister- Throws:
HibernateException
-
hasCollections
public boolean hasCollections()
Description copied from interface:EntityPersisterDetermine whether this entity contains references to persistent collections.- Specified by:
hasCollectionsin interfaceEntityPersister- Returns:
- True if the entity does contain persistent collections; false otherwise.
-
hasMutableProperties
public boolean hasMutableProperties()
Description copied from interface:EntityPersisterDetermine whether any properties of this entity are considered mutable.- Specified by:
hasMutablePropertiesin interfaceEntityPersister- Returns:
- True if any properties of the entity are mutable; false otherwise (meaning none are).
-
isMutable
public boolean isMutable()
Description copied from interface:EntityPersisterDetermine whether instances of this entity are considered mutable.- Specified by:
isMutablein interfaceClassMetadata- Specified by:
isMutablein interfaceEntityPersister- Returns:
- True if the entity is considered mutable; false otherwise.
-
isModifiableEntity
public final boolean isModifiableEntity(EntityEntry entry)
-
isAbstract
public boolean isAbstract()
Description copied from interface:QueryableIs this an abstract class?- Specified by:
isAbstractin interfaceEntityMappingType- Specified by:
isAbstractin interfaceLoadable- Specified by:
isAbstractin interfaceQueryable
-
hasSubclasses
public boolean hasSubclasses()
Description copied from interface:LoadableDoes this persistent class have subclasses?- Specified by:
hasSubclassesin interfaceClassMetadata- Specified by:
hasSubclassesin interfaceEntityMappingType- Specified by:
hasSubclassesin interfaceLoadable
-
hasProxy
public boolean hasProxy()
Description copied from interface:EntityPersisterDetermine whether this entity supports dynamic proxies.- Specified by:
hasProxyin interfaceClassMetadata- Specified by:
hasProxyin interfaceEntityPersister- Returns:
- True if the entity has dynamic proxy support; false otherwise.
-
getIdentifierGenerator
public IdentifierGenerator getIdentifierGenerator() throws HibernateException
Description copied from interface:EntityPersisterDetermine which identifier generation strategy is used for this entity.- Specified by:
getIdentifierGeneratorin interfaceEntityPersister- Returns:
- The identifier generation strategy.
- Throws:
HibernateException
-
getRootEntityName
public String getRootEntityName()
Description copied from interface:EntityPersisterReturns an object that identifies the space in which identifiers of this entity hierarchy are unique. Might be a table name, a JNDI URL, etc.- Specified by:
getRootEntityNamein interfaceEntityPersister- Returns:
- The root entity name.
-
getClassMetadata
@Deprecated public ClassMetadata getClassMetadata()
Deprecated.Description copied from interface:EntityPersisterGet the user-visible metadata for the class (optional operation)- Specified by:
getClassMetadatain interfaceEntityPersister
-
getMappedSuperclass
public String getMappedSuperclass()
Description copied from interface:QueryableGet the class that this class is mapped as a subclass of - not necessarily the direct superclass- Specified by:
getMappedSuperclassin interfaceQueryable
-
isExplicitPolymorphism
public boolean isExplicitPolymorphism()
Description copied from interface:QueryableIs this class explicit polymorphism only?- Specified by:
isExplicitPolymorphismin interfaceQueryable
-
canExtractIdOutOfEntity
public boolean canExtractIdOutOfEntity()
Description copied from interface:EntityPersisterDetermine whether detached instances of this entity carry their own identifier value. The other option is the deprecated feature where users could supply the id during session calls.- Specified by:
canExtractIdOutOfEntityin interfaceEntityPersister- Returns:
- True if either (1)
EntityPersister.hasIdentifierProperty()or (2) the identifier is an embedded composite identifier; false otherwise.
-
getKeyColumnNames
public String[] getKeyColumnNames()
Description copied from interface:JoinableThe columns to join on- Specified by:
getKeyColumnNamesin interfaceJoinable
-
getName
public String getName()
Description copied from interface:JoinableAn identifying name; a class name or collection role name.
-
isCollection
public boolean isCollection()
Description copied from interface:JoinableIs this instance actually a CollectionPersister?- Specified by:
isCollectionin interfaceJoinable
-
consumesEntityAlias
public boolean consumesEntityAlias()
Description copied from interface:JoinableVery, very, very ugly...- Specified by:
consumesEntityAliasin interfaceJoinable- Returns:
- Does this persister "consume" entity column aliases in the result set?
-
consumesCollectionAlias
public boolean consumesCollectionAlias()
Description copied from interface:JoinableVery, very, very ugly...- Specified by:
consumesCollectionAliasin interfaceJoinable- Returns:
- Does this persister "consume" collection column aliases in the result set?
-
getPropertyType
public Type getPropertyType(String propertyName) throws MappingException
Get the type of a particular property by name. Warning: When there are duplicated property names in the subclasses then this method may return the wrong results. To ensure correct results, this method should only be used when this is the concrete EntityPersister (since the concrete EntityPersister cannot have duplicated property names).- Specified by:
getPropertyTypein interfaceClassMetadata- Specified by:
getPropertyTypein interfaceEntityPersister- Parameters:
propertyName- The name of the property for which to retrieve the type.- Returns:
- The type.
- Throws:
MappingException- Typically indicates an unknown property name.
-
getType
public Type getType()
Description copied from interface:SQLLoadableGet the type- Specified by:
getTypein interfaceSQLLoadable
-
isSelectBeforeUpdateRequired
public boolean isSelectBeforeUpdateRequired()
Description copied from interface:EntityPersisterIs select snapshot before update enabled?- Specified by:
isSelectBeforeUpdateRequiredin interfaceEntityPersister
-
optimisticLockStyle
protected final OptimisticLockStyle optimisticLockStyle()
-
createProxy
public Object createProxy(Object id, SharedSessionContractImplementor session) throws HibernateException
Description copied from interface:EntityPersisterCreate a new proxy instance- Specified by:
createProxyin interfaceEntityPersister- Throws:
HibernateException
-
isInstrumented
public boolean isInstrumented()
Description copied from interface:EntityPersisterHas the class actually been bytecode instrumented?- Specified by:
isInstrumentedin interfaceEntityPersister
-
hasInsertGeneratedProperties
public boolean hasInsertGeneratedProperties()
Description copied from interface:EntityPersisterDoes this entity define any properties as being database generated on insert?- Specified by:
hasInsertGeneratedPropertiesin interfaceEntityPersister- Returns:
- True if this entity contains at least one property defined as generated (including version property, but not identifier).
-
hasUpdateGeneratedProperties
public boolean hasUpdateGeneratedProperties()
Description copied from interface:EntityPersisterDoes this entity define any properties as being database generated on update?- Specified by:
hasUpdateGeneratedPropertiesin interfaceEntityPersister- Returns:
- True if this entity contains at least one property defined as generated (including version property, but not identifier).
-
isVersionPropertyGenerated
public boolean isVersionPropertyGenerated()
Description copied from interface:EntityPersisterDoes this entity contain a version property that is defined to be database generated?- Specified by:
isVersionPropertyGeneratedin interfaceEntityPersister- Returns:
- true if this entity contains a version property and that property has been marked as generated.
-
isVersionPropertyInsertable
public boolean isVersionPropertyInsertable()
Description copied from interface:QueryableIs the version property included in insert statements?- Specified by:
isVersionPropertyInsertablein interfaceQueryable
-
afterInitialize
public void afterInitialize(Object entity, SharedSessionContractImplementor session)
Description copied from interface:EntityPersisterCalled just after the entities properties have been initialized- Specified by:
afterInitializein interfaceEntityPersister
-
getPropertyNames
public String[] getPropertyNames()
Description copied from interface:EntityPersisterGet the names of the class properties - doesn't have to be the names of the actual Java properties (used for XML generation only)- Specified by:
getPropertyNamesin interfaceClassMetadata- Specified by:
getPropertyNamesin interfaceEntityPersister
-
getPropertyTypes
public Type[] getPropertyTypes()
Description copied from interface:EntityPersisterGet the Hibernate types of the class properties- Specified by:
getPropertyTypesin interfaceClassMetadata- Specified by:
getPropertyTypesin interfaceEntityPersister
-
getPropertyLaziness
public boolean[] getPropertyLaziness()
Description copied from interface:ClassMetadataGet the "laziness" of the properties of this class- Specified by:
getPropertyLazinessin interfaceClassMetadata- Specified by:
getPropertyLazinessin interfaceEntityPersister
-
getPropertyUpdateability
public boolean[] getPropertyUpdateability()
Description copied from interface:EntityPersisterGet the "updateability" of the properties of this class (does the property appear in an SQL UPDATE)- Specified by:
getPropertyUpdateabilityin interfaceEntityPersister
-
getPropertyCheckability
public boolean[] getPropertyCheckability()
Description copied from interface:EntityPersisterGet the "checkability" of the properties of this class (is the property dirty checked, does the cache need to be updated)- Specified by:
getPropertyCheckabilityin interfaceEntityPersister
-
getNonLazyPropertyUpdateability
public boolean[] getNonLazyPropertyUpdateability()
-
getPropertyInsertability
public boolean[] getPropertyInsertability()
Description copied from interface:EntityPersisterGet the "insertability" of the properties of this class (does the property appear in an SQL INSERT)- Specified by:
getPropertyInsertabilityin interfaceEntityPersister
-
getPropertyNullability
public boolean[] getPropertyNullability()
Description copied from interface:EntityPersisterGet the nullability of the properties of this class- Specified by:
getPropertyNullabilityin interfaceClassMetadata- Specified by:
getPropertyNullabilityin interfaceEntityPersister
-
getPropertyVersionability
public boolean[] getPropertyVersionability()
Description copied from interface:EntityPersisterGet the "versionability" of the properties of this class (is the property optimistic-locked)- Specified by:
getPropertyVersionabilityin interfaceEntityPersister
-
getPropertyCascadeStyles
public CascadeStyle[] getPropertyCascadeStyles()
Description copied from interface:EntityPersisterGet the cascade styles of the properties (optional operation)- Specified by:
getPropertyCascadeStylesin interfaceEntityPersister
-
getMappedClass
public final Class<?> getMappedClass()
Description copied from interface:EntityPersisterThe persistent class, or null- Specified by:
getMappedClassin interfaceClassMetadata- Specified by:
getMappedClassin interfaceEntityPersister
-
implementsLifecycle
public boolean implementsLifecycle()
Description copied from interface:EntityPersisterDoes the class implement theLifecycleinterface.- Specified by:
implementsLifecyclein interfaceClassMetadata- Specified by:
implementsLifecyclein interfaceEntityPersister
-
getConcreteProxyClass
public Class<?> getConcreteProxyClass()
Description copied from interface:EntityPersisterGet the proxy interface that instances of this concrete class will be cast to (optional operation).- Specified by:
getConcreteProxyClassin interfaceEntityPersister
-
setPropertyValues
public void setPropertyValues(Object object, Object[] values)
Description copied from interface:EntityPersisterSet the given values to the mapped properties of the given object- Specified by:
setPropertyValuesin interfaceClassMetadata- Specified by:
setPropertyValuesin interfaceEntityPersister
-
setPropertyValue
public void setPropertyValue(Object object, int i, Object value)
Description copied from interface:EntityPersisterSet the value of a particular property- Specified by:
setPropertyValuein interfaceEntityPersister
-
getPropertyValues
public Object[] getPropertyValues(Object object)
Description copied from interface:ClassMetadataExtract the property values from the given entity.- Specified by:
getPropertyValuesin interfaceClassMetadata- Specified by:
getPropertyValuesin interfaceEntityPersister- Parameters:
object- The entity from which to extract the property values.- Returns:
- The property values.
-
getPropertyValue
public Object getPropertyValue(Object object, int i)
- Specified by:
getPropertyValuein interfaceEntityPersister
-
getPropertyValue
public Object getPropertyValue(Object object, String propertyName)
Description copied from interface:EntityPersisterGet the value of a particular property- Specified by:
getPropertyValuein interfaceClassMetadata- Specified by:
getPropertyValuein interfaceEntityPersister
-
getIdentifier
public Object getIdentifier(Object entity, SharedSessionContractImplementor session)
Description copied from interface:EntityPersisterGet the identifier of an instance (throw an exception if no identifier property)- Specified by:
getIdentifierin interfaceClassMetadata- Specified by:
getIdentifierin interfaceEntityPersister- Parameters:
entity- The entity for which to get the identifiersession- The session from which the request originated- Returns:
- The identifier
-
setIdentifier
public void setIdentifier(Object entity, Object id, SharedSessionContractImplementor session)
Description copied from interface:EntityPersisterInject the identifier value into the given entity.- Specified by:
setIdentifierin interfaceClassMetadata- Specified by:
setIdentifierin interfaceEntityPersister- Parameters:
entity- The entity to inject with the identifier value.id- The value to be injected as the identifier.session- The session from which is requests originates
-
getVersion
public Object getVersion(Object object)
Description copied from interface:EntityPersisterGet the version number (or timestamp) from the object's version property (or return null if not versioned)- Specified by:
getVersionin interfaceClassMetadata- Specified by:
getVersionin interfaceEntityPersister
-
instantiate
public Object instantiate(Object id, SharedSessionContractImplementor session)
Description copied from interface:EntityPersisterCreate a class instance initialized with the given identifier- Specified by:
instantiatein interfaceClassMetadata- Specified by:
instantiatein interfaceEntityPersister- Parameters:
id- The identifier value to use (may be null to represent no value)session- The session from which the request originated.- Returns:
- The instantiated entity.
-
linkToSession
protected void linkToSession(Object entity, SharedSessionContractImplementor session)
-
isInstance
public boolean isInstance(Object object)
Description copied from interface:EntityPersisterIs the given object an instance of this entity?- Specified by:
isInstancein interfaceEntityPersister
-
hasUninitializedLazyProperties
public boolean hasUninitializedLazyProperties(Object object)
Description copied from interface:EntityPersisterDoes the given instance have any uninitialized lazy properties?- Specified by:
hasUninitializedLazyPropertiesin interfaceEntityPersister
-
resetIdentifier
public void resetIdentifier(Object entity, Object currentId, Object currentVersion, SharedSessionContractImplementor session)
Description copied from interface:EntityPersisterSet the identifier and version of the given instance back to its "unsaved" value.- Specified by:
resetIdentifierin interfaceEntityPersister
-
getSubclassEntityPersister
public EntityPersister getSubclassEntityPersister(Object instance, SessionFactoryImplementor factory)
Description copied from interface:EntityPersisterA request has already identified the entity-name of this persister as the mapping for the given instance. However, we still need to account for possible subclassing and potentially re-route to the more appropriate persister. For example, a request namesAnimalas the entity-name which gets resolved to this persister. But the actual instance is really an instance ofCatwhich is a subclass ofAnimal. So, here theAnimalpersister is being asked to return the persister specific toCat. It is also possible that the instance is actually anAnimalinstance in the above example in which case we would returnthisfrom this method.- Specified by:
getSubclassEntityPersisterin interfaceEntityPersister- Parameters:
instance- The entity instancefactory- Reference to the SessionFactory- Returns:
- The appropriate persister
-
isMultiTable
@Deprecated(since="6.0") public boolean isMultiTable()
Deprecated.Description copied from interface:QueryableIs the inheritance hierarchy described by this persister contained across multiple tables?- Specified by:
isMultiTablein interfaceQueryable- Returns:
- True if the inheritance hierarchy is spread across multiple tables; false otherwise.
-
hasMultipleTables
protected boolean hasMultipleTables()
-
getPropertySpan
public int getPropertySpan()
-
getPropertyValuesToInsert
public Object[] getPropertyValuesToInsert(Object entity, Map<Object,Object> mergeMap, SharedSessionContractImplementor session) throws HibernateException
Description copied from interface:EntityPersisterReturn the values of the insertable properties of the object (including backrefs)- Specified by:
getPropertyValuesToInsertin interfaceClassMetadata- Specified by:
getPropertyValuesToInsertin interfaceEntityPersister- Throws:
HibernateException
-
shouldGetAllProperties
protected boolean shouldGetAllProperties(Object entity)
-
processInsertGeneratedProperties
public void processInsertGeneratedProperties(Object id, Object entity, Object[] state, SharedSessionContractImplementor session)
Description copied from interface:EntityPersisterPerform a select to retrieve the values of any generated properties back from the database, injecting these generated values into the given entity as well as writing this state to thePersistenceContext. Note, that because we update the PersistenceContext here, callers need to take care that they have already written the initial snapshot to the PersistenceContext before calling this method.- Specified by:
processInsertGeneratedPropertiesin interfaceEntityPersister
-
processUpdateGeneratedProperties
public void processUpdateGeneratedProperties(Object id, Object entity, Object[] state, SharedSessionContractImplementor session)
Description copied from interface:EntityPersisterPerform a select to retrieve the values of any generated properties back from the database, injecting these generated values into the given entity as well as writing this state to thePersistenceContext. Note, that because we update the PersistenceContext here, callers need to take care that they have already written the initial snapshot to the PersistenceContext before calling this method.- Specified by:
processUpdateGeneratedPropertiesin interfaceEntityPersister
-
getIdentifierPropertyName
public String getIdentifierPropertyName()
Description copied from interface:EntityPersisterGet the name of the identifier property (or return null) - need not return the name of an actual Java property- Specified by:
getIdentifierPropertyNamein interfaceClassMetadata- Specified by:
getIdentifierPropertyNamein interfaceEntityPersister
-
getIdentifierType
public Type getIdentifierType()
Description copied from interface:EntityPersisterGet the identifier type- Specified by:
getIdentifierTypein interfaceClassMetadata- Specified by:
getIdentifierTypein interfaceEntityPersister
-
hasSubselectLoadableCollections
public boolean hasSubselectLoadableCollections()
Description copied from interface:EntityPersisterDetermine whether this entity contains references to persistent collections which are fetchable by subselect?- Specified by:
hasSubselectLoadableCollectionsin interfaceEntityPersister- Returns:
- True if the entity contains collections fetchable by subselect; false otherwise.
-
getNaturalIdentifierProperties
public int[] getNaturalIdentifierProperties()
Description copied from interface:EntityPersisterIf the entity defines a natural id (EntityPersister.hasNaturalIdentifier()), which properties make up the natural id.- Specified by:
getNaturalIdentifierPropertiesin interfaceClassMetadata- Specified by:
getNaturalIdentifierPropertiesin interfaceEntityPersister- Returns:
- The indices of the properties making of the natural id; or null, if no natural id is defined.
-
getNaturalIdentifierSnapshot
public Object getNaturalIdentifierSnapshot(Object id, SharedSessionContractImplementor session)
Description copied from interface:EntityPersisterRetrieve the current state of the natural-id properties from the database.- Specified by:
getNaturalIdentifierSnapshotin interfaceEntityPersister- Parameters:
id- The identifier of the entity for which to retrieve the natural-id values.session- The session from which the request originated.- Returns:
- The natural-id snapshot.
-
getNaturalIdLoader
public NaturalIdLoader<?> getNaturalIdLoader()
Description copied from interface:EntityMappingTypeAccess to performing natural-id database selection. This is per-entity in the hierarchy- Specified by:
getNaturalIdLoaderin interfaceEntityMappingType- Specified by:
getNaturalIdLoaderin interfaceEntityPersister
-
getMultiNaturalIdLoader
public MultiNaturalIdLoader<?> getMultiNaturalIdLoader()
Description copied from interface:EntityMappingTypeAccess to performing multi-value natural-id database selection. This is per-entity in the hierarchy- Specified by:
getMultiNaturalIdLoaderin interfaceEntityMappingType- Specified by:
getMultiNaturalIdLoaderin interfaceEntityPersister
-
loadEntityIdByNaturalId
public Object loadEntityIdByNaturalId(Object[] naturalIdValues, LockOptions lockOptions, SharedSessionContractImplementor session)
Description copied from interface:EntityPersisterLoad the id for the entity based on the natural id.- Specified by:
loadEntityIdByNaturalIdin interfaceEntityPersister
-
hasNaturalIdentifier
public boolean hasNaturalIdentifier()
Description copied from interface:EntityPersisterDetermine whether this entity defines a natural identifier.- Specified by:
hasNaturalIdentifierin interfaceClassMetadata- Specified by:
hasNaturalIdentifierin interfaceEntityPersister- Returns:
- True if the entity defines a natural id; false otherwise.
-
setPropertyValue
public void setPropertyValue(Object object, String propertyName, Object value)
Description copied from interface:ClassMetadataSet the value of a particular (named) property- Specified by:
setPropertyValuein interfaceClassMetadata
-
getRepresentationStrategy
public EntityRepresentationStrategy getRepresentationStrategy()
- Specified by:
getRepresentationStrategyin interfaceEntityMappingType- Specified by:
getRepresentationStrategyin interfaceEntityPersister
-
getInstrumentationMetadata
public BytecodeEnhancementMetadata getInstrumentationMetadata()
- Specified by:
getInstrumentationMetadatain interfaceEntityPersister
-
getBytecodeEnhancementMetadata
public BytecodeEnhancementMetadata getBytecodeEnhancementMetadata()
- Specified by:
getBytecodeEnhancementMetadatain interfaceEntityPersister
-
getTableAliasForColumn
public String getTableAliasForColumn(String columnName, String rootAlias)
Description copied from interface:LoadableGiven a column name and the root table alias in use for the entity hierarchy, determine the proper table alias for the table in that hierarchy that contains said column. NOTE : Generally speaking the column is not validated to exist. Most implementations simply return the root alias; the exception isJoinedSubclassEntityPersister- Specified by:
getTableAliasForColumnin interfaceLoadable- Parameters:
columnName- The column namerootAlias- The hierarchy root alias- Returns:
- The proper table alias for qualifying the given column.
-
determineTableNumberForColumn
public int determineTableNumberForColumn(String columnName)
-
getEntityEntryFactory
public EntityEntryFactory getEntityEntryFactory()
Description copied from interface:EntityPersisterGet the EntityEntryFactory indicated for the entity mapped by this persister.- Specified by:
getEntityEntryFactoryin interfaceEntityPersister- Returns:
- The proper EntityEntryFactory.
-
visitAttributeMappings
public void visitAttributeMappings(Consumer<? super AttributeMapping> action)
Description copied from interface:ManagedMappingTypeVisit attributes defined on this class and any supers- Specified by:
visitAttributeMappingsin interfaceEntityMappingType- Specified by:
visitAttributeMappingsin interfaceManagedMappingType
-
forEachAttributeMapping
public void forEachAttributeMapping(IndexedConsumer<AttributeMapping> consumer)
Description copied from interface:ManagedMappingTypeVisit attributes defined on this class and any supers- Specified by:
forEachAttributeMappingin interfaceManagedMappingType
-
prepareMappingModel
public void prepareMappingModel(org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)
- Specified by:
prepareMappingModelin interfaceorg.hibernate.metamodel.mapping.internal.InFlightEntityMappingType
-
interpretSqmMultiTableStrategy
protected static SqmMultiTableMutationStrategy interpretSqmMultiTableStrategy(AbstractEntityPersister entityMappingDescriptor, org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)
-
interpretSqmMultiTableInsertStrategy
protected static SqmMultiTableInsertStrategy interpretSqmMultiTableInsertStrategy(AbstractEntityPersister entityMappingDescriptor, org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)
-
getSqmMultiTableMutationStrategy
public SqmMultiTableMutationStrategy getSqmMultiTableMutationStrategy()
Description copied from interface:EntityPersisterThe strategy to use for SQM mutation statements where the target entity has multiple tables. Returnsnullto indicate that the entity does not define multiple tables- Specified by:
getSqmMultiTableMutationStrategyin interfaceEntityMappingType- Specified by:
getSqmMultiTableMutationStrategyin interfaceEntityPersister
-
getSqmMultiTableInsertStrategy
public SqmMultiTableInsertStrategy getSqmMultiTableInsertStrategy()
- Specified by:
getSqmMultiTableInsertStrategyin interfaceEntityMappingType- Specified by:
getSqmMultiTableInsertStrategyin interfaceEntityPersister
-
getStateArrayInitialPosition
protected int getStateArrayInitialPosition(org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)
-
isPhysicalDiscriminator
protected boolean isPhysicalDiscriminator()
-
generateDiscriminatorMapping
protected EntityDiscriminatorMapping generateDiscriminatorMapping(PersistentClass bootEntityDescriptor, org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess modelCreationProcess)
-
generateVersionMapping
protected EntityVersionMapping generateVersionMapping(Supplier<?> templateInstanceCreator, PersistentClass bootEntityDescriptor, org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)
-
shouldProcessSuperMapping
protected boolean shouldProcessSuperMapping()
-
linkWithSuperType
public void linkWithSuperType(org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)
- Specified by:
linkWithSuperTypein interfaceorg.hibernate.metamodel.mapping.internal.InFlightEntityMappingType
-
linkWithSubType
public void linkWithSubType(EntityMappingType sub, org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)
- Specified by:
linkWithSubTypein interfaceorg.hibernate.metamodel.mapping.internal.InFlightEntityMappingType
-
getNumberOfAttributeMappings
public int getNumberOfAttributeMappings()
Description copied from interface:ManagedMappingTypeGet the number of attributes defined on this class and any supers- Specified by:
getNumberOfAttributeMappingsin interfaceEntityMappingType- Specified by:
getNumberOfAttributeMappingsin interfaceManagedMappingType
-
getAttributeMapping
public AttributeMapping getAttributeMapping(int position)
Description copied from interface:ManagedMappingTypeRetrieve an attribute by its contributor position- Specified by:
getAttributeMappingin interfaceEntityMappingType- Specified by:
getAttributeMappingin interfaceEntityPersister- Specified by:
getAttributeMappingin interfaceManagedMappingType
-
getNumberOfDeclaredAttributeMappings
public int getNumberOfDeclaredAttributeMappings()
Description copied from interface:EntityMappingTypeGet the number of attributes defined on this class - do not access attributes defined on the super- Specified by:
getNumberOfDeclaredAttributeMappingsin interfaceEntityMappingType
-
getDeclaredAttributeMappings
public Collection<AttributeMapping> getDeclaredAttributeMappings()
Description copied from interface:EntityMappingTypeGet access to the attributes defined on this class - do not access attributes defined on the super- Specified by:
getDeclaredAttributeMappingsin interfaceEntityMappingType
-
visitDeclaredAttributeMappings
public void visitDeclaredAttributeMappings(Consumer<? super AttributeMapping> action)
Description copied from interface:EntityMappingTypeVisit attributes defined on this class - do not visit attributes defined on the super- Specified by:
visitDeclaredAttributeMappingsin interfaceEntityMappingType
-
getSuperMappingType
public EntityMappingType getSuperMappingType()
- Specified by:
getSuperMappingTypein interfaceEntityMappingType
-
isTypeOrSuperType
public boolean isTypeOrSuperType(EntityMappingType targetType)
- Specified by:
isTypeOrSuperTypein interfaceEntityMappingType
-
generateIdentifierMapping
protected EntityIdentifierMapping generateIdentifierMapping(Supplier<?> templateInstanceCreator, PersistentClass bootEntityDescriptor, org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)
-
generateNonEncapsulatedCompositeIdentifierMapping
protected EntityIdentifierMapping generateNonEncapsulatedCompositeIdentifierMapping(org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess, PersistentClass bootEntityDescriptor)
-
generateVersionMapping
protected static EntityVersionMapping generateVersionMapping(AbstractEntityPersister entityPersister, Supplier<?> templateInstanceCreator, PersistentClass bootModelRootEntityDescriptor, org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)
- Parameters:
entityPersister- The AbstractEntityPersister being constructed - still initializingbootModelRootEntityDescriptor- The boot-time entity descriptor for the "root entity" in the hierarchycreationProcess- The SF creation process - access to useful things
-
getMappedJavaType
public JavaType<?> getMappedJavaType()
- Specified by:
getMappedJavaTypein interfaceEntityMappingType- Specified by:
getMappedJavaTypein interfaceMappingType
-
getEntityPersister
public EntityPersister getEntityPersister()
Description copied from interface:EntityMappingTypeSafety-net. todo (6.0) : do we really need to expose?- Specified by:
getEntityPersisterin interfaceEntityMappingType
-
getIdentifierMapping
public EntityIdentifierMapping getIdentifierMapping()
- Specified by:
getIdentifierMappingin interfaceEntityMappingType
-
getVersionMapping
public EntityVersionMapping getVersionMapping()
- Specified by:
getVersionMappingin interfaceEntityMappingType
-
getRowIdMapping
public EntityRowIdMapping getRowIdMapping()
- Specified by:
getRowIdMappingin interfaceEntityMappingType
-
getDiscriminatorMapping
public EntityDiscriminatorMapping getDiscriminatorMapping()
- Specified by:
getDiscriminatorMappingin interfaceEntityMappingType
-
getAttributeMappings
public List<AttributeMapping> getAttributeMappings()
Description copied from interface:ManagedMappingTypeGet access to the attributes defined on this class and any supers- Specified by:
getAttributeMappingsin interfaceEntityMappingType- Specified by:
getAttributeMappingsin interfaceManagedMappingType
-
findDeclaredAttributeMapping
public AttributeMapping findDeclaredAttributeMapping(String name)
- Specified by:
findDeclaredAttributeMappingin interfaceEntityMappingType
-
findAttributeMapping
public AttributeMapping findAttributeMapping(String name)
- Specified by:
findAttributeMappingin interfaceManagedMappingType
-
findSubPart
public ModelPart findSubPart(String name, EntityMappingType treatTargetType)
Description copied from interface:QueryableFor an entity, this form allows for Hibernate's "implicit treat" support - meaning it should find a sub-part whether defined on the entity, its super-type or even one of its sub-types.- Specified by:
findSubPartin interfaceEntityMappingType- Specified by:
findSubPartin interfaceEntityValuedModelPart- Specified by:
findSubPartin interfaceQueryable
-
findSubTypesSubPart
public ModelPart findSubTypesSubPart(String name, EntityMappingType treatTargetType)
Description copied from interface:QueryableFor an entity, this form allows for Hibernate's "implicit treat" support - meaning it should find a sub-part whether defined on the entity or one of its sub-types.- Specified by:
findSubTypesSubPartin interfaceQueryable
-
visitSubParts
public void visitSubParts(Consumer<ModelPart> consumer, EntityMappingType treatTargetType)
Description copied from interface:QueryableLikeQueryable.findSubPart(java.lang.String, org.hibernate.metamodel.mapping.EntityMappingType), this form visits all parts defined on the entity, its super-types and its sub-types.- Specified by:
visitSubPartsin interfaceEntityMappingType- Specified by:
visitSubPartsin interfaceEntityValuedModelPart- Specified by:
visitSubPartsin interfaceQueryable
-
visitKeyFetchables
public void visitKeyFetchables(Consumer<Fetchable> fetchableConsumer, EntityMappingType treatTargetType)
- Specified by:
visitKeyFetchablesin interfaceFetchableContainer
-
visitKeyFetchables
public void visitKeyFetchables(IndexedConsumer<Fetchable> fetchableConsumer, EntityMappingType treatTargetType)
- Specified by:
visitKeyFetchablesin interfaceFetchableContainer
-
getNumberOfFetchables
public int getNumberOfFetchables()
Description copied from interface:FetchableContainerThe number of fetchables in the container- Specified by:
getNumberOfFetchablesin interfaceEntityMappingType- Specified by:
getNumberOfFetchablesin interfaceFetchableContainer
-
getNumberOfKeyFetchables
public int getNumberOfKeyFetchables()
Description copied from interface:FetchableContainerThe number of key fetchables in the container- Specified by:
getNumberOfKeyFetchablesin interfaceFetchableContainer
-
getKeyFetchable
public Fetchable getKeyFetchable(int position)
- Specified by:
getKeyFetchablein interfaceFetchableContainer
-
getFetchable
public Fetchable getFetchable(int position)
- Specified by:
getFetchablein interfaceEntityMappingType- Specified by:
getFetchablein interfaceFetchableContainer
-
visitFetchables
public void visitFetchables(Consumer<Fetchable> fetchableConsumer, EntityMappingType treatTargetType)
- Specified by:
visitFetchablesin interfaceFetchableContainer
-
visitFetchables
public void visitFetchables(IndexedConsumer<Fetchable> fetchableConsumer, EntityMappingType treatTargetType)
- Specified by:
visitFetchablesin interfaceFetchableContainer
-
visitAttributeMappings
public void visitAttributeMappings(Consumer<? super AttributeMapping> action, EntityMappingType targetType)
Description copied from interface:EntityMappingTypeVisit the mappings, but limited to just attributes defined in the targetType or its super-type(s) if any.- Specified by:
visitAttributeMappingsin interfaceEntityMappingType
-
visitSuperTypeAttributeMappings
public void visitSuperTypeAttributeMappings(Consumer<? super AttributeMapping> action)
Description copied from interface:EntityMappingTypeWalk this type's attributes as well as its super-type's- Specified by:
visitSuperTypeAttributeMappingsin interfaceEntityMappingType
-
forEachSelectable
public int forEachSelectable(int offset, SelectableConsumer selectableConsumer)- Specified by:
forEachSelectablein interfaceModelPart
-
visitSubTypeAttributeMappings
public void visitSubTypeAttributeMappings(Consumer<? super AttributeMapping> action)
Description copied from interface:EntityMappingTypeWalk this type's attributes as well as its sub-type's- Specified by:
visitSubTypeAttributeMappingsin interfaceEntityMappingType
-
getJdbcTypeCount
public int getJdbcTypeCount()
Description copied from interface:BindableThe number of JDBC mappings- Specified by:
getJdbcTypeCountin interfaceBindable- Specified by:
getJdbcTypeCountin interfaceEntityMappingType- Specified by:
getJdbcTypeCountin interfaceEntityValuedModelPart- Specified by:
getJdbcTypeCountin interfaceJdbcMappingContainer
-
forEachJdbcType
public int forEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action)Description copied from interface:JdbcMappingContainerVisit each JdbcMapping starting from the given offset- Specified by:
forEachJdbcTypein interfaceEntityMappingType- Specified by:
forEachJdbcTypein interfaceEntityValuedModelPart- Specified by:
forEachJdbcTypein interfaceJdbcMappingContainer
-
disassemble
public Object disassemble(Object value, SharedSessionContractImplementor session)
- Specified by:
disassemblein interfaceBindable- Specified by:
disassemblein interfaceEntityMappingType- Specified by:
disassemblein interfaceEntityValuedModelPart- See Also:
As an example, consider the following domain model: ````
-
forEachDisassembledJdbcValue
public int forEachDisassembledJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session)
- Specified by:
forEachDisassembledJdbcValuein interfaceBindable- Specified by:
forEachDisassembledJdbcValuein interfaceEntityMappingType- Specified by:
forEachDisassembledJdbcValuein interfaceEntityValuedModelPart
-
forEachJdbcValue
public int forEachJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer consumer, SharedSessionContractImplementor session)
- Specified by:
forEachJdbcValuein interfaceBindable- Specified by:
forEachJdbcValuein interfaceEntityMappingType- Specified by:
forEachJdbcValuein interfaceEntityValuedModelPart
-
createInsert
protected Insert createInsert()
-
createUpdate
protected Update createUpdate()
-
createDelete
protected Delete createDelete()
-
-