use of org.sql.generation.api.grammar.builders.booleans.InBuilder in project qi4j-sdk by Qi4j.
the class AbstractSQLQuerying method createTypeCondition.
protected org.sql.generation.api.grammar.booleans.BooleanExpression createTypeCondition(Class<?> resultType, SQLVendor vendor) {
BooleanFactory b = vendor.getBooleanFactory();
LiteralFactory l = vendor.getLiteralFactory();
ColumnsFactory c = vendor.getColumnsFactory();
List<Integer> typeIDs = this.getEntityTypeIDs(resultType);
InBuilder in = b.inBuilder(c.colName(TABLE_NAME_PREFIX + TYPE_TABLE_SUFFIX, DBNames.ENTITY_TYPES_TABLE_PK_COLUMN_NAME));
for (Integer i : typeIDs) {
in.addValues(l.n(i));
}
return in.createExpression();
}
Aggregations