Class JdbcOperations.SelectBuilder
- Enclosing class:
JdbcOperations
Builder for a JdbcSelect.
The default result mapping is derived from the request's select statement and SessionFactory. Override it only when the JDBC driver returns a result shape which differs from that statement's standard mapping.
- Since:
- 8.0
-
Method Summary
Modifier and TypeMethodDescriptionaffectedQuerySpaces(Set<String> affectedQuerySpaces) Set the relational tables or backend-equivalent query spaces affected by the command.appliedParameterBindings(Map<JdbcParameter, JdbcParameterBinding> appliedParameterBindings) Record parameter values which were incorporated into the generated command and therefore participate in operation-cache compatibility.build()Build the immutable operation description consumed by Hibernate's JDBC executor.Set the command text understood by the configured JDBC driver.jdbcValuesMappingProducer(JdbcValuesMappingProducer jdbcValuesMappingProducer) Supply a custom JDBC result mapping instead of deriving the standard one.limitParameter(JdbcParameter limitParameter) Identify the parameter rendered for the query limit, if any.lockingApplication(JdbcLockingApplication lockingApplication) Describe which stage owns pessimistic-lock application.maxRows(int maxRows) Set the maximum number of rows the executor should consume.offsetParameter(JdbcParameter offsetParameter) Identify the parameter rendered for the query offset, if any.paginationApplication(JdbcPaginationApplication paginationApplication) Describe which stage owns pagination application.parameterBinders(List<? extends JdbcParameterBinder> parameterBinders) Set binders in command-placeholder order.rowsToSkip(int rowsToSkip) Set the number of result rows the executor should skip.scrollExecution(boolean scrollExecution) Indicate that the selection is being translated for scroll execution.
-
Method Details
-
command
Set the command text understood by the configured JDBC driver. -
parameterBinders
public JdbcOperations.SelectBuilder parameterBinders(List<? extends JdbcParameterBinder> parameterBinders) Set binders in command-placeholder order. -
affectedQuerySpaces
Set the relational tables or backend-equivalent query spaces affected by the command. -
appliedParameterBindings
public JdbcOperations.SelectBuilder appliedParameterBindings(Map<JdbcParameter, JdbcParameterBinding> appliedParameterBindings) Record parameter values which were incorporated into the generated command and therefore participate in operation-cache compatibility. -
jdbcValuesMappingProducer
public JdbcOperations.SelectBuilder jdbcValuesMappingProducer(JdbcValuesMappingProducer jdbcValuesMappingProducer) Supply a custom JDBC result mapping instead of deriving the standard one. -
rowsToSkip
Set the number of result rows the executor should skip. -
maxRows
Set the maximum number of rows the executor should consume. -
lockingApplication
Describe which stage owns pessimistic-lock application. -
paginationApplication
public JdbcOperations.SelectBuilder paginationApplication(JdbcPaginationApplication paginationApplication) Describe which stage owns pagination application. -
offsetParameter
Identify the parameter rendered for the query offset, if any.
Create the standard query-options-backed parameter with
JdbcParameterFactory.queryOffset(org.hibernate.type.spi.TypeConfiguration). Its parameter binder must occur inparameterBindersat the corresponding command-placeholder position, and this must be the same parameter instance whose placeholder was rendered. -
limitParameter
Identify the parameter rendered for the query limit, if any.
Create the standard query-options-backed parameter with
JdbcParameterFactory.queryLimit(org.hibernate.type.spi.TypeConfiguration). Its parameter binder must occur inparameterBindersat the corresponding command-placeholder position, and this must be the same parameter instance whose placeholder was rendered. -
scrollExecution
Indicate that the selection is being translated for scroll execution. -
build
Build the immutable operation description consumed by Hibernate's JDBC executor.
-