public class JournalData
extends sirius.db.mixing.Composite
To skip a field, a NoJournal
annotation can be placed. To skip a record entirely, setSilent(boolean)
can be called before the update or delete.
Constructor and Description |
---|
JournalData(sirius.db.mixing.BaseEntity<?> owner)
Creates a new instance for the given entity.
|
Modifier and Type | Method and Description |
---|---|
static void |
addJournalEntry(sirius.db.mixing.BaseEntity<?> entity,
String changes)
Adds an entry to the journal of the given entity.
|
String |
getProtocolUri() |
boolean |
hasJournaledChanges()
Determines if there are recordable changes in the referenced entity.
|
boolean |
isSilent()
Determines if the next change should be skipped (not recorded).
|
protected void |
onDelete() |
protected void |
onSave() |
void |
setSilent(boolean silent)
Sets the skip flag.
|
public JournalData(sirius.db.mixing.BaseEntity<?> owner)
owner
- the entity which fields are to be recorded.protected void onSave()
public static void addJournalEntry(sirius.db.mixing.BaseEntity<?> entity, String changes)
entity
- the entity to write a journal entry forchanges
- the entry to add to the journalprotected void onDelete()
public boolean isSilent()
public void setSilent(boolean silent)
Calling this with true, will skip all changes performed on the referenced entity instance.
silent
- true to skip the recording of all changes on the referenced entity instance,
false to re-enable.public boolean hasJournaledChanges()
public String getProtocolUri()
Copyright © 2018. All rights reserved.