Пример #1
0
 /** Get the condition that implements groupJoin. */
 public ConditionExpression getGroupJoinCondition() {
   for (ConditionExpression condition : joinConditions) {
     if (condition.getImplementation() == ConditionExpression.Implementation.GROUP_JOIN)
       return condition;
   }
   return null;
 }
 private void summarizeJoins(StringBuilder str) {
   for (TableGroupJoinNode node : this) {
     if (node != root) {
       str.append(" ");
       str.append(node.getParentJoinType());
       str.append(" ");
     }
     str.append(node.getTable().getName());
     if (node.getJoinConditions() != null) {
       boolean first = true;
       for (ConditionExpression joinCondition : node.getJoinConditions()) {
         if (joinCondition.getImplementation() == ConditionExpression.Implementation.GROUP_JOIN)
           continue;
         if (first) {
           str.append(" ON ");
           first = false;
         } else str.append(" AND ");
         str.append(joinCondition);
       }
     }
   }
 }