return c;
}
public static Where createRowQuery(Key from, Key to, DboColumnMeta colMeta, Select selectQuery, String rowKey, String indTable) {
Where selectWhere = selectQuery.where();
Clause rkClause = QueryBuilder.eq("id", rowKey);
selectWhere.and(rkClause);
Object valFrom = null, valTo = null;
if (colMeta != null) {
if (from != null) {
valFrom = colMeta.getStorageType().convertFromNoSql(from.getKey());
valFrom = checkForBooleanAndNull(valFrom, indTable, colMeta);
}
if (to != null) {
valTo = colMeta.getStorageType().convertFromNoSql(to.getKey());
valTo = checkForBooleanAndNull(valTo, indTable, colMeta);
}
} else
return selectWhere;
if (from != null) {
if (from.isInclusive()) {
Clause gteClause = QueryBuilder.gte("colname", valFrom);
selectWhere.and(gteClause);
} else {
Clause gtClause = QueryBuilder.gt("colname", valFrom);
selectWhere.and(gtClause);
}
}
if (to != null) {
if (to.isInclusive()) {
Clause lteClause = QueryBuilder.lte("colname", valTo);
selectWhere.and(lteClause);
}
else {
Clause ltClause = QueryBuilder.lt("colname", valTo);
selectWhere.and(ltClause);
}
}
return selectWhere;
}