Ejemplo n.º 1
0
 @Override
 public void visit(SubJoin subJoin) {
   FromItem left = subJoin.getLeft();
   FromItem right = subJoin.getJoin().getRightItem();
   FromItemVisitorImpl leftVisitor = new FromItemVisitorImpl(where);
   FromItemVisitorImpl rightVisitor = new FromItemVisitorImpl(where);
   left.accept(leftVisitor);
   right.accept(rightVisitor);
   relationProvider = PlanFactory.getInstance().newJoin();
   ((Join) relationProvider)
       .setInput(leftVisitor.getRelationProvider(), rightVisitor.getRelationProvider());
 }
Ejemplo n.º 2
0
  private static String[] getTables(List fromItems) {
    if (fromItems == null) {
      throw new NullPointerException("fromItems");
    }

    List tableNames = new ArrayList(fromItems.size());

    for (Iterator it = fromItems.iterator(); it.hasNext(); ) {
      FromItem fromItem = (FromItem) it.next();
      String fromItemDef = fromItem.toString();
      tableNames.add(fromItemDef);
    }
    return (String[]) tableNames.toArray(new String[tableNames.size()]);
  }