@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)
EntityLogAPIprocessLoggingForCurrentThread in interface EntityLogAPIenabled - entity logging disabled if false, enabled otherwise.public boolean isLoggingForCurrentThread()
isLoggingForCurrentThread in interface EntityLogAPIEntityLogAPI.processLoggingForCurrentThread(boolean)public void flush()
EntityLogAPIEntityLogAPI.registerCreate(Entity) and other registration methods
to the database.flush in interface EntityLogAPIpublic boolean isEnabled()
isEnabled in interface EntityLogAPIpublic void setEnabled(boolean enabled)
setEnabled in interface EntityLogAPIpublic void invalidateCache()
EntityLogAPIinvalidateCache in interface EntityLogAPIpublic void registerCreate(Entity entity)
EntityLogAPIregisterCreate in interface EntityLogAPIpublic void registerCreate(Entity entity, boolean auto)
EntityLogAPIauto parameter).registerCreate in interface EntityLogAPIpublic void registerModify(Entity entity)
EntityLogAPIregisterModify in interface EntityLogAPIpublic void registerModify(Entity entity, boolean auto)
EntityLogAPIauto parameter).registerModify in interface EntityLogAPIpublic void registerModify(Entity entity, boolean auto, @Nullable EntityAttributeChanges changes)
EntityLogAPIauto parameter).registerModify in interface EntityLogAPIchanges - attribute changes provided by callerpublic void registerDelete(Entity entity)
EntityLogAPIregisterDelete in interface EntityLogAPIpublic void registerDelete(Entity entity, boolean auto)
EntityLogAPIauto parameter).registerDelete in interface EntityLogAPI