Class OracleDelegate
- java.lang.Object
-
- org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-
- org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
-
- All Implemented Interfaces:
Constants,DriverDelegate,StdJDBCConstants
- Direct Known Subclasses:
WebLogicOracleDelegate
public class OracleDelegate extends StdJDBCDelegate
This is a driver delegate for the Oracle 10 and 11 database.
- Author:
- James House, Patrick Lightbody, Eric Mueller
- See Also:
WebLogicDelegate,WebLogicOracleDelegate
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringINSERT_ORACLE_CALENDARstatic java.lang.StringINSERT_ORACLE_JOB_DETAILstatic java.lang.StringSELECT_ORACLE_CALENDAR_BLOBstatic java.lang.StringSELECT_ORACLE_JOB_DETAIL_BLOBstatic java.lang.StringSELECT_ORACLE_TRIGGER_JOB_DETAIL_BLOBstatic java.lang.StringUPDATE_ORACLE_CALENDAR_BLOBstatic java.lang.StringUPDATE_ORACLE_JOB_DETAILstatic java.lang.StringUPDATE_ORACLE_JOB_DETAIL_BLOBstatic java.lang.StringUPDATE_ORACLE_TRIGGERstatic java.lang.StringUPDATE_ORACLE_TRIGGER_JOB_DETAIL_BLOBstatic java.lang.StringUPDATE_ORACLE_TRIGGER_JOB_DETAIL_EMPTY_BLOB-
Fields inherited from class org.quartz.impl.jdbcjobstore.StdJDBCDelegate
classLoadHelper, instanceId, logger, schedName, tablePrefix, triggerPersistenceDelegates, useProperties
-
Fields inherited from interface org.quartz.impl.jdbcjobstore.Constants
ALIAS_COL_NEXT_FIRE_TIME, ALL_GROUPS_PAUSED, COL_BLOB, COL_CALENDAR, COL_CALENDAR_NAME, COL_CHECKIN_INTERVAL, COL_CRON_EXPRESSION, COL_DESCRIPTION, COL_END_TIME, COL_ENTRY_ID, COL_ENTRY_STATE, COL_FIRED_TIME, COL_INSTANCE_NAME, COL_IS_DURABLE, COL_IS_NONCONCURRENT, COL_IS_UPDATE_DATA, COL_IS_VOLATILE, COL_JOB_CLASS, COL_JOB_DATAMAP, COL_JOB_GROUP, COL_JOB_NAME, COL_LAST_CHECKIN_TIME, COL_LOCK_NAME, COL_MISFIRE_INSTRUCTION, COL_NEXT_FIRE_TIME, COL_PREV_FIRE_TIME, COL_PRIORITY, COL_REPEAT_COUNT, COL_REPEAT_INTERVAL, COL_REQUESTS_RECOVERY, COL_SCHED_TIME, COL_SCHEDULER_NAME, COL_START_TIME, COL_TIME_ZONE_ID, COL_TIMES_TRIGGERED, COL_TRIGGER_GROUP, COL_TRIGGER_NAME, COL_TRIGGER_STATE, COL_TRIGGER_TYPE, DEFAULT_TABLE_PREFIX, STATE_ACQUIRED, STATE_BLOCKED, STATE_COMPLETE, STATE_DELETED, STATE_ERROR, STATE_EXECUTING, STATE_MISFIRED, STATE_PAUSED, STATE_PAUSED_BLOCKED, STATE_WAITING, TABLE_BLOB_TRIGGERS, TABLE_CALENDARS, TABLE_CRON_TRIGGERS, TABLE_FIRED_TRIGGERS, TABLE_JOB_DETAILS, TABLE_LOCKS, TABLE_PAUSED_TRIGGERS, TABLE_SCHEDULER_STATE, TABLE_SIMPLE_TRIGGERS, TABLE_TRIGGERS, TTYPE_BLOB, TTYPE_CAL_INT, TTYPE_CRON, TTYPE_DAILY_TIME_INT, TTYPE_SIMPLE
-
Fields inherited from interface org.quartz.impl.jdbcjobstore.StdJDBCConstants
COUNT_MISFIRED_TRIGGERS_IN_STATE, DELETE_ALL_BLOB_TRIGGERS, DELETE_ALL_CALENDARS, DELETE_ALL_CRON_TRIGGERS, DELETE_ALL_JOB_DETAILS, DELETE_ALL_PAUSED_TRIGGER_GRPS, DELETE_ALL_SIMPLE_TRIGGERS, DELETE_ALL_SIMPROP_TRIGGERS, DELETE_ALL_TRIGGERS, DELETE_BLOB_TRIGGER, DELETE_CALENDAR, DELETE_CRON_TRIGGER, DELETE_FIRED_TRIGGER, DELETE_FIRED_TRIGGERS, DELETE_INSTANCES_FIRED_TRIGGERS, DELETE_JOB_DETAIL, DELETE_NO_RECOVERY_FIRED_TRIGGERS, DELETE_PAUSED_TRIGGER_GROUP, DELETE_PAUSED_TRIGGER_GROUPS, DELETE_SCHEDULER_STATE, DELETE_SIMPLE_TRIGGER, DELETE_TRIGGER, INSERT_BLOB_TRIGGER, INSERT_CALENDAR, INSERT_CRON_TRIGGER, INSERT_FIRED_TRIGGER, INSERT_JOB_DETAIL, INSERT_PAUSED_TRIGGER_GROUP, INSERT_SCHEDULER_STATE, INSERT_SIMPLE_TRIGGER, INSERT_TRIGGER, SCHED_NAME_SUBST, SELECT_BLOB_TRIGGER, SELECT_CALENDAR, SELECT_CALENDAR_EXISTENCE, SELECT_CALENDARS, SELECT_CRON_TRIGGER, SELECT_FIRED_TRIGGER, SELECT_FIRED_TRIGGER_GROUP, SELECT_FIRED_TRIGGER_INSTANCE_NAMES, SELECT_FIRED_TRIGGERS, SELECT_FIRED_TRIGGERS_OF_JOB, SELECT_FIRED_TRIGGERS_OF_JOB_GROUP, SELECT_HAS_MISFIRED_TRIGGERS_IN_STATE, SELECT_INSTANCES_FIRED_TRIGGERS, SELECT_INSTANCES_RECOVERABLE_FIRED_TRIGGERS, SELECT_JOB_DETAIL, SELECT_JOB_EXECUTION_COUNT, SELECT_JOB_EXISTENCE, SELECT_JOB_FOR_TRIGGER, SELECT_JOB_GROUPS, SELECT_JOB_NONCONCURRENT, SELECT_JOBS_IN_GROUP, SELECT_JOBS_IN_GROUP_LIKE, SELECT_MISFIRED_TRIGGERS, SELECT_MISFIRED_TRIGGERS_IN_GROUP_IN_STATE, SELECT_MISFIRED_TRIGGERS_IN_STATE, SELECT_NEXT_FIRE_TIME, SELECT_NEXT_TRIGGER_TO_ACQUIRE, SELECT_NUM_CALENDARS, SELECT_NUM_JOBS, SELECT_NUM_TRIGGERS, SELECT_NUM_TRIGGERS_FOR_JOB, SELECT_NUM_TRIGGERS_IN_GROUP, SELECT_PAUSED_TRIGGER_GROUP, SELECT_PAUSED_TRIGGER_GROUPS, SELECT_REFERENCED_CALENDAR, SELECT_SCHEDULER_STATE, SELECT_SCHEDULER_STATES, SELECT_SIMPLE_TRIGGER, SELECT_TRIGGER, SELECT_TRIGGER_DATA, SELECT_TRIGGER_EXISTENCE, SELECT_TRIGGER_FOR_FIRE_TIME, SELECT_TRIGGER_GROUPS, SELECT_TRIGGER_GROUPS_FILTERED, SELECT_TRIGGER_STATE, SELECT_TRIGGER_STATUS, SELECT_TRIGGERS_FOR_CALENDAR, SELECT_TRIGGERS_FOR_JOB, SELECT_TRIGGERS_IN_GROUP, SELECT_TRIGGERS_IN_GROUP_LIKE, SELECT_TRIGGERS_IN_STATE, TABLE_PREFIX_SUBST, UPDATE_BLOB_TRIGGER, UPDATE_CALENDAR, UPDATE_CRON_TRIGGER, UPDATE_FIRED_TRIGGER, UPDATE_JOB_DATA, UPDATE_JOB_DETAIL, UPDATE_JOB_TRIGGER_STATES, UPDATE_JOB_TRIGGER_STATES_FROM_OTHER_STATE, UPDATE_SCHEDULER_STATE, UPDATE_SIMPLE_TRIGGER, UPDATE_TRIGGER, UPDATE_TRIGGER_GROUP_STATE_FROM_STATE, UPDATE_TRIGGER_GROUP_STATE_FROM_STATES, UPDATE_TRIGGER_SKIP_DATA, UPDATE_TRIGGER_STATE, UPDATE_TRIGGER_STATE_FROM_STATE, UPDATE_TRIGGER_STATE_FROM_STATES, UPDATE_TRIGGER_STATES_FROM_OTHER_STATES
-
-
Constructor Summary
Constructors Constructor Description OracleDelegate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectgetJobDataFromBlob(java.sql.ResultSet rs, java.lang.String colName)This method should be overridden by any delegate subclasses that need special handling for BLOBs for job details.protected java.lang.ObjectgetObjectFromBlob(java.sql.ResultSet rs, java.lang.String colName)This method should be overridden by any delegate subclasses that need special handling for BLOBs.intinsertCalendar(java.sql.Connection conn, java.lang.String calendarName, Calendar calendar)Insert a new calendar.intinsertJobDetail(java.sql.Connection conn, JobDetail job)Insert the job detail record.intinsertTrigger(java.sql.Connection conn, OperableTrigger trigger, java.lang.String state, JobDetail jobDetail)Insert the base trigger data.intupdateCalendar(java.sql.Connection conn, java.lang.String calendarName, Calendar calendar)Update a calendar.intupdateJobData(java.sql.Connection conn, JobDetail job)Update the job data map for the given job.intupdateJobDetail(java.sql.Connection conn, JobDetail job)Update the job detail record.intupdateTrigger(java.sql.Connection conn, OperableTrigger trigger, java.lang.String state, JobDetail jobDetail)Update the base trigger data.protected java.sql.BlobwriteDataToBlob(java.sql.ResultSet rs, int column, byte[] data)-
Methods inherited from class org.quartz.impl.jdbcjobstore.StdJDBCDelegate
addDefaultTriggerPersistenceDelegates, addTriggerPersistenceDelegate, calendarExists, calendarIsReferenced, canUseProperties, clearData, closeResultSet, closeStatement, convertFromProperty, convertToProperty, countMisfiredTriggersInState, deleteAllPausedTriggerGroups, deleteBlobTrigger, deleteCalendar, deleteFiredTrigger, deleteFiredTriggers, deleteFiredTriggers, deleteJobDetail, deletePausedTriggerGroup, deletePausedTriggerGroup, deleteSchedulerState, deleteTrigger, deleteTriggerExtension, findTriggerPersistenceDelegate, findTriggerPersistenceDelegate, getBoolean, getBoolean, getKeyOfNonSerializableValue, getSchedulerNameLiteral, hasMisfiredTriggersInState, initialize, insertBlobTrigger, insertFiredTrigger, insertPausedTriggerGroup, insertSchedulerState, isExistingTriggerGroup, isJobNonConcurrent, isMatcherEquals, isTriggerGroupPaused, jobExists, rtp, selectCalendar, selectCalendars, selectFiredTriggerInstanceNames, selectFiredTriggerRecords, selectFiredTriggerRecordsByJob, selectInstancesFiredTriggerRecords, selectJobDetail, selectJobExecutionCount, selectJobForTrigger, selectJobForTrigger, selectJobGroups, selectJobsInGroup, selectMisfiredTriggers, selectMisfiredTriggersInGroupInState, selectMisfiredTriggersInState, selectNextFireTime, selectNumCalendars, selectNumJobs, selectNumTriggers, selectNumTriggersForJob, selectPausedTriggerGroups, selectSchedulerStateRecords, selectTrigger, selectTriggerForFireTime, selectTriggerGroups, selectTriggerGroups, selectTriggerJobDataMap, selectTriggerKeysForJob, selectTriggersForCalendar, selectTriggersForJob, selectTriggersForRecoveringJobs, selectTriggersInGroup, selectTriggersInState, selectTriggerState, selectTriggerStatus, selectTriggerToAcquire, selectTriggerToAcquire, serializeJobData, serializeObject, setBoolean, setBytes, toSqlEqualsClause, toSqlLikeClause, triggerExists, updateBlobTrigger, updateFiredTrigger, updateSchedulerState, updateTriggerGroupStateFromOtherState, updateTriggerGroupStateFromOtherStates, updateTriggerState, updateTriggerStateFromOtherState, updateTriggerStateFromOtherStates, updateTriggerStatesForJob, updateTriggerStatesForJobFromOtherState, updateTriggerStatesFromOtherStates
-
-
-
-
Field Detail
-
INSERT_ORACLE_JOB_DETAIL
public static final java.lang.String INSERT_ORACLE_JOB_DETAIL
- See Also:
- Constant Field Values
-
UPDATE_ORACLE_JOB_DETAIL
public static final java.lang.String UPDATE_ORACLE_JOB_DETAIL
- See Also:
- Constant Field Values
-
UPDATE_ORACLE_JOB_DETAIL_BLOB
public static final java.lang.String UPDATE_ORACLE_JOB_DETAIL_BLOB
- See Also:
- Constant Field Values
-
SELECT_ORACLE_JOB_DETAIL_BLOB
public static final java.lang.String SELECT_ORACLE_JOB_DETAIL_BLOB
- See Also:
- Constant Field Values
-
UPDATE_ORACLE_TRIGGER
public static final java.lang.String UPDATE_ORACLE_TRIGGER
- See Also:
- Constant Field Values
-
SELECT_ORACLE_TRIGGER_JOB_DETAIL_BLOB
public static final java.lang.String SELECT_ORACLE_TRIGGER_JOB_DETAIL_BLOB
- See Also:
- Constant Field Values
-
UPDATE_ORACLE_TRIGGER_JOB_DETAIL_BLOB
public static final java.lang.String UPDATE_ORACLE_TRIGGER_JOB_DETAIL_BLOB
- See Also:
- Constant Field Values
-
UPDATE_ORACLE_TRIGGER_JOB_DETAIL_EMPTY_BLOB
public static final java.lang.String UPDATE_ORACLE_TRIGGER_JOB_DETAIL_EMPTY_BLOB
- See Also:
- Constant Field Values
-
INSERT_ORACLE_CALENDAR
public static final java.lang.String INSERT_ORACLE_CALENDAR
- See Also:
- Constant Field Values
-
SELECT_ORACLE_CALENDAR_BLOB
public static final java.lang.String SELECT_ORACLE_CALENDAR_BLOB
- See Also:
- Constant Field Values
-
UPDATE_ORACLE_CALENDAR_BLOB
public static final java.lang.String UPDATE_ORACLE_CALENDAR_BLOB
- See Also:
- Constant Field Values
-
-
Method Detail
-
getObjectFromBlob
protected java.lang.Object getObjectFromBlob(java.sql.ResultSet rs, java.lang.String colName) throws java.lang.ClassNotFoundException, java.io.IOException, java.sql.SQLExceptionDescription copied from class:StdJDBCDelegateThis method should be overridden by any delegate subclasses that need special handling for BLOBs. The default implementation uses standard JDBC
java.sql.Bloboperations.- Overrides:
getObjectFromBlobin classStdJDBCDelegate- Parameters:
rs- the result set, already queued to the correct rowcolName- the column name for the BLOB- Returns:
- the deserialized Object from the ResultSet BLOB
- Throws:
java.lang.ClassNotFoundException- if a class found during deserialization cannot be foundjava.io.IOException- if deserialization causes an errorjava.sql.SQLException
-
insertJobDetail
public int insertJobDetail(java.sql.Connection conn, JobDetail job) throws java.io.IOException, java.sql.SQLExceptionDescription copied from class:StdJDBCDelegateInsert the job detail record.
- Specified by:
insertJobDetailin interfaceDriverDelegate- Overrides:
insertJobDetailin classStdJDBCDelegate- Parameters:
conn- the DB Connectionjob- the job to insert- Returns:
- number of rows inserted
- Throws:
java.io.IOException- if there were problems serializing the JobDataMapjava.sql.SQLException
-
getJobDataFromBlob
protected java.lang.Object getJobDataFromBlob(java.sql.ResultSet rs, java.lang.String colName) throws java.lang.ClassNotFoundException, java.io.IOException, java.sql.SQLExceptionDescription copied from class:StdJDBCDelegateThis method should be overridden by any delegate subclasses that need special handling for BLOBs for job details. The default implementation uses standard JDBC
java.sql.Bloboperations.- Overrides:
getJobDataFromBlobin classStdJDBCDelegate- Parameters:
rs- the result set, already queued to the correct rowcolName- the column name for the BLOB- Returns:
- the deserialized Object from the ResultSet BLOB
- Throws:
java.lang.ClassNotFoundException- if a class found during deserialization cannot be foundjava.io.IOException- if deserialization causes an errorjava.sql.SQLException
-
updateJobDetail
public int updateJobDetail(java.sql.Connection conn, JobDetail job) throws java.io.IOException, java.sql.SQLExceptionDescription copied from class:StdJDBCDelegateUpdate the job detail record.
- Specified by:
updateJobDetailin interfaceDriverDelegate- Overrides:
updateJobDetailin classStdJDBCDelegate- Parameters:
conn- the DB Connectionjob- the job to update- Returns:
- number of rows updated
- Throws:
java.io.IOException- if there were problems serializing the JobDataMapjava.sql.SQLException
-
insertTrigger
public int insertTrigger(java.sql.Connection conn, OperableTrigger trigger, java.lang.String state, JobDetail jobDetail) throws java.sql.SQLException, java.io.IOExceptionDescription copied from class:StdJDBCDelegateInsert the base trigger data.
- Specified by:
insertTriggerin interfaceDriverDelegate- Overrides:
insertTriggerin classStdJDBCDelegate- Parameters:
conn- the DB Connectiontrigger- the trigger to insertstate- the state that the trigger should be stored in- Returns:
- the number of rows inserted
- Throws:
java.sql.SQLExceptionjava.io.IOException
-
updateTrigger
public int updateTrigger(java.sql.Connection conn, OperableTrigger trigger, java.lang.String state, JobDetail jobDetail) throws java.sql.SQLException, java.io.IOExceptionDescription copied from class:StdJDBCDelegateUpdate the base trigger data.
- Specified by:
updateTriggerin interfaceDriverDelegate- Overrides:
updateTriggerin classStdJDBCDelegate- Parameters:
conn- the DB Connectiontrigger- the trigger to insertstate- the state that the trigger should be stored in- Returns:
- the number of rows updated
- Throws:
java.sql.SQLExceptionjava.io.IOException
-
insertCalendar
public int insertCalendar(java.sql.Connection conn, java.lang.String calendarName, Calendar calendar) throws java.io.IOException, java.sql.SQLExceptionDescription copied from class:StdJDBCDelegateInsert a new calendar.
- Specified by:
insertCalendarin interfaceDriverDelegate- Overrides:
insertCalendarin classStdJDBCDelegate- Parameters:
conn- the DB ConnectioncalendarName- the name for the new calendarcalendar- the calendar- Returns:
- the number of rows inserted
- Throws:
java.io.IOException- if there were problems serializing the calendarjava.sql.SQLException
-
updateCalendar
public int updateCalendar(java.sql.Connection conn, java.lang.String calendarName, Calendar calendar) throws java.io.IOException, java.sql.SQLExceptionDescription copied from class:StdJDBCDelegateUpdate a calendar.
- Specified by:
updateCalendarin interfaceDriverDelegate- Overrides:
updateCalendarin classStdJDBCDelegate- Parameters:
conn- the DB ConnectioncalendarName- the name for the new calendarcalendar- the calendar- Returns:
- the number of rows updated
- Throws:
java.io.IOException- if there were problems serializing the calendarjava.sql.SQLException
-
updateJobData
public int updateJobData(java.sql.Connection conn, JobDetail job) throws java.io.IOException, java.sql.SQLExceptionDescription copied from class:StdJDBCDelegateUpdate the job data map for the given job.
- Specified by:
updateJobDatain interfaceDriverDelegate- Overrides:
updateJobDatain classStdJDBCDelegate- Parameters:
conn- the DB Connectionjob- the job to update- Returns:
- the number of rows updated
- Throws:
java.io.IOException- if there were problems serializing the JobDataMapjava.sql.SQLException
-
writeDataToBlob
protected java.sql.Blob writeDataToBlob(java.sql.ResultSet rs, int column, byte[] data) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
-