code: public int bindStatement(PreparedStatement stmt, Query query, ClassDescriptor cld, int param) throws SQLException
      {
          int result;
  
          result = bindStatement(stmt, query.getCriteria(), cld, param);
          result = bindStatement(stmt, query.getHavingCriteria(), cld, result);
  
          return result;
      }
docs: bind a Query based Select Statement