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
-
public class EventLogDao extends AbstractDao
Provides a DAO for the EventLog entity.- See Also:
EventLog
-
-
Field Summary
Fields Modifier and Type Field Description static String
FILTER_EQUAL
The 'Equal' filter operator..static String
FILTER_EXCLUDE
The 'Exclude' filter.static String
FILTER_INCLUDE
The 'Include' filter.static String
FILTER_LIKE
The 'Like' filter operator.static String
FILTER_NOT_EQUAL
The 'Not Equal' filter operator.static String
FILTER_NOT_LIKE
The 'Not Like' filter operator..static String[]
MESSAGE_FILTER_OPERATORS
The filter operators.-
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description EventLogDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.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.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.List<EventLog>
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 days-
Methods 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 Detail
-
FILTER_LIKE
public static final String FILTER_LIKE
The 'Like' filter operator.- See Also:
- Constant Field Values
-
FILTER_NOT_LIKE
public static final String FILTER_NOT_LIKE
The 'Not Like' filter operator..- See Also:
- Constant Field Values
-
FILTER_EQUAL
public static final String FILTER_EQUAL
The 'Equal' filter operator..- See Also:
- Constant Field Values
-
FILTER_NOT_EQUAL
public static final String FILTER_NOT_EQUAL
The 'Not Equal' filter operator.- See Also:
- Constant Field Values
-
MESSAGE_FILTER_OPERATORS
public static final String[] MESSAGE_FILTER_OPERATORS
The filter operators.
-
FILTER_INCLUDE
public static final String FILTER_INCLUDE
The 'Include' filter.- See Also:
- Constant Field Values
-
FILTER_EXCLUDE
public static final String FILTER_EXCLUDE
The 'Exclude' filter.- See Also:
- Constant Field Values
-
-
Method Detail
-
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
public List<EventLog> 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)- Parameters:
submissionId
- the OID of a valid submission- Returns:
- the list of event log entries for the submission
-
hasLoggedRecentEvent
public 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.- 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
-
-