docs: public static DetachedCriteria toCriteria(String cqlExpression, Class forClass) throws ParseException {
  
          try {
              Parser p = new Parser( new CqlLexer( new PushbackReader(new StringReader(cqlExpression), 1024)));
              // Parse the input.
              Start tree = p.parse();
  
              // Build the filter expression
              HibernateCriteriaBuilder builder = new HibernateCriteriaBuilder(forClass);
              tree.apply(builder);
  
              return builder.getCriteria();
          }
          catch(ParserException e) {
  
              ParseException parseException = new ParseException(e.getMessage(), e.getToken().getPos());
              parseException.initCause(e);
              throw parseException;
          }
          catch (LexerException e) {
  
              ParseException parseException = new ParseException(e.getMessage(), 0);
              parseException.initCause(e);
              throw parseException;
          }
          catch (IOException e) {
  
              ParseException parseException = new ParseException(e.getMessage(), 0);
              parseException.initCause(e);
              throw parseException;
          }
      }