Ejemplo n.º 1
0
  public void visit(SetOperationList setOperationList) throws Exception {
    if (setOperationList.getSelects() != null) {
      for (SelectBody selectBody : setOperationList.getSelects()) {
        selectBody.accept(this);
      }
    }

    if (setOperationList.getOrderByElements() != null) {
      for (OrderByElement orderByElement : setOperationList.getOrderByElements()) {
        orderByElement.accept(this);
      }
    }
  }
 // PlainSelect o Select
 @Override
 public void visit(Select select) throws Exception {
   SelectTranslator selectTranslator = new SelectTranslator(connector);
   SelectBody selectBody = select.getSelectBody();
   // This handles both: PlainSelect and Union
   selectBody.accept(selectTranslator);
   //		selectTranslator.setBuffer(buffer);
   //		ExpressionTranslator expressionTranslator = new ExpressionTranslator(selectTranslator);
   //		selectTranslator.setExpressionVisitor(expressionTranslator);
   //		if (select.getWithItemsList() != null && !select.getWithItemsList().isEmpty()) {
   //			buffer.append("WITH ");
   //			for (Iterator iter = select.getWithItemsList().iterator(); iter.hasNext();) {
   //				WithItem withItem = (WithItem)iter.next();
   //				buffer.append(withItem);
   //				if (iter.hasNext())
   //					buffer.append(",");
   //				buffer.append(" ");
   //			}
   //		}
   //		select.getSelectBody().accept(selectTranslator);
 }
Ejemplo n.º 3
0
 @Override
 public void visit(SetOperationList setOpList) {
   for (SelectBody select : setOpList.getSelects()) {
     select.accept(this);
   }
 }