Class JobTable


  • public class JobTable
    extends Sql<Job>
    • Constructor Detail

      • JobTable

        public JobTable​(java.sql.Connection connection,
                        Dialect dialect,
                        java.lang.String tablePrefix,
                        JobMapper jobMapper)
    • Method Detail

      • withId

        public JobTable withId​(java.util.UUID id)
      • withScheduledAt

        public JobTable withScheduledAt​(java.time.Instant scheduledBefore)
      • withUpdatedBefore

        public JobTable withUpdatedBefore​(java.time.Instant updatedBefore)
      • save

        public Job save​(Job jobToSave)
                 throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • save

        public java.util.List<Job> save​(java.util.List<Job> jobs)
                                 throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • selectJobById

        public java.util.Optional<Job> selectJobById​(java.util.UUID id)
      • countJobs

        public long countJobs​(StateName state)
                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • selectJobsByState

        public java.util.List<Job> selectJobsByState​(StateName state,
                                                     java.time.Instant updatedBefore,
                                                     PageRequest pageRequest)
      • selectJobsScheduledBefore

        public java.util.List<Job> selectJobsScheduledBefore​(java.time.Instant scheduledBefore,
                                                             PageRequest pageRequest)
      • getDistinctJobSignatures

        public java.util.Set<java.lang.String> getDistinctJobSignatures​(StateName[] states)
      • exists

        public boolean exists​(JobDetails jobDetails,
                              StateName... states)
                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • recurringJobExists

        public boolean recurringJobExists​(java.lang.String recurringJobId,
                                          StateName... states)
                                   throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • deletePermanently

        public int deletePermanently​(java.util.UUID... ids)
                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • deleteJobsByStateAndUpdatedBefore

        public int deleteJobsByStateAndUpdatedBefore​(StateName state,
                                                     java.time.Instant updatedBefore)
                                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException