Class OpenbravoDriverDelegate

  • All Implemented Interfaces:
    org.quartz.impl.jdbcjobstore.DriverDelegate

    public class OpenbravoDriverDelegate
    extends Object
    implements org.quartz.impl.jdbcjobstore.DriverDelegate
    Adds a wrapper DriverDelegate, that will wrap OpenbravoPostgreJDBCDelegate or OpenbravoOracleJDBCDelegate depending on the value of bbdd.rdbms in Openbravo.properties
    • Constructor Detail

      • OpenbravoDriverDelegate

        public OpenbravoDriverDelegate()
    • Method Detail

      • initialize

        public void initialize​(org.slf4j.Logger logger,
                               String tablePrefix,
                               String schedName,
                               String instanceId,
                               org.quartz.spi.ClassLoadHelper classLoadHelper,
                               boolean useProperties,
                               String initString)
                        throws org.quartz.impl.jdbcjobstore.NoSuchDelegateException
        Specified by:
        initialize in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        org.quartz.impl.jdbcjobstore.NoSuchDelegateException
      • updateTriggerStatesFromOtherStates

        public int updateTriggerStatesFromOtherStates​(Connection conn,
                                                      String newState,
                                                      String oldState1,
                                                      String oldState2)
                                               throws SQLException
        Specified by:
        updateTriggerStatesFromOtherStates in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectMisfiredTriggers

        public List<org.quartz.TriggerKey> selectMisfiredTriggers​(Connection conn,
                                                                  long ts)
                                                           throws SQLException
        Specified by:
        selectMisfiredTriggers in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectMisfiredTriggersInState

        public List<org.quartz.TriggerKey> selectMisfiredTriggersInState​(Connection conn,
                                                                         String state,
                                                                         long ts)
                                                                  throws SQLException
        Specified by:
        selectMisfiredTriggersInState in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • hasMisfiredTriggersInState

        public boolean hasMisfiredTriggersInState​(Connection conn,
                                                  String state1,
                                                  long ts,
                                                  int count,
                                                  List<org.quartz.TriggerKey> resultList)
                                           throws SQLException
        Specified by:
        hasMisfiredTriggersInState in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • countMisfiredTriggersInState

        public int countMisfiredTriggersInState​(Connection conn,
                                                String state1,
                                                long ts)
                                         throws SQLException
        Specified by:
        countMisfiredTriggersInState in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectMisfiredTriggersInGroupInState

        public List<org.quartz.TriggerKey> selectMisfiredTriggersInGroupInState​(Connection conn,
                                                                                String groupName,
                                                                                String state,
                                                                                long ts)
                                                                         throws SQLException
        Specified by:
        selectMisfiredTriggersInGroupInState in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • deleteFiredTriggers

        public int deleteFiredTriggers​(Connection conn)
                                throws SQLException
        Specified by:
        deleteFiredTriggers in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • deleteFiredTriggers

        public int deleteFiredTriggers​(Connection conn,
                                       String instanceId)
                                throws SQLException
        Specified by:
        deleteFiredTriggers in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectTriggerKeysForJob

        public List<org.quartz.TriggerKey> selectTriggerKeysForJob​(Connection conn,
                                                                   org.quartz.JobKey jobKey)
                                                            throws SQLException
        Specified by:
        selectTriggerKeysForJob in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • deleteJobDetail

        public int deleteJobDetail​(Connection conn,
                                   org.quartz.JobKey jobKey)
                            throws SQLException
        Specified by:
        deleteJobDetail in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • isJobNonConcurrent

        public boolean isJobNonConcurrent​(Connection conn,
                                          org.quartz.JobKey jobKey)
                                   throws SQLException
        Specified by:
        isJobNonConcurrent in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • jobExists

        public boolean jobExists​(Connection conn,
                                 org.quartz.JobKey jobKey)
                          throws SQLException
        Specified by:
        jobExists in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectNumJobs

        public int selectNumJobs​(Connection conn)
                          throws SQLException
        Specified by:
        selectNumJobs in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectJobsInGroup

        public Set<org.quartz.JobKey> selectJobsInGroup​(Connection conn,
                                                        org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> matcher)
                                                 throws SQLException
        Specified by:
        selectJobsInGroup in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • triggerExists

        public boolean triggerExists​(Connection conn,
                                     org.quartz.TriggerKey triggerKey)
                              throws SQLException
        Specified by:
        triggerExists in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • updateTriggerState

        public int updateTriggerState​(Connection conn,
                                      org.quartz.TriggerKey triggerKey,
                                      String state)
                               throws SQLException
        Specified by:
        updateTriggerState in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • updateTriggerStateFromOtherState

        public int updateTriggerStateFromOtherState​(Connection conn,
                                                    org.quartz.TriggerKey triggerKey,
                                                    String newState,
                                                    String oldState)
                                             throws SQLException
        Specified by:
        updateTriggerStateFromOtherState in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • updateTriggerStateFromOtherStates

        public int updateTriggerStateFromOtherStates​(Connection conn,
                                                     org.quartz.TriggerKey triggerKey,
                                                     String newState,
                                                     String oldState1,
                                                     String oldState2,
                                                     String oldState3)
                                              throws SQLException
        Specified by:
        updateTriggerStateFromOtherStates in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • updateTriggerGroupStateFromOtherStates

        public int updateTriggerGroupStateFromOtherStates​(Connection conn,
                                                          org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> matcher,
                                                          String newState,
                                                          String oldState1,
                                                          String oldState2,
                                                          String oldState3)
                                                   throws SQLException
        Specified by:
        updateTriggerGroupStateFromOtherStates in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • updateTriggerGroupStateFromOtherState

        public int updateTriggerGroupStateFromOtherState​(Connection conn,
                                                         org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> matcher,
                                                         String newState,
                                                         String oldState)
                                                  throws SQLException
        Specified by:
        updateTriggerGroupStateFromOtherState in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • updateTriggerStatesForJob

        public int updateTriggerStatesForJob​(Connection conn,
                                             org.quartz.JobKey jobKey,
                                             String state)
                                      throws SQLException
        Specified by:
        updateTriggerStatesForJob in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • updateTriggerStatesForJobFromOtherState

        public int updateTriggerStatesForJobFromOtherState​(Connection conn,
                                                           org.quartz.JobKey jobKey,
                                                           String state,
                                                           String oldState)
                                                    throws SQLException
        Specified by:
        updateTriggerStatesForJobFromOtherState in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • deleteTrigger

        public int deleteTrigger​(Connection conn,
                                 org.quartz.TriggerKey triggerKey)
                          throws SQLException
        Specified by:
        deleteTrigger in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectNumTriggersForJob

        public int selectNumTriggersForJob​(Connection conn,
                                           org.quartz.JobKey jobKey)
                                    throws SQLException
        Specified by:
        selectNumTriggersForJob in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectTriggerState

        public String selectTriggerState​(Connection conn,
                                         org.quartz.TriggerKey triggerKey)
                                  throws SQLException
        Specified by:
        selectTriggerState in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectTriggerStatus

        public org.quartz.impl.jdbcjobstore.TriggerStatus selectTriggerStatus​(Connection conn,
                                                                              org.quartz.TriggerKey triggerKey)
                                                                       throws SQLException
        Specified by:
        selectTriggerStatus in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectNumTriggers

        public int selectNumTriggers​(Connection conn)
                              throws SQLException
        Specified by:
        selectNumTriggers in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectTriggerGroups

        public List<String> selectTriggerGroups​(Connection conn,
                                                org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> matcher)
                                         throws SQLException
        Specified by:
        selectTriggerGroups in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectTriggersInGroup

        public Set<org.quartz.TriggerKey> selectTriggersInGroup​(Connection conn,
                                                                org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> matcher)
                                                         throws SQLException
        Specified by:
        selectTriggersInGroup in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectTriggersInState

        public List<org.quartz.TriggerKey> selectTriggersInState​(Connection conn,
                                                                 String state)
                                                          throws SQLException
        Specified by:
        selectTriggersInState in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • insertPausedTriggerGroup

        public int insertPausedTriggerGroup​(Connection conn,
                                            String groupName)
                                     throws SQLException
        Specified by:
        insertPausedTriggerGroup in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • deletePausedTriggerGroup

        public int deletePausedTriggerGroup​(Connection conn,
                                            String groupName)
                                     throws SQLException
        Specified by:
        deletePausedTriggerGroup in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • deletePausedTriggerGroup

        public int deletePausedTriggerGroup​(Connection conn,
                                            org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> matcher)
                                     throws SQLException
        Specified by:
        deletePausedTriggerGroup in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • deleteAllPausedTriggerGroups

        public int deleteAllPausedTriggerGroups​(Connection conn)
                                         throws SQLException
        Specified by:
        deleteAllPausedTriggerGroups in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • isTriggerGroupPaused

        public boolean isTriggerGroupPaused​(Connection conn,
                                            String groupName)
                                     throws SQLException
        Specified by:
        isTriggerGroupPaused in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectPausedTriggerGroups

        public Set<String> selectPausedTriggerGroups​(Connection conn)
                                              throws SQLException
        Specified by:
        selectPausedTriggerGroups in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • isExistingTriggerGroup

        public boolean isExistingTriggerGroup​(Connection conn,
                                              String groupName)
                                       throws SQLException
        Specified by:
        isExistingTriggerGroup in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • calendarExists

        public boolean calendarExists​(Connection conn,
                                      String calendarName)
                               throws SQLException
        Specified by:
        calendarExists in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • calendarIsReferenced

        public boolean calendarIsReferenced​(Connection conn,
                                            String calendarName)
                                     throws SQLException
        Specified by:
        calendarIsReferenced in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • deleteCalendar

        public int deleteCalendar​(Connection conn,
                                  String calendarName)
                           throws SQLException
        Specified by:
        deleteCalendar in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectNumCalendars

        public int selectNumCalendars​(Connection conn)
                               throws SQLException
        Specified by:
        selectNumCalendars in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectNextFireTime

        @Deprecated
        public long selectNextFireTime​(Connection conn)
                                throws SQLException
        Deprecated.
        Specified by:
        selectNextFireTime in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectTriggerForFireTime

        public org.quartz.utils.Key<?> selectTriggerForFireTime​(Connection conn,
                                                                long fireTime)
                                                         throws SQLException
        Specified by:
        selectTriggerForFireTime in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectTriggerToAcquire

        @Deprecated
        public List<org.quartz.TriggerKey> selectTriggerToAcquire​(Connection conn,
                                                                  long noLaterThan,
                                                                  long noEarlierThan)
                                                           throws SQLException
        Deprecated.
        Specified by:
        selectTriggerToAcquire in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectTriggerToAcquire

        public List<org.quartz.TriggerKey> selectTriggerToAcquire​(Connection conn,
                                                                  long noLaterThan,
                                                                  long noEarlierThan,
                                                                  int maxCount)
                                                           throws SQLException
        Specified by:
        selectTriggerToAcquire in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • insertFiredTrigger

        public int insertFiredTrigger​(Connection conn,
                                      org.quartz.spi.OperableTrigger trigger,
                                      String state,
                                      org.quartz.JobDetail jobDetail)
                               throws SQLException
        Specified by:
        insertFiredTrigger in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • updateFiredTrigger

        public int updateFiredTrigger​(Connection conn,
                                      org.quartz.spi.OperableTrigger trigger,
                                      String state,
                                      org.quartz.JobDetail jobDetail)
                               throws SQLException
        Specified by:
        updateFiredTrigger in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectFiredTriggerRecords

        public List<org.quartz.impl.jdbcjobstore.FiredTriggerRecord> selectFiredTriggerRecords​(Connection conn,
                                                                                               String triggerName,
                                                                                               String groupName)
                                                                                        throws SQLException
        Specified by:
        selectFiredTriggerRecords in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectFiredTriggerRecordsByJob

        public List<org.quartz.impl.jdbcjobstore.FiredTriggerRecord> selectFiredTriggerRecordsByJob​(Connection conn,
                                                                                                    String jobName,
                                                                                                    String groupName)
                                                                                             throws SQLException
        Specified by:
        selectFiredTriggerRecordsByJob in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectInstancesFiredTriggerRecords

        public List<org.quartz.impl.jdbcjobstore.FiredTriggerRecord> selectInstancesFiredTriggerRecords​(Connection conn,
                                                                                                        String instanceName)
                                                                                                 throws SQLException
        Specified by:
        selectInstancesFiredTriggerRecords in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectFiredTriggerInstanceNames

        public Set<String> selectFiredTriggerInstanceNames​(Connection conn)
                                                    throws SQLException
        Specified by:
        selectFiredTriggerInstanceNames in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • deleteFiredTrigger

        public int deleteFiredTrigger​(Connection conn,
                                      String entryId)
                               throws SQLException
        Specified by:
        deleteFiredTrigger in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectJobExecutionCount

        public int selectJobExecutionCount​(Connection conn,
                                           org.quartz.JobKey jobKey)
                                    throws SQLException
        Specified by:
        selectJobExecutionCount in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • insertSchedulerState

        public int insertSchedulerState​(Connection conn,
                                        String instanceId,
                                        long checkInTime,
                                        long interval)
                                 throws SQLException
        Specified by:
        insertSchedulerState in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • deleteSchedulerState

        public int deleteSchedulerState​(Connection conn,
                                        String instanceId)
                                 throws SQLException
        Specified by:
        deleteSchedulerState in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • updateSchedulerState

        public int updateSchedulerState​(Connection conn,
                                        String instanceId,
                                        long checkInTime)
                                 throws SQLException
        Specified by:
        updateSchedulerState in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • selectSchedulerStateRecords

        public List<org.quartz.impl.jdbcjobstore.SchedulerStateRecord> selectSchedulerStateRecords​(Connection conn,
                                                                                                   String instanceId)
                                                                                            throws SQLException
        Specified by:
        selectSchedulerStateRecords in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException
      • clearData

        public void clearData​(Connection conn)
                       throws SQLException
        Specified by:
        clearData in interface org.quartz.impl.jdbcjobstore.DriverDelegate
        Throws:
        SQLException