This is a utility class used by CQL.encode( Filter ) method to do the hard work.
Please note that this encoder is a bit more strict than you may be used to (the Common Query Language for example demands Equals.getExpression1() is a PropertyName). If you used FilterFactory to produce your filter you should be okay (as it only provides methods to make a valid Filter); if not please expect ClassCastExceptions.
This visitor will return a StringBuilder; you can also provide a StringBuilder as the data parameter in order to cut down on the number of objects created during encoding.
FilterToCQL toCQL = new FilterToCQL(); StringBuilder output = filter.accepts( toCQL, new StringBuilder() ); String cql = output.toString();
@author Johann Sorel