code: private int bindSelectionCriteria(PreparedStatement stmt, int index, SelectionCriteria crit, ClassDescriptor cld) throws SQLException
      {
          if (crit instanceof NullCriteria)
              index = bindStatement(stmt, index, (NullCriteria) crit);
          else if (crit instanceof BetweenCriteria)
              index = bindStatement(stmt, index, (BetweenCriteria) crit, cld);
          else if (crit instanceof InCriteria)
              index = bindStatement(stmt, index, (InCriteria) crit, cld);
          else if (crit instanceof SqlCriteria)
              index = bindStatement(stmt, index, (SqlCriteria) crit);
          else if (crit instanceof FieldCriteria)
              index = bindStatement(stmt, index, (FieldCriteria) crit);
          else if (crit instanceof ExistsCriteria)
              index = bindStatement(stmt, index, (ExistsCriteria) crit, cld);
          else
              index = bindStatement(stmt, index, crit, cld);
  
          return index;
      }
docs: bind SelectionCriteria
  @param stmt the PreparedStatement
  @param index the position of the parameter to bind
  @param crit the Criteria containing the parameter
  @param cld the ClassDescriptor
  @return next index for PreparedStatement