@Component(value="cuba_EntityLog") public class EntityLog extends java.lang.Object implements EntityLogAPI
NAME
Constructor and Description |
---|
EntityLog(Configuration configuration) |
Modifier and Type | Method and Description |
---|---|
void |
flush()
Flush records accumulated by invocations of
EntityLogAPI.registerCreate(Entity) and other registration methods
to the database. |
void |
invalidateCache()
Invalidates configuration cache.
|
boolean |
isEnabled() |
boolean |
isLoggingForCurrentThread() |
void |
processLoggingForCurrentThread(boolean enabled)
Disables/enables entity logging for current thread.
|
void |
registerCreate(Entity entity)
Logs creation of an entity which is configured for manual logging (LoggedEntity.auto == false).
|
void |
registerCreate(Entity entity,
boolean auto)
Logs creation of an entity which is configured for auto or manual logging
(depending on the
auto parameter). |
void |
registerDelete(Entity entity)
Logs deletion of an entity which is configured for manual logging (LoggedEntity.auto == false).
|
void |
registerDelete(Entity entity,
boolean auto)
Logs deletion of an entity which is configured for auto or manual logging
(depending on the
auto parameter). |
void |
registerModify(Entity entity)
Logs modification of an entity which is configured for manual logging (LoggedEntity.auto == false).
|
void |
registerModify(Entity entity,
boolean auto)
Logs modification of an entity which is configured for auto or manual logging
(depending on the
auto parameter). |
void |
registerModify(Entity entity,
boolean auto,
EntityAttributeChanges changes)
Logs modification of an entity which is configured for auto or manual logging
(depending on the
auto parameter). |
void |
setEnabled(boolean enabled) |
@Inject public EntityLog(Configuration configuration)
public void processLoggingForCurrentThread(boolean enabled)
EntityLogAPI
processLoggingForCurrentThread
in interface EntityLogAPI
enabled
- entity logging disabled if false, enabled otherwise.public boolean isLoggingForCurrentThread()
isLoggingForCurrentThread
in interface EntityLogAPI
EntityLogAPI.processLoggingForCurrentThread(boolean)
public void flush()
EntityLogAPI
EntityLogAPI.registerCreate(Entity)
and other registration methods
to the database.flush
in interface EntityLogAPI
public boolean isEnabled()
isEnabled
in interface EntityLogAPI
public void setEnabled(boolean enabled)
setEnabled
in interface EntityLogAPI
public void invalidateCache()
EntityLogAPI
invalidateCache
in interface EntityLogAPI
public void registerCreate(Entity entity)
EntityLogAPI
registerCreate
in interface EntityLogAPI
public void registerCreate(Entity entity, boolean auto)
EntityLogAPI
auto
parameter).registerCreate
in interface EntityLogAPI
public void registerModify(Entity entity)
EntityLogAPI
registerModify
in interface EntityLogAPI
public void registerModify(Entity entity, boolean auto)
EntityLogAPI
auto
parameter).registerModify
in interface EntityLogAPI
public void registerModify(Entity entity, boolean auto, @Nullable EntityAttributeChanges changes)
EntityLogAPI
auto
parameter).registerModify
in interface EntityLogAPI
changes
- attribute changes provided by callerpublic void registerDelete(Entity entity)
EntityLogAPI
registerDelete
in interface EntityLogAPI
public void registerDelete(Entity entity, boolean auto)
EntityLogAPI
auto
parameter).registerDelete
in interface EntityLogAPI