- All Known Implementing Classes:
Db2Dialect.Db2CriteriaBuilder,Mssql2008Dialect.Mssql2008CriteriaBuilder,MysqlDialect.MysqlCriteriaBuilder,Oracle11Dialect.Oracle11CriteriaBuilder,PostgresDialect.PostgresCriteriaBuilder,SqliteDialect.SqliteCriteriaBuilder,StandardDialect.StandardCriteriaBuilder
public interface CriteriaBuilder
A builder interface for database-specific SQL criteria operations.
This interface provides methods to build SQL fragments that are specific to each database dialect, such as pagination, string concatenation, and locking operations. Implementations are provided by each database dialect.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidconcat(PreparedSqlBuilder buf, Runnable leftOperand, Runnable rightOperand) Builds a SQL fragment for string concatenation operation.voidforUpdate(PreparedSqlBuilder buf, ForUpdateOption option, Consumer<PropertyMetamodel<?>> column, AliasManager aliasManager) Builds a SQL fragment for FOR UPDATE clause.voidlockWithTableHint(PreparedSqlBuilder buf, ForUpdateOption option, Consumer<PropertyMetamodel<?>> column) Builds a SQL fragment for locking using table hints.voidoffsetAndFetch(PreparedSqlBuilder buf, int offset, int limit) Builds a SQL fragment for pagination with offset and limit.
-
Method Details
-
concat
Builds a SQL fragment for string concatenation operation.- Parameters:
buf- the SQL builder to append the concatenation expression toleftOperand- the runnable that builds the left operand of the concatenationrightOperand- the runnable that builds the right operand of the concatenation
-
offsetAndFetch
Builds a SQL fragment for pagination with offset and limit.- Parameters:
buf- the SQL builder to append the pagination expression tooffset- the number of rows to skiplimit- the maximum number of rows to return
-
lockWithTableHint
void lockWithTableHint(PreparedSqlBuilder buf, ForUpdateOption option, Consumer<PropertyMetamodel<?>> column) Builds a SQL fragment for locking using table hints.- Parameters:
buf- the SQL builder to append the locking expression tooption- the locking optionscolumn- the consumer that specifies which columns to lock
-
forUpdate
void forUpdate(PreparedSqlBuilder buf, ForUpdateOption option, Consumer<PropertyMetamodel<?>> column, AliasManager aliasManager) Builds a SQL fragment for FOR UPDATE clause.- Parameters:
buf- the SQL builder to append the FOR UPDATE expression tooption- the FOR UPDATE optionscolumn- the consumer that specifies which columns to lockaliasManager- the manager for table aliases
-