Interface AuditEventDao
- All Superinterfaces:
BaseDao<AuditEvent>
- All Known Implementing Classes:
AuditEventDaoImpl
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T extends Auditable>
Map<T, AuditEvent> getCreateEvents(Collection<T> auditables) Obtain the creation events for the given auditables.Obtain the audit events associated to a given auditable.getLastEvent(Auditable auditable) Obtain the latest event for a given auditable.getLastEvent(Auditable auditable, Class<? extends AuditEventType> type) Obtain the latest event of a given type for a given auditable.getLastEvent(Auditable auditable, Class<? extends AuditEventType> type, Collection<Class<? extends AuditEventType>> excludedTypes) Obtain the latest event of a given type, excluding a certain number of types.<T extends Auditable>
Map<T, AuditEvent> getLastEvents(Class<T> auditableClass, Class<? extends AuditEventType> type) Obtain the latest events of a specified type for all auditable of a given type.<T extends Auditable>
Map<T, AuditEvent> getLastEvents(Collection<T> auditables, Class<? extends AuditEventType> type) Obtain the latest events of a specified type for all given auditables.<T extends Auditable>
Collection<T> getNewSinceDate(Class<T> auditableClass, Date date) Get auditables that have been created since the given date.<T extends Auditable>
Collection<T> getUpdatedSinceDate(Class<T> auditableClass, Date date) Get auditables that have been updated since the given date.
-
Method Details
-
getEvents
Obtain the audit events associated to a given auditable.Events are sorted by date in ascending order.
-
getCreateEvents
Obtain the creation events for the given auditables.If an auditable has more than one creation event (which is in itself a bug), the earliest one is returned.
-
getLastEvent
Obtain the latest event for a given auditable. -
getLastEvent
Obtain the latest event of a given type for a given auditable. -
getLastEvent
@Nullable AuditEvent getLastEvent(Auditable auditable, Class<? extends AuditEventType> type, Collection<Class<? extends AuditEventType>> excludedTypes) Obtain the latest event of a given type, excluding a certain number of types.- Parameters:
type- type of event to retrieve, augmented by its hierarchyexcludedTypes- excluded event types (their hierarchy is also excluded)
-
getLastEvents
<T extends Auditable> Map<T,AuditEvent> getLastEvents(Collection<T> auditables, Class<? extends AuditEventType> type) Obtain the latest events of a specified type for all given auditables.- See Also:
-
getLastEvents
<T extends Auditable> Map<T,AuditEvent> getLastEvents(Class<T> auditableClass, Class<? extends AuditEventType> type) Obtain the latest events of a specified type for all auditable of a given type.- See Also:
-
getNewSinceDate
Get auditables that have been created since the given date. -
getUpdatedSinceDate
Get auditables that have been updated since the given date.
-