Package com.avoka.fc.core.dao
Class GroovyServiceLogDao
java.lang.Object
com.avoka.core.dao.BaseDao
com.avoka.fc.core.dao.AbstractDao
com.avoka.fc.core.dao.GroovyServiceLogDao
Provides a Groovy Service Log DAO class.
- Since:
- 4.2.0
-
Field Summary
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetGroovyServiceLog
(Submission submission) Return the list of service log entries for the given submission, if any.getGroovyServiceLog
(String clientId, String serviceType, String serviceId, String status, Integer minDuration, Submission submission, String sessionId, String logMessage, Date startDate, Date endDate, int pageSize, int fetchLimit) Return the list of GroovyServiceLog records for the given query parameters.getGroovyServiceLogForService
(ServiceDefinition service, String clientId, int fetchLimit) Return the list of GroovyServiceLog records for the specified service.getLogForID
(Long id) Return the GroovyServiceLog record for the id, or null if not found.int
purgeGroovyServiceLog
(int maxAgeDays, int fetchLimit, long maxTimeMs) Delete GroovyServiceLog 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
-
Constructor Details
-
GroovyServiceLogDao
public GroovyServiceLogDao()
-
-
Method Details
-
getLogForID
Return the GroovyServiceLog record for the id, or null if not found.- Parameters:
id
- the GroovyServiceLog record id (optional)- Returns:
- the GroovyServiceLog record for the id, or null if not found
- Since:
- 17.10.0
-
getGroovyServiceLog
public List<GroovyServiceLog> getGroovyServiceLog(String clientId, String serviceType, String serviceId, String status, Integer minDuration, Submission submission, String sessionId, String logMessage, Date startDate, Date endDate, int pageSize, int fetchLimit) Return the list of GroovyServiceLog records for the given query parameters.- Parameters:
clientId
- the client idserviceType
- the service typeserviceId
- the service definition idstatus
- the service status invocation [ 'Completed' | 'Error' ]minDuration
- the minimum duration in mssubmission
- the submission recordsessionId
- the user session idlogMessage
- the log messagestartDate
- the start dateendDate
- the end datepageSize
- the query page sizefetchLimit
- the query fetch limit- Returns:
- the list of GroovyServiceLog records for the given query parameters
-
getGroovyServiceLog
Return the list of service log entries for the given submission, if any. The results will be sorted by invocation time.- Parameters:
submission
- the submission (required)- Returns:
- the matching list of Groovy service logs
- Since:
- 17.10.0
-
getGroovyServiceLogForService
public List<GroovyServiceLog> getGroovyServiceLogForService(ServiceDefinition service, String clientId, int fetchLimit) Return the list of GroovyServiceLog records for the specified service.- Parameters:
service
- the service definition (required)clientId
- the client id (optional)fetchLimit
- the maximum number of rows to return- Returns:
- the list of GroovyServiceLog records for the given query parameters
- Since:
- 4.3.0
-
purgeGroovyServiceLog
public int purgeGroovyServiceLog(int maxAgeDays, int fetchLimit, long maxTimeMs) Delete GroovyServiceLog records older than a specified number of days.- Parameters:
maxAgeDays
- The age in days above which records will be deleted.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
-