@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null) { return false; } if (!(o instanceof IndicatorGroup)) { return false; } final IndicatorGroup other = (IndicatorGroup) o; return name.equals(other.getName()); }
@Override protected boolean isIdentical(IndicatorGroup object, IndicatorGroup existing) { return object.getName().equals(existing.getName()); }
@Override protected void importMatching(IndicatorGroup object, IndicatorGroup match) { match.setName(object.getName()); indicatorService.updateIndicatorGroup(object); }
@Override protected IndicatorGroup getMatching(IndicatorGroup object) { List<IndicatorGroup> indicatorGroupByName = indicatorService.getIndicatorGroupByName(object.getName()); return indicatorGroupByName.isEmpty() ? null : indicatorGroupByName.get(0); }
@Override public void importObject(IndicatorGroup object, ImportParams params) { NameMappingUtil.addIndicatorGroupMapping(object.getId(), object.getName()); read(object, GroupMemberType.NONE, params); }