コード例 #1
0
ファイル: JoinNode.java プロジェクト: thinktainer/sql-layer
 /** Get the condition that implements groupJoin. */
 public ConditionExpression getGroupJoinCondition() {
   for (ConditionExpression condition : joinConditions) {
     if (condition.getImplementation() == ConditionExpression.Implementation.GROUP_JOIN)
       return condition;
   }
   return null;
 }
コード例 #2
0
 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);
       }
     }
   }
 }