Class DefaultCronJobHistoryService

    • Constructor Detail

      • DefaultCronJobHistoryService

        public DefaultCronJobHistoryService()
    • Method Detail

      • getCronJobHistoryBy

        public java.util.List<CronJobHistoryModel> getCronJobHistoryBy​(java.lang.String cronJobCode)
        Specified by:
        getCronJobHistoryBy in interface CronJobHistoryService
        Parameters:
        cronJobCode - given cron job code
        Returns:
        matching cron job history entry for given cron job code.
      • getCronJobHistoryBy

        public java.util.List<CronJobHistoryModel> getCronJobHistoryBy​(java.util.List<java.lang.String> cronJobCodes)
        Specified by:
        getCronJobHistoryBy in interface CronJobHistoryService
        Parameters:
        cronJobCodes - given cron job codes
        Returns:
        matching cron job history entries for given cron job code.
      • getCronJobHistoryBy

        public java.util.List<CronJobHistoryModel> getCronJobHistoryBy​(UserModel userModel,
                                                                       java.lang.String jobItemType,
                                                                       java.util.Date startDate,
                                                                       java.util.Date finishDate)
        Description copied from interface: CronJobHistoryService
        Returns cron job history entries triggered by given user for given job type and time range. Note: Time range means the time period when cron job was performing i.e cron jobs's start date is greater or equal the the given startDate and cron job's finish date is lesser or equal to the given finishDate.
        Specified by:
        getCronJobHistoryBy in interface CronJobHistoryService
        Parameters:
        userModel - given user model
        jobItemType - given job item type - for limit the results to this type only please use following syntax 'SyncItemJob!'.
        startDate - desired time date
        finishDate - desired finish date
        Returns:
        matching cron job history entries
      • getCronJobHistoryBy

        public java.util.List<CronJobHistoryModel> getCronJobHistoryBy​(UserModel userModel,
                                                                       java.lang.String jobItemType,
                                                                       java.util.Date startDate,
                                                                       java.util.Date finishDate,
                                                                       CronJobStatus theStatus)
        Description copied from interface: CronJobHistoryService
        Returns cron job history entries triggered by given user for given job type and time range and the cron job's status. Note: Time range means the time period when cron job was performing i.e cron jobs's start date is greater or equal the the given startDate and cron job's finish date is lesser or equal to the given finishDate.
        Specified by:
        getCronJobHistoryBy in interface CronJobHistoryService
        Parameters:
        userModel - given user model
        jobItemType - given job item type - for limit the results to this type only please use following syntax e.g. 'SyncItemJob!'.
        startDate - desired time date
        finishDate - desired finish date
        theStatus - desired cron job status
        Returns:
        matching cron job history entries
      • getCronJobHistoryBy

        public java.util.List<CronJobHistoryModel> getCronJobHistoryBy​(UserModel userModel,
                                                                       java.lang.String jobItemType,
                                                                       java.util.Date startDate,
                                                                       java.util.Date finishDate,
                                                                       CronJobResult theResult)
        Description copied from interface: CronJobHistoryService
        Returns cron job history entries triggered by given user for given job type and time range and the cron job's result. Note: Time range means the time period when cron job was performing i.e cron jobs's start date is greater or equal the the given startDate and cron job's finish date is lesser or equal to the given finishDate.
        Specified by:
        getCronJobHistoryBy in interface CronJobHistoryService
        Parameters:
        userModel - given user model
        jobItemType - given job item type - for limit the results to this type only please use following syntax e.g. 'SyncItemJob!'.
        startDate - desired time date
        finishDate - desired finish date
        theResult - desired cron job result
        Returns:
        matching cron job history entries
      • getCronJobHistoryBy

        public java.util.List<CronJobHistoryModel> getCronJobHistoryBy​(java.util.Set<CronJobHistoryInclude> includes,
                                                                       UserModel userModel,
                                                                       java.util.Date startDate,
                                                                       java.util.Date finishDate,
                                                                       CronJobStatus theStatus)
        Description copied from interface: CronJobHistoryService
        Returns list of CronJobHistoryModel where for every include criteria entries matching given user, startDate, finishDate and status are returned. Result of all includes in combined into one Note: Time range means the time period when cron job was performing i.e cron jobs's start date is greater or equal the the given startDate and cron job's finish date is lesser or equal to the given finishDate.
        Specified by:
        getCronJobHistoryBy in interface CronJobHistoryService
        Parameters:
        includes - set of search criteria which allow to specify cronJob's type code, job's type code and list of job's codes.
        userModel - given user model
        startDate - given start date
        finishDate - given finish date
        theStatus - given cron job's status
        Returns:
        a CronJobHistoryModel
      • getAverageExecutionTime

        public java.lang.Long getAverageExecutionTime​(UserModel userModel,
                                                      java.lang.String jobCode,
                                                      java.util.concurrent.TimeUnit timeUnit)
        Description copied from interface: CronJobHistoryService
        Returns average execution time based on historical data.
        Specified by:
        getAverageExecutionTime in interface CronJobHistoryService
        Parameters:
        userModel - given user model
        jobCode - code of job to get data for
        timeUnit - time unit to return
        Returns:
        average execution time in given time unit or null if no data is available
      • setCronJobHistoryDao

        public void setCronJobHistoryDao​(CronJobHistoryDao cronJobHistoryDao)