System.out.println(generator.getQueryString(false));
System.out.println(generator.getQueryString(true));
}
public static void testResourceGroupCriteria() {
ResourceGroupCriteria groupCriteria = new ResourceGroupCriteria();
groupCriteria.addSortName(PageOrdering.DESC);
groupCriteria.addSortResourceTypeName(PageOrdering.ASC);
groupCriteria.addSortPluginName(PageOrdering.DESC);
CriteriaQueryGenerator generator = new CriteriaQueryGenerator(new Subject(), groupCriteria);
System.out.println(generator.getQueryString(false));
System.out.println(generator.getQueryString(true));
PageControl customPC = new PageControl();
customPC.addDefaultOrderingField("0", PageOrdering.DESC);
customPC.addDefaultOrderingField("name", PageOrdering.DESC);
customPC.addDefaultOrderingField("resourceType.name", PageOrdering.ASC);
groupCriteria.setPageControl(customPC);
System.out.println(generator.getQueryString(false));
System.out.println(generator.getQueryString(true));
}