private void logDuplicateEntity(Serializable id) { switch (_logDuplicatesStrategy) { case NONE: break; case WARNING: _log.warn("duplicate entity: type=" + _entityType + " id=" + id); break; case ERROR: throw new DuplicateEntityException(_entityType, id); } }
private void logDuplicateEntity(Serializable id) { switch (_logDuplicatesStrategy) { case NONE: break; case WARNING: _log.warn("duplicate entity: type=" + _entityType + " id=" + id); break; case ERROR: throw new DuplicateEntityException(_entityType, id); } }
private void registerAgencyId(Class<?> entityType, AgencyAndId id) { Map<String, String> agencyIdsByEntityId = _agencyIdsByEntityClassAndId.get(entityType); if (agencyIdsByEntityId == null) { agencyIdsByEntityId = new HashMap<String, String>(); _agencyIdsByEntityClassAndId.put(entityType, agencyIdsByEntityId); } if (agencyIdsByEntityId.containsKey(id.getId()) && !_overwriteDuplicates) { throw new DuplicateEntityException(entityType, id); } agencyIdsByEntityId.put(id.getId(), id.getAgencyId()); } }
private void registerAgencyId(Class<?> entityType, AgencyAndId id) { Map<String, String> agencyIdsByEntityId = _agencyIdsByEntityClassAndId.get(entityType); if (agencyIdsByEntityId == null) { agencyIdsByEntityId = new HashMap<String, String>(); _agencyIdsByEntityClassAndId.put(entityType, agencyIdsByEntityId); } if (agencyIdsByEntityId.containsKey(id.getId()) && !_overwriteDuplicates) { throw new DuplicateEntityException(entityType, id); } agencyIdsByEntityId.put(id.getId(), id.getAgencyId()); } }