code: private static String getFormattedList(long[] idList) {
      if (idList == null) {
        idList = new long[]{};
      }
      return new StringBuilder().append("{")
          .append(StringUtils.join(ArrayUtils.toObject(idList), ','))
          .append("}").toString();
    }
docs: Gets a formatted list of a long array in the form {1,2,3}.
  @param idList the long array
  @return the formatted list