if(_objectsById.containsKey(id))
{
final ConfiguredObjectRecord existingRecord = _objectsById.get(id);
if(!type.equals(existingRecord.getType()))
{
throw new AMQStoreException("Cannot change the type of record " + id + " from type "
+ existingRecord.getType() + " to type " + type);
}
}
else if(!createIfNecessary)
{
throw new AMQStoreException("Cannot update record with id " + id
+ " of type " + type + " as it does not exist");
}
else if(!CLASS_NAME_MAPPING.containsKey(type))
{
throw new AMQStoreException("Cannot update record of unknown type " + type);
}
}
for(ConfiguredObjectRecord record : records)
{
final UUID id = record.getId();