Package com.avoka.fc.core.dao
Class ErrorLogDao
- java.lang.Object
-
- com.avoka.core.dao.BaseDao
-
- com.avoka.fc.core.dao.AbstractDao
-
- com.avoka.fc.core.dao.ErrorLogDao
-
public class ErrorLogDao extends AbstractDao
Provides a DAO for the ErrorLog entity.- See Also:
ErrorLog
-
-
Field Summary
Fields Modifier and Type Field Description static String
FILTER_EQUAL
The 'Equal' filter operator..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 ErrorLogDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ErrorLog
getErrorLogForId(Object id)
Return the error log record with the specified OIDIterable<Map>
getErrorLogList(String clientId, String errorId, String submissionId, String portalId, String name, String messageFilter, String message, Date startDate, Date endDate)
Deprecated.List<ErrorLog>
getErrorLogList(String clientId, String errorId, String submissionId, String portalId, String name, String messageFilter, String message, Date startDate, Date endDate, String errorType, boolean criticalError, boolean groovyError, String serverNodeId, int offset, int pageSize)
Return the list of error log records matching the specified search criteria.List<Pair<Date,Integer>>
getErrorLogTrendData(String errorType, Object portalId, boolean criticalError, boolean groovyError, Date startDate, Date endDate)
Return error log trend data for time period and criteria.List<ErrorLog>
getJobActionErrors(Object jobActionId)
Return the list of error log entries associated with a submission (note: the query uses the generic fetch limit and is thus used in lieu of submission.getErrors() for performance reasons)List<ErrorLog>
getSubmissionErrors(Object submissionId)
Return the list of error log entries associated with a submission (note: the query uses the generic fetch limit and is thus used in lieu of submission.getErrors() for performance reasons)int
purgeErrorLog(int maxAgeDays, int fetchLimit, long maxTimeMs)
Delete error 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.
-
-
Method Detail
-
getErrorLogForId
public ErrorLog getErrorLogForId(Object id)
Return the error log record with the specified OID- Parameters:
id
- the OID- Returns:
- the matching error log record, or null if not found
-
getErrorLogList
public Iterable<Map> getErrorLogList(String clientId, String errorId, String submissionId, String portalId, String name, String messageFilter, String message, Date startDate, Date endDate)
Deprecated.Return the list of error log records matching the specified search criteria.- Parameters:
clientId
- the OID of the client associated with the error log entry (optional)errorId
- the error log OID (optional)submissionId
- the OID of the submission associated with the error log entry (optional)portalId
- the OID of the associated portal (optional)name
- the error log name (optional)messageFilter
- the message filtermessage
- a substring of the error message (optional)startDate
- the lower bound on the error time (optional)endDate
- the upper bound on the error time (optional)- Returns:
- the list of matching error log records
-
getErrorLogList
public List<ErrorLog> getErrorLogList(String clientId, String errorId, String submissionId, String portalId, String name, String messageFilter, String message, Date startDate, Date endDate, String errorType, boolean criticalError, boolean groovyError, String serverNodeId, int offset, int pageSize)
Return the list of error log records matching the specified search criteria.- Parameters:
clientId
- the OID of the client associated with the error log entry (optional)errorId
- the error log OID (optional)submissionId
- the OID of the submission associated with the error log entry (optional)portalId
- the OID of the associated portal (optional)name
- the error log name (optional)messageFilter
- the message filtermessage
- a substring of the error message (optional)startDate
- the lower bound on the error time (optional)endDate
- the upper bound on the error time (optional)errorType
- the type of error (optional)criticalError
- specify whether a critical errorgroovyError
- specify whether a groovy script errorserverNodeId
- the server node ID (optional)offset
- the offset to be used in the querypageSize
- the number of items to be returned- Returns:
- the list of matching error log records
- Since:
- 4.3.4
-
purgeErrorLog
public int purgeErrorLog(int maxAgeDays, int fetchLimit, long maxTimeMs)
Delete error 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)- Returns:
- the number of records that were deleted
-
getSubmissionErrors
public List<ErrorLog> getSubmissionErrors(Object submissionId)
Return the list of error log entries associated with a submission (note: the query uses the generic fetch limit and is thus used in lieu of submission.getErrors() for performance reasons)- Parameters:
submissionId
- the OID of a valid submission- Returns:
- the list of error log entries for the submission
-
getJobActionErrors
public List<ErrorLog> getJobActionErrors(Object jobActionId)
Return the list of error log entries associated with a submission (note: the query uses the generic fetch limit and is thus used in lieu of submission.getErrors() for performance reasons)- Parameters:
jobActionId
- the OID of a valid submission- Returns:
- the list of error log entries for the submission
-
getErrorLogTrendData
public List<Pair<Date,Integer>> getErrorLogTrendData(String errorType, Object portalId, boolean criticalError, boolean groovyError, Date startDate, Date endDate)
Return error log trend data for time period and criteria.- Parameters:
errorType
- the error type (optional)portalId
- the OID of the portal to filter on (optional)criticalError
- is a critical errorgroovyError
- is a groovy errorstartDate
- the start date/time (required)endDate
- the end date/time (required)- Returns:
- trend data for the selected period
- Since:
- 4.3.4
-
-