if (oldElement.isNewObject()) {
elementsById.put(oldElement.getId(), oldElement);
}
LimitingResourceQueueElement element = getEquivalent(oldElement);
if (element.hasDayAssignments()) {
unassingFromQueue(element);
}
unassignedElements.remove(element);
elementsById.remove(element.getId());
graph.removeVertex(element);
unassignedElements.add(newElement);
elementsById.put(newElement.getId(), newElement);
graph.addVertex(newElement);