code: protected void appendWhereClause(FieldDescriptor[] fields, StringBuffer stmt) throws PersistenceBrokerException
      {
          stmt.append(" WHERE ");
  
          for(int i = 0; i < fields.length; i++)
          {
              FieldDescriptor fmd = fields[i];
  
              stmt.append(fmd.getColumnName());
              stmt.append(" = ? ");
              if(i < fields.length - 1)
              {
                  stmt.append(" AND ");
              }
          }
      }
docs: Generate a sql where-clause for the array of fields
  
  @param fields array containing all columns used in WHERE clause