*/
public POQQuery1(String searchFor) {
if (searchFor == null)
throw new IllegalArgumentException("Parameter 'searchFor' must not be null");
Query q1 = gtm.query(Disc.class);
q1.constrain("DGENRE", OP.EQUALS, FUNCTION.TO_UPPER, "Jazz");
q1.constrain("DTITLE", OP.CONTAINS, FUNCTION.TO_UPPER, searchFor);
q1.constrain("DYEAR", OP.GREATER, 1999);
q1.sortBy("DYEAR");
ObjectSet<Disc> discs = q1.execute();
Util.printObjectSet(discs);
q1.printConstraintInfo();
gtm.printCacheStatistics();
System.out.println("-----------------------------------------");
// 2. query with Iterator
Query q2 = gtm.query(Disc.class);
q2.constrain("DTITLE", OP.STARTS_WITH, FUNCTION.TO_UPPER, searchFor);
q2.constrain("DTITLE", OP.CONTAINS, FUNCTION.TO_UPPER, "live");
q2.constrain("DYEAR", OP.RANGE, 2000, 2002);
q2.constrain("DGENRE", OP.EQUALS, FUNCTION.TO_UPPER, "BLUES");
discs = q2.execute();
Iterator<Disc> iter = discs.iterator();
while (iter.hasNext()) {
Disc disc = iter.next();
System.out.println(disc);
}
q2.printConstraintInfo();
gtm.printCacheStatistics();
}