public static String constructWhereClauseString(Group group, boolean parens) {
StringBuilder builder = new StringBuilder(255);
if (group == null || group.size() == 0) {
return "";
} else if (group.size() == 1) {
Criterion criterion = group.iterator().next();
if (criterion instanceof Group) {
Group innerGroup = (Group) criterion;
if (innerGroup.size() == 0) {
return "";
}