public class DbLogManager extends java.lang.Object implements LogManager
Modifier and Type | Field and Description |
---|---|
private ChangeHistoryData |
history |
private LogControl |
logControl |
Constructor and Description |
---|
DbLogManager(LogControl logControl) |
Modifier and Type | Method and Description |
---|---|
void |
afterCommit()
Called after a successful commit of changes to the database.
|
void |
afterRollback()
Called after rollback.
|
private void |
createHistory() |
LogControl |
getLogControl()
Get the log controller that is used in this transaction.
|
void |
logChangeDetails(ChangeHistoryDetailData changeDetails,
EntityDetails entityDetails)
Log the given details to the database.
|
void |
logChangeDetails(java.util.Collection<ChangeHistoryDetailData> changeDetails,
EntityDetails entityDetails)
Log the given details to the database.
|
private final LogControl logControl
private ChangeHistoryData history
public DbLogManager(LogControl logControl)
public void afterCommit()
LogManager
afterCommit
in interface LogManager
public void afterRollback()
LogManager
afterRollback
in interface LogManager
public LogControl getLogControl()
LogManager
getLogControl
in interface LogManager
public void logChangeDetails(ChangeHistoryDetailData changeDetails, EntityDetails entityDetails)
ChangeHistoryDetailData.setChangeHistory(ChangeHistoryData)
is automatically populated (and saved if needed) with information
from the current transaction.public void logChangeDetails(java.util.Collection<ChangeHistoryDetailData> changeDetails, EntityDetails entityDetails)
ChangeHistoryDetailData.setChangeHistory(ChangeHistoryData)
is automatically populated (and saved if needed) with information
from the current transaction.private void createHistory()