private void deleteGroupAssociations(GroupMemberType groupMemberType, int groupId) {
    Collection<ImportObject> importObjects = importObjectStore.getImportObjects(groupMemberType);

    for (ImportObject importObject : importObjects) {
      GroupMemberAssociation association = (GroupMemberAssociation) importObject.getObject();

      if (association.getGroupId() == groupId) {
        importObjectStore.deleteImportObject(importObject);
      }
    }
  }
  public void read(XMLReader reader, ImportParams params) {
    while (reader.moveToStartElement(ELEMENT_NAME, COLLECTION_NAME)) {
      final Map<String, String> values = reader.readElements(ELEMENT_NAME);

      final GroupMemberAssociation association = new GroupMemberAssociation(AssociationType.SET);

      association.setGroupId(
          dataDictionaryMapping.get(Integer.parseInt(values.get(FIELD_DATADICTIONARY))));
      association.setMemberId(indicatorMapping.get(Integer.parseInt(values.get(FIELD_INDICATOR))));

      importObject(association, params);
    }
  }