@Override
    public void onSuccess(List<TransitLPPot<TransitLPActivity>> result) {
      if (result != null) {
        ActivityRecord[] records;
        List<ActivityRecord> listRecords = new ArrayList<ActivityRecord>();
        for (TransitLPPot<TransitLPActivity> pot : result) {
          for (TransitLPActivity activity : pot.getStoredEntities()) {
            if (activity.getCategory().equals(transitCategory.getId())
                && !takenActivities.contains(activity.getId()))
              listRecords.add(new ActivityRecord(activity));
          }
        }
        records = new ActivityRecord[listRecords.size()];
        records = listRecords.toArray(records);

        view.setSchemaActivities(records);
        view.addNewUnitChoice();
        System.out.println("FetchSchemaActivities");
        fireDisplayReady();
      } else System.err.println("Error Fetching activities");
    }
    @Override
    public void onSuccess(ArrayList<TransitLPActivity> result) {
      if (result != null) {
        ActivityRecord[] records;
        List<ActivityRecord> listRecords = new ArrayList<ActivityRecord>();

        for (TransitLPActivity activity : result) {
          if (activity.getCategory().equals(transitCategory.getId())) {
            System.out.println("activity found " + activity.getName());
            listRecords.add(new ActivityRecord(activity));

            if (!activity.getSchemaID().equals("")) takenActivities.add(activity.getSchemaID());
          }
        }
        records = new ActivityRecord[listRecords.size()];
        records = listRecords.toArray(records);

        view.setProjectActivities(records);
        System.out.println("FetchProjectActivites");
        new FetchProjectActivityUnits();
      } else {
        System.err.println("Error while fetching project activities");
      }
    }
    @Override
    public void onSuccess(List<TransitLPActivity> result) {
      if (result != null) {
        System.out.println("Unit");
        ActivityRecord[] records;
        List<ActivityRecord> listRecords = new ArrayList<ActivityRecord>();

        for (TransitLPActivity activity : result) {
          if (activity.getCategory().equals(transitCategory.getId())) {
            listRecords.add(new ActivityRecord(activity));

            System.out.println(
                "activity found unit : " + activity.getName() + " id " + activity.getId());
            if (!activity.getId().equals("")) takenActivities.add(activity.getId());
          }
        }

        records = new ActivityRecord[listRecords.size()];
        records = listRecords.toArray(records);
        view.addExistingUnitChoice(unitId, records);
      }
      fetcherReady();
    }