}
@Override
public void undo() throws CannotUndoException {
CreateRelationshipAction relationshipAction = (CreateRelationshipAction) actionManager
.getAction(CreateRelationshipAction.getActionName());
switch (this.mode) {
case OBJECT_ENTITY: {
for (Entry<ObjEntity, List<ObjRelationship>> entry : objRelationshipMap
.entrySet()) {
ObjEntity objEntity = entry.getKey();
for (ObjRelationship rel : entry.getValue()) {
relationshipAction.createObjRelationship(objEntity, rel);
}
}
CreateObjEntityAction action = (CreateObjEntityAction) actionManager
.getAction(CreateObjEntityAction.getActionName());
action.createObjEntity(map, objEntity);
break;
}
case DB_ENTITY: {
for (Entry<DbEntity, List<DbRelationship>> entry : dbRelationshipMap
.entrySet()) {
DbEntity dbEntity = entry.getKey();
for (DbRelationship rel : entry.getValue()) {
relationshipAction.createDbRelationship(dbEntity, rel);
}
}
CreateDbEntityAction action = (CreateDbEntityAction) actionManager
.getAction(CreateDbEntityAction.getActionName());