columns[0] = qomFactory.column("car", "car:maker", "maker");
columns[1] = qomFactory.column("car", "car:model", "car:model");
columns[2] = qomFactory.column("car", "car:year", "car:year");
columns[3] = qomFactory.column("car", "car:userRating", "car:userRating");
Ordering[] orderings = null;
Limit limit = qomFactory.limit(2, 0);
boolean isDistinct = false;
// Build and execute the query ...
SelectQuery selectQuery = qomFactory.select(selector, constraint, orderings, columns, limit, isDistinct);
Query query1 = qomFactory.createQuery(selectQuery);