Selector selector = qomFactory.selector("car:Car", "car");
PropertyValue propValue = qomFactory.propertyValue("car", "car:userRating");
Literal literal = qomFactory.literal(session.getValueFactory().createValue("4")); // use a String since it's LIKE
Constraint constraint = qomFactory.comparison(propValue, JCR_OPERATOR_LIKE, literal);
Column[] columns = new Column[4];
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);