use of com.ramussoft.common.journal.command.DeleteElementCommand in project ramus by Vitaliy-Yakovchuk.
the class JournaledEngine method deleteElement.
@Override
public void deleteElement(long id) {
qualifirsForElements.remove(id);
Element element = getElement(id);
long qualifierId = getQualifierIdForElement(id);
Transaction[] data = getAttributeWhatWillBeDeleted(id);
ElementEvent event = new ElementEvent(this, element, null, qualifierId);
try {
beforeElementDeleted(event);
} catch (Exception e) {
e.printStackTrace();
}
deligate.deleteElement(id);
synchronized (swithJournalLock) {
journal.store(new DeleteElementCommand(this, qualifierId, id, data));
}
elementDeleted(event);
}
Aggregations