use of org.hibernate.internal.FilterJdbcParameter in project hibernate-orm by hibernate.
the class AbstractSqlAstTranslator method visitFilterPredicate.
@Override
public void visitFilterPredicate(FilterPredicate filterPredicate) {
visitJunction(filterPredicate.getFragments());
final List<FilterJdbcParameter> parameters = filterPredicate.getParameters();
if (parameters != null) {
for (FilterJdbcParameter filterJdbcParameter : parameters) {
parameterBinders.add(filterJdbcParameter.getBinder());
jdbcParameters.addParameter(filterJdbcParameter.getParameter());
filterJdbcParameters.add(filterJdbcParameter);
}
}
}
use of org.hibernate.internal.FilterJdbcParameter in project hibernate-orm by hibernate.
the class AbstractSqlAstTranslator method translate.
@Override
public T translate(JdbcParameterBindings jdbcParameterBindings, QueryOptions queryOptions) {
try {
this.jdbcParameterBindings = jdbcParameterBindings;
this.lockOptions = queryOptions.getLockOptions().makeCopy();
this.limit = queryOptions.getLimit() == null ? null : queryOptions.getLimit().makeCopy();
final JdbcOperation jdbcOperation;
if (statement instanceof DeleteStatement) {
jdbcOperation = translateDelete((DeleteStatement) statement);
} else if (statement instanceof UpdateStatement) {
jdbcOperation = translateUpdate((UpdateStatement) statement);
} else if (statement instanceof InsertStatement) {
jdbcOperation = translateInsert((InsertStatement) statement);
} else if (statement instanceof SelectStatement) {
jdbcOperation = translateSelect((SelectStatement) statement);
} else {
throw new IllegalArgumentException("Unexpected statement!");
}
if (jdbcParameterBindings != null && CollectionHelper.isNotEmpty(getFilterJdbcParameters())) {
for (FilterJdbcParameter filterJdbcParameter : getFilterJdbcParameters()) {
jdbcParameterBindings.addBinding(filterJdbcParameter.getParameter(), filterJdbcParameter.getBinding());
}
}
return (T) jdbcOperation;
} finally {
cleanup();
}
}
Aggregations