public void toEPL(StringWriter writer,EPStatementFormatter formatter,boolean isTopLevel,boolean andDelete){
  formatter.beginSelect(writer,isTopLevel);
  writer.write("select ");
  if (andDelete) {
    writer.write("and delete ");
  }
  if (distinct) {
    writer.write("distinct ");
  }
  if (streamSelector == StreamSelector.ISTREAM_ONLY) {
  }
 else   if (streamSelector == StreamSelector.RSTREAM_ONLY) {
    writer.write("rstream ");
  }
 else   if (streamSelector == StreamSelector.RSTREAM_ISTREAM_BOTH) {
    writer.write("irstream ");
  }
  if (selectList != null && !selectList.isEmpty()) {
    String delimiter="";
    for (    SelectClauseElement element : selectList) {
      writer.write(delimiter);
      element.toEPLElement(writer);
      delimiter=", ";
    }
  }
 else {
    writer.write('*');
  }
}

public void toEPL ( StringWriter writer , EPStatementFormatter formatter , boolean isTopLevel , boolean andDelete ) { formatter . beginSelect ( writer , isTopLevel ) ; writer . write ( "select " ) ; if ( andDelete ) { writer . write ( "and delete " ) ; } if ( distinct ) { writer . write ( "distinct " ) ; } if ( streamSelector == StreamSelector . ISTREAM_ONLY ) { } else if ( streamSelector == StreamSelector . RSTREAM_ONLY ) { writer . write ( "rstream " ) ; } else if ( streamSelector == StreamSelector . RSTREAM_ISTREAM_BOTH ) { writer . write ( "irstream " ) ; } if ( selectList != null && ! selectList . isEmpty ( ) ) { String delimiter = "" ; for ( SelectClauseElement element : selectList ) { writer . write ( delimiter ) ; element . toEPLElement ( writer ) ; delimiter = ", " ; } } else { writer . write ( '*' ) ; } }
renders the clause in textual representation .
