Package com.avoka.fc.core.dao
Class EventLogDao
java.lang.Object
com.avoka.core.dao.BaseDao
com.avoka.fc.core.dao.AbstractDao
com.avoka.fc.core.dao.EventLogDao
Provides a DAO for the EventLog entity.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The 'Equal' filter operator..static final String
The 'Exclude' filter.static final String
The 'Include' filter.static final String
The 'Like' filter operator.static final String
The 'Not Equal' filter operator.static final String
The 'Not Like' filter operator..static final String[]
The filter operators.Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetEventLogList
(Long clientId, String eventId, String type, String messageFilter, String message, String submissionId, String submissionFilter, Date startDate, Date endDate, String sortBy, boolean ascending, int pageSize, int fetchLimit) Return a list of event log records matching the specified search criteria.getEventLogList
(String eventId, String type, String messageFilter, String message, String submissionId, String submissionFilter, Date startDate, Date endDate, String sortBy, boolean ascending, int pageSize, int fetchLimit) Return a list of event log records matching the specified search criteria.getEventLogList
(String eventId, String type, String messageFilter, String message, String submissionId, Date startDate, Date endDate, String sortBy, boolean ascending, int pageSize) Return a list of event log records matching the specified search criteria.getSubmissionEvents
(Object submissionId) Return the list of event log entries associated with a submission (note: the query uses the generic fetch limit and is thus used in lieu of submission.getEvents() for performance reasons)boolean
hasLoggedRecentEvent
(String type, String message, int periodMins) Return true if an event of the given type and message has been logged with the specified period.int
purgeEventLog
(int maxAgeDays, int fetchLimit, long maxTimeMs) Delete event log records older than a specified number of daysMethods inherited from class com.avoka.fc.core.dao.AbstractDao
andFilterClientExcludeNull, andFilterClientIncludeNull, andFilterClientOnly, isClientAccessAllowed, performQueryConfigCached
Methods inherited from class com.avoka.core.dao.BaseDao
addOrdering, addOrderingCaseInsensitive, addOrderingCaseSensitive, andQueryBetween, andQueryInExp, andQueryInExp, andQueryLikeIgnoreCaseExp, andQueryMatchDbExp, andQueryMatchExp, andQueryMatchIsNotNull, andQueryMatchIsNull, andQueryNoMatchExp, andQueryNotTrue, deleteObject, deleteObjects, findObject, getDataContext, getFetchLimit, getLogger, getObjectForPK, newObject, orQueryLikeIgnoreCaseExp, orQueryMatchExp, performNamedQuery, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, performQuery, registerNewObject, setCacheStrategy, setFetchLimit, setLocalCacheStrategy, setLocalCacheStrategy, setSharedCacheStrategy, toMap, toMap
-
Field Details
-
FILTER_LIKE
The 'Like' filter operator.- See Also:
-
FILTER_NOT_LIKE
The 'Not Like' filter operator..- See Also:
-
FILTER_EQUAL
The 'Equal' filter operator..- See Also:
-
FILTER_NOT_EQUAL
The 'Not Equal' filter operator.- See Also:
-
MESSAGE_FILTER_OPERATORS
The filter operators. -
FILTER_INCLUDE
The 'Include' filter.- See Also:
-
FILTER_EXCLUDE
The 'Exclude' filter.- See Also:
-
-
Constructor Details
-
EventLogDao
public EventLogDao()
-
-
Method Details
-
getEventLogList
public List<EventLog> getEventLogList(String eventId, String type, String messageFilter, String message, String submissionId, Date startDate, Date endDate, String sortBy, boolean ascending, int pageSize) Return a list of event log records matching the specified search criteria.- Parameters:
eventId
- the OID of the event (optional)type
- the event type (optional)messageFilter
- the message filtermessage
- a substring of the event message (optional)submissionId
- the OID of the submission associated with the event (optional)startDate
- the lower bound on the event time (optional)endDate
- the upper bound on the event time (optional)sortBy
- the attribute to sort by (optional, defaults to event time if not set)ascending
- whether to sort in ascending order (applies only if sortBy is set)pageSize
- the page size to use in the query- Returns:
- the list of matching event log records
-
getEventLogList
public List<EventLog> getEventLogList(String eventId, String type, String messageFilter, String message, String submissionId, String submissionFilter, Date startDate, Date endDate, String sortBy, boolean ascending, int pageSize, int fetchLimit) Return a list of event log records matching the specified search criteria.- Parameters:
eventId
- the OID of the event (optional)type
- the event type (optional)messageFilter
- the message filtermessage
- a substring of the event message (optional)submissionId
- the OID of the submission associated with the event (optional)submissionFilter
- include submissions filters [ "" | "Include" | "Exclude" ]startDate
- the lower bound on the event time (optional)endDate
- the upper bound on the event time (optional)sortBy
- the attribute to sort by (optional, defaults to event time if not set)ascending
- whether to sort in ascending order (applies only if sortBy is set)pageSize
- the page size to use in the queryfetchLimit
- the query fetch limit- Returns:
- the list of matching event log records
- Since:
- 4.3.0
-
getEventLogList
public List<EventLog> getEventLogList(Long clientId, String eventId, String type, String messageFilter, String message, String submissionId, String submissionFilter, Date startDate, Date endDate, String sortBy, boolean ascending, int pageSize, int fetchLimit) Return a list of event log records matching the specified search criteria.- Parameters:
clientId
- the OID of the client (optional)eventId
- the OID of the event (optional)type
- the event type (optional)messageFilter
- the message filtermessage
- a substring of the event message (optional)submissionId
- the OID of the submission associated with the event (optional)submissionFilter
- include submissions filters [ "" | "Include" | "Exclude" ]startDate
- the lower bound on the event time (optional)endDate
- the upper bound on the event time (optional)sortBy
- the attribute to sort by (optional, defaults to event time if not set)ascending
- whether to sort in ascending order (applies only if sortBy is set)pageSize
- the page size to use in the queryfetchLimit
- the query fetch limit- Returns:
- the list of matching event log records
- Since:
- 19.11.3
-
purgeEventLog
public int purgeEventLog(int maxAgeDays, int fetchLimit, long maxTimeMs) Delete event log records older than a specified number of days- Parameters:
maxAgeDays
- The age in days above which records will be deleted. If this value is negative or equal to 0, no records will be purged.fetchLimit
- the maximum number of records to delete (only used if > 0)maxTimeMs
- the maximum time that can be used to purge records- Returns:
- the number of records that were deleted
-
getSubmissionEvents
Return the list of event log entries associated with a submission (note: the query uses the generic fetch limit and is thus used in lieu of submission.getEvents() for performance reasons)- Parameters:
submissionId
- the OID of a valid submission- Returns:
- the list of event log entries for the submission
-
hasLoggedRecentEvent
Return true if an event of the given type and message has been logged with the specified period.- Parameters:
type
- the event typemessage
- the event messageperiodMins
- the period in minutes- Returns:
- true if an event of the given type and message has been logged with the specified period
- Since:
- 4.1.3
-