Class RequestLogDao


  • public class RequestLogDao
    extends AbstractDao
    Provides a DAO for the RequestLog entity.
    See Also:
    RequestLog
    • Constructor Detail

      • RequestLogDao

        public RequestLogDao()
    • Method Detail

      • getRequestLog

        public RequestLog getRequestLog​(Object id)
        Return the request log with the specified OID
        Parameters:
        id - the OID
        Returns:
        the matching request log, or null if not found
      • getSubmissionFormRequests

        public List<RequestLog> getSubmissionFormRequests​(Submission submission)
        Return the form request logs for the given submission.
        Parameters:
        submission - the submission (required)
        Returns:
        the form request logs for the given submission
        Since:
        4.3.3
      • getRequestLogFromKey

        public RequestLog getRequestLogFromKey​(String requestLogKey)
        Return the request log with the given surrogate key
        Parameters:
        requestLogKey - the request log surrogate key
        Returns:
        the request log
      • getRequestLogList

        public List<RequestLog> getRequestLogList​(String clientId,
                                                  String formName,
                                                  String version,
                                                  String renderMode,
                                                  String receiptMode,
                                                  Date startDate,
                                                  Date endDate,
                                                  int offset,
                                                  int pageSize)
        Return information about request log entries matching the specified search criteria, ordered by request time
        Parameters:
        clientId - the OID of the client associated with the request log (optional)
        formName - the form code of the form associated with the request log (optional)
        version - the version number of the template version associated with the request log (optional)
        renderMode - the render mode, one of RequestLog.MODES (optional)
        receiptMode - the receipt mode, one of RequestLog.RECEIPT_MODES (optional)
        startDate - the lower bound on the request time (optional)
        endDate - the upper bound on the request time (optional)
        offset - the offset to be used in the query
        pageSize - the number of items to be returned
        Returns:
        a list of matching request log entries
        Since:
        4.3.4
      • getRequestLogList

        public List<RequestLog> getRequestLogList​(Long clientId,
                                                  Long formId,
                                                  String version,
                                                  String renderMode,
                                                  String receiptMode,
                                                  Date startDate,
                                                  Date endDate,
                                                  int fetchLimit)
        Return information about request log entries matching the specified search criteria, ordered by request time
        Parameters:
        clientId - the OID of the client associated with the request log (optional)
        formId - the form id form associated with the request log (optional)
        version - the version number of the template version associated with the request log (optional)
        renderMode - the render mode, one of RequestLog.MODES (optional)
        receiptMode - the receipt mode, one of RequestLog.RECEIPT_MODES (optional)
        startDate - the lower bound on the request time (optional)
        endDate - the upper bound on the request time (optional)
        fetchLimit - the query fetch limit
        Returns:
        a list of matching request log entries
        Since:
        18.5.0
      • getRequestCount

        public int getRequestCount​(String clientId,
                                   String formName,
                                   String version,
                                   String renderMode,
                                   String receiptMode,
                                   String portalServerId,
                                   String formServerId,
                                   Date startDate,
                                   Date endDate)
        Return the number of request log entries matching the specified search criteria
        Parameters:
        clientId - the OID of the client associated with the request log (optional)
        formName - the form code of the form associated with the request log (optional)
        version - the version number of the template version associated with the request log (optional)
        renderMode - the render mode, one of RequestLog.MODES (optional)
        receiptMode - the receipt mode, one of RequestLog.RECEIPT_MODES (optional)
        portalServerId - the associated portal server id
        formServerId - the associated form server id
        startDate - the lower bound on the request time (optional)
        endDate - the upper bound on the request time (optional)
        Returns:
        the number of matching request log entries
      • getRequestLogStatistics

        public List<org.apache.cayenne.DataRow> getRequestLogStatistics​(String clientId,
                                                                        String formId,
                                                                        Date startDate,
                                                                        Date endDate,
                                                                        int pageSize)
        Return information about request log metric entries matching the specified search criteria, ordered by request time
        Parameters:
        clientId - the OID of the client associated with the request log (optional)
        formId - the OID of the form associated with the request log (optional)
        startDate - the lower bound on the request time (optional)
        endDate - the upper bound on the request time (optional)
        pageSize - the number of items to be returned
        Returns:
        a list of render times for the matching request log metric entries
        Since:
        4.0.0
      • getRequestLogStatistics

        public List<org.apache.cayenne.DataRow> getRequestLogStatistics​(String clientId,
                                                                        String formId,
                                                                        Date startDate,
                                                                        Date endDate,
                                                                        String renderMode,
                                                                        int pageSize)
        Return information about request log metric entries matching the specified search criteria, ordered by request time
        Parameters:
        clientId - the OID of the client associated with the request log (optional)
        formId - the OID of the form associated with the request log (optional)
        startDate - the lower bound on the request time (optional)
        endDate - the upper bound on the request time (optional)
        renderMode - the request log render mode parameter (required)
        pageSize - the number of items to be returned
        Returns:
        a list of render times for the matching request log metric entries
        Since:
        4.3.3
      • getRequestLogTrend

        public List<org.apache.cayenne.DataRow> getRequestLogTrend​(String clientId,
                                                                   String formId,
                                                                   String version,
                                                                   int fetchLimit)
        Return information about request log trend entries matching the specified search criteria, ordered by request time. Data Row Format:
         { number: 16, date: 2014-06-13 00:00:00 }
         { number: 26, date: 2014-06-14 00:00:00 }
         { number: 31, date: 2014-06-16 00:00:00 }
         
        Parameters:
        clientId - the OID of the client associated with the request log (optional)
        formId - the OID of the form associated with the request log (optional)
        version - the version number of the template version associated with the request log (optional)
        fetchLimit - the maximum number of records to return
        Returns:
        a list of render times for the matching request log metric entries
        Since:
        4.1.0
      • getPurgeRequestList

        public List<RequestLog> getPurgeRequestList​(int fetchLimit)
        Return the list of requests that can be purged. This query considers only request logs without a submission (special case for PDF forms where the request log may be kept after the submission has gone)
        Parameters:
        fetchLimit - the query fetch limit
        Returns:
        the list of requests to purge
        Since:
        5.1.0