Package org.hibernate.hql.spi.id.inline
Class InlineIdsSubSelectValueListBulkIdStrategy
- java.lang.Object
-
- org.hibernate.hql.spi.id.inline.InlineIdsSubSelectValueListBulkIdStrategy
-
- All Implemented Interfaces:
MultiTableBulkIdStrategy
public class InlineIdsSubSelectValueListBulkIdStrategy extends Object implements MultiTableBulkIdStrategy
This bulk-id strategy inlines identifiers of the rows that need to be updated or deleted in a subselect using a VALUES list:delete from Person where ( id ) in ( select id from ( values ( 1 ), ( 2 ), ( 3 ), ( 4 ) ) as HT (id) )
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.hql.spi.id.MultiTableBulkIdStrategy
MultiTableBulkIdStrategy.DeleteHandler, MultiTableBulkIdStrategy.UpdateHandler
-
-
Field Summary
Fields Modifier and Type Field Description static InlineIdsSubSelectValueListBulkIdStrategy
INSTANCE
-
Constructor Summary
Constructors Constructor Description InlineIdsSubSelectValueListBulkIdStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiTableBulkIdStrategy.DeleteHandler
buildDeleteHandler(SessionFactoryImplementor factory, org.hibernate.hql.internal.ast.HqlSqlWalker walker)
Build a handler capable of handling the bulk delete indicated by the given walker.MultiTableBulkIdStrategy.UpdateHandler
buildUpdateHandler(SessionFactoryImplementor factory, org.hibernate.hql.internal.ast.HqlSqlWalker walker)
Build a handler capable of handling the bulk update indicated by the given walker.void
prepare(JdbcServices jdbcServices, JdbcConnectionAccess jdbcConnectionAccess, MetadataImplementor metadataImplementor, SessionFactoryOptions sessionFactoryOptions)
Prepare the strategy.void
release(JdbcServices jdbcServices, JdbcConnectionAccess connectionAccess)
Release the strategy.
-
-
-
Field Detail
-
INSTANCE
public static final InlineIdsSubSelectValueListBulkIdStrategy INSTANCE
-
-
Method Detail
-
prepare
public void prepare(JdbcServices jdbcServices, JdbcConnectionAccess jdbcConnectionAccess, MetadataImplementor metadataImplementor, SessionFactoryOptions sessionFactoryOptions)
Description copied from interface:MultiTableBulkIdStrategy
Prepare the strategy. Called as the SessionFactory is being built. Intended patterns here include:- Adding tables to the passed Mappings, to be picked by by "schema management tools"
- Manually creating the tables immediately through the passed JDBC Connection access
- Specified by:
prepare
in interfaceMultiTableBulkIdStrategy
- Parameters:
jdbcServices
- The JdbcService objectjdbcConnectionAccess
- Access to the JDBC ConnectionmetadataImplementor
- Access to the O/RM mapping information
-
release
public void release(JdbcServices jdbcServices, JdbcConnectionAccess connectionAccess)
Description copied from interface:MultiTableBulkIdStrategy
Release the strategy. Called as the SessionFactory is being shut down.- Specified by:
release
in interfaceMultiTableBulkIdStrategy
- Parameters:
jdbcServices
- The JdbcService objectconnectionAccess
- Access to the JDBC Connection
-
buildUpdateHandler
public MultiTableBulkIdStrategy.UpdateHandler buildUpdateHandler(SessionFactoryImplementor factory, org.hibernate.hql.internal.ast.HqlSqlWalker walker)
Description copied from interface:MultiTableBulkIdStrategy
Build a handler capable of handling the bulk update indicated by the given walker.- Specified by:
buildUpdateHandler
in interfaceMultiTableBulkIdStrategy
- Parameters:
factory
- The SessionFactorywalker
- The AST walker, representing the update query- Returns:
- The handler
-
buildDeleteHandler
public MultiTableBulkIdStrategy.DeleteHandler buildDeleteHandler(SessionFactoryImplementor factory, org.hibernate.hql.internal.ast.HqlSqlWalker walker)
Description copied from interface:MultiTableBulkIdStrategy
Build a handler capable of handling the bulk delete indicated by the given walker.- Specified by:
buildDeleteHandler
in interfaceMultiTableBulkIdStrategy
- Parameters:
factory
- The SessionFactorywalker
- The AST walker, representing the delete query- Returns:
- The handler
-
-