/** Called by Dynatable */
  @Override
  public Request<List<PriseMedicamentRegimeProxy>> getList(
      String property, int start, int numRows, boolean asc) {

    PriseMedicamentRegimeRequest request = (PriseMedicamentRegimeRequest) getContext();
    Request<List<PriseMedicamentRegimeProxy>> result = null;

    if (isFiltered) {
      /* permanently filtered - hierarchical lists */
      if (filterCriteria != null) {

        if (searchCriterions != null)
          /* permanent filter added to search criterion */
          result =
              request.listPriseMedicamentRegime(start, numRows, property, asc, searchCriterions);
        else
          /* permanent filter only */
          result = request.listPriseMedicamentRegime(start, numRows, property, asc, filterCriteria);

      } else result = request.getPriseMedicamentRegimeEmptyList();
    } else {
      if (searchCriterions != null)
        result = request.listPriseMedicamentRegime(start, numRows, property, asc, searchCriterions);
      else result = request.listPriseMedicamentRegime(start, numRows, property, asc);
    }

    result.with("medicament");

    return result;
  }
  /** Called by Relation Boxes */
  @Override
  public Request<List<PriseMedicamentRegimeProxy>> getList(int start, int numRows) {

    PriseMedicamentRegimeRequest request = (PriseMedicamentRegimeRequest) getContext();
    Request<List<PriseMedicamentRegimeProxy>> result = null;

    if (isFiltered) {
      /* permanently filtered - hierarchical lists */
      if (filterCriteria != null) {

        if (searchCriterions != null) {
          /* permanent filter added to search criterion */
          if (nonAffected) {
            if (!searchInReverse)
              result =
                  request.listNonAffectedPriseMedicamentRegime(
                      start, numRows, "medicament", true, searchCriterions, property);
            else
              result =
                  request.listNonAffectedPriseMedicamentRegimeReverse(
                      start, numRows, "medicament", true, searchCriterions, property);
          } else
            result =
                request.listPriseMedicamentRegime(
                    start, numRows, "medicament", true, searchCriterions);
        } else {
          /* permanent filter only */
          if (nonAffected) {
            if (!searchInReverse)
              result =
                  request.listNonAffectedPriseMedicamentRegime(
                      start, numRows, "medicament", true, filterCriteria, property);
            else
              result =
                  request.listNonAffectedPriseMedicamentRegimeReverse(
                      start, numRows, "medicament", true, filterCriteria, property);
          } else
            result =
                request.listPriseMedicamentRegime(
                    start, numRows, "medicament", true, filterCriteria);
        }

      } else result = request.getPriseMedicamentRegimeEmptyList();
    } else {
      if (searchCriterions != null) {

        if (nonAffected) {
          if (!searchInReverse)
            result =
                request.listNonAffectedPriseMedicamentRegime(
                    start, numRows, "medicament", true, searchCriterions, property);
          else
            result =
                request.listNonAffectedPriseMedicamentRegimeReverse(
                    start, numRows, "medicament", true, searchCriterions, property);
        } else
          result =
              request.listPriseMedicamentRegime(
                  start, numRows, "medicament", true, searchCriterions);
      } else {

        if (nonAffected) {
          if (!searchInReverse)
            result =
                request.listNonAffectedPriseMedicamentRegime(
                    start, numRows, "medicament", true, property);
          else
            result =
                request.listNonAffectedPriseMedicamentRegimeReverse(
                    start, numRows, "medicament", true, property);
        } else result = request.listPriseMedicamentRegime(start, numRows, "medicament", true);
      }
    }

    if (isFiltered) {
      result.with("medicament");
    } else {
      result.with("medicament");
    }

    return result;
  }