Esempio n. 1
0
  /**
   * Creates a two-dimensional array of dimension items based on the list of DimensionalObjects.
   * I.e. the list of items of each DimensionalObject is converted to an array and inserted into the
   * outer array in the same order.
   *
   * @param dimensions the list of DimensionalObjects.
   * @return a two-dimensional array of NameableObjects.
   */
  public static NameableObject[][] getItemArray(List<DimensionalObject> dimensions) {
    List<NameableObject[]> arrays = new ArrayList<>();

    for (DimensionalObject dimension : dimensions) {
      arrays.add(dimension.getItems().toArray(new NameableObject[0]));
    }

    return arrays.toArray(new NameableObject[0][]);
  }
Esempio n. 2
0
  @Override
  public List<NameableObject> series() {
    DimensionalObject object =
        getDimensionalObject(
            series,
            relativePeriodDate,
            user,
            true,
            organisationUnitsAtLevel,
            organisationUnitsInGroups,
            format);

    return object != null ? object.getItems() : null;
  }