code: public static ObjectFields getObjectFields(String pid, String[] fields)
              throws IOException {
          FieldSearchQuery query = new FieldSearchQuery();
          Condition condition = new Condition();
          condition.setProperty("pid");
          condition.setOperator(ComparisonOperator.fromValue("eq"));
          condition.setValue(pid);
          FieldSearchQuery.Conditions conds = new FieldSearchQuery.Conditions();
          conds.getCondition().add(condition);
          ObjectFactory factory = new ObjectFactory();
          query.setConditions(factory.createFieldSearchQueryConditions(conds));
          FieldSearchResult result =
                  Administrator.APIA
                          .findObjects(TypeUtility.convertStringtoAOS(fields),
                                       new BigInteger("1"),
                                       query);
          ResultList resultList = result.getResultList();
          if (resultList == null || resultList.getObjectFields() == null
                  && resultList.getObjectFields().size() == 0) {
              throw new IOException("Object not found in repository");
          }
          return resultList.getObjectFields().get(0);
      }
docs: Get the indicated fields of the indicated object from the repository.