Search in sources :

Example 1 with DeleteAttributeCommand

use of com.ramussoft.common.journal.command.DeleteAttributeCommand in project ramus by Vitaliy-Yakovchuk.

the class JournaledEngine method deleteAttribute.

@Override
public void deleteAttribute(long id) {
    Attribute attribute = getAttribute(id);
    DeleteAttributeCommand command = new DeleteAttributeCommand(this, attribute);
    AttributeEvent event = new AttributeEvent(this, null, attribute, attribute, null);
    beforeAttributeDeleted(event);
    deligate.deleteAttribute(id);
    synchronized (swithJournalLock) {
        journal.store(command);
    }
    attributeDeleted(event);
}
Also used : DeleteAttributeCommand(com.ramussoft.common.journal.command.DeleteAttributeCommand) Attribute(com.ramussoft.common.Attribute) AttributeEvent(com.ramussoft.common.event.AttributeEvent)

Aggregations

Attribute (com.ramussoft.common.Attribute)1 AttributeEvent (com.ramussoft.common.event.AttributeEvent)1 DeleteAttributeCommand (com.ramussoft.common.journal.command.DeleteAttributeCommand)1