Class GroovyServiceLogDao


  • public class GroovyServiceLogDao
    extends AbstractDao
    Provides a Groovy Service Log DAO class.
    Since:
    4.2.0
    • Constructor Detail

      • GroovyServiceLogDao

        public GroovyServiceLogDao()
    • Method Detail

      • getLogForID

        public GroovyServiceLog getLogForID​(Long id)
        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 id
        serviceType - the service type
        serviceId - the service definition id
        status - the service status invocation [ 'Completed' | 'Error' ]
        minDuration - the minimum duration in ms
        submission - the submission record
        sessionId - the user session id
        logMessage - the log message
        startDate - the start date
        endDate - the end date
        pageSize - the query page size
        fetchLimit - the query fetch limit
        Returns:
        the list of GroovyServiceLog records for the given query parameters
      • getGroovyServiceLog

        public List<GroovyServiceLog> getGroovyServiceLog​(Submission submission)
        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