SimplePropertiesTriggerPersistenceDelegateSupport (Quartz Parent POM 2.0.1 API)

Quartz Java



org.quartz.impl.jdbcjobstore Class SimplePropertiesTriggerPersistenceDelegateSupport

java.lang.Object
  extended by org.quartz.impl.jdbcjobstore.SimplePropertiesTriggerPersistenceDelegateSupport
All Implemented Interfaces:
Constants, StdJDBCConstants, TriggerPersistenceDelegate
Direct Known Subclasses:
CalendarIntervalTriggerPersistenceDelegate

public abstract class SimplePropertiesTriggerPersistenceDelegateSupport
extends Object
implements TriggerPersistenceDelegate, StdJDBCConstants

A base implementation of TriggerPersistenceDelegate that persists trigger fields in the "QRTZ_SIMPROP_TRIGGERS" table. This allows extending concrete classes to simply implement a couple methods that do the work of getting/setting the trigger's fields, and creating the ScheduleBuilder for the particular type of trigger.

Author:
jhouse
See Also:
for an example extension

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.quartz.impl.jdbcjobstore.TriggerPersistenceDelegate
TriggerPersistenceDelegate.TriggerPropertyBundle
 
Field Summary
protected static String COL_BOOL_PROP_1
           
protected static String COL_BOOL_PROP_2
           
protected static String COL_DEC_PROP_1
           
protected static String COL_DEC_PROP_2
           
protected static String COL_INT_PROP_1
           
protected static String COL_INT_PROP_2
           
protected static String COL_LONG_PROP_1
           
protected static String COL_LONG_PROP_2
           
protected static String COL_STR_PROP_1
           
protected static String COL_STR_PROP_2
           
protected static String COL_STR_PROP_3
           
protected static String DELETE_SIMPLE_PROPS_TRIGGER
           
protected static String INSERT_SIMPLE_PROPS_TRIGGER
           
protected  String schedNameLiteral
           
protected static String SELECT_SIMPLE_PROPS_TRIGGER
           
protected static String TABLE_SIMPLE_PROPERTIES_TRIGGERS
           
protected  String tablePrefix
           
protected static String UPDATE_SIMPLE_PROPS_TRIGGER
           
 
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_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_STATE, TABLE_PREFIX_SUBST, UPDATE_BLOB_TRIGGER, UPDATE_CALENDAR, UPDATE_CRON_TRIGGER, UPDATE_FIRED_TRIGGER, UPDATE_INSTANCES_FIRED_TRIGGER_STATE, 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
 
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_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_SIMPLE
 
Constructor Summary
SimplePropertiesTriggerPersistenceDelegateSupport()
           
 
Method Summary
 int deleteExtendedTriggerProperties(Connection conn, TriggerKey triggerKey)
           
protected abstract  SimplePropertiesTriggerProperties getTriggerProperties(org.quartz.spi.OperableTrigger trigger)
           
protected abstract  TriggerPersistenceDelegate.TriggerPropertyBundle getTriggerPropertyBundle(SimplePropertiesTriggerProperties properties)
           
 void initialize(String tablePrefix, String schedName)
           
 int insertExtendedTriggerProperties(Connection conn, org.quartz.spi.OperableTrigger trigger, String state, JobDetail jobDetail)
           
 TriggerPersistenceDelegate.TriggerPropertyBundle loadExtendedTriggerProperties(Connection conn, TriggerKey triggerKey)
           
 int updateExtendedTriggerProperties(Connection conn, org.quartz.spi.OperableTrigger trigger, String state, JobDetail jobDetail)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.quartz.impl.jdbcjobstore.TriggerPersistenceDelegate
canHandleTriggerType, getHandledTriggerTypeDiscriminator
 

Field Detail

TABLE_SIMPLE_PROPERTIES_TRIGGERS

protected static final String TABLE_SIMPLE_PROPERTIES_TRIGGERS
See Also:
Constant Field Values

COL_STR_PROP_1

protected static final String COL_STR_PROP_1
See Also:
Constant Field Values

COL_STR_PROP_2

protected static final String COL_STR_PROP_2
See Also:
Constant Field Values

COL_STR_PROP_3

protected static final String COL_STR_PROP_3
See Also:
Constant Field Values

COL_INT_PROP_1

protected static final String COL_INT_PROP_1
See Also:
Constant Field Values

COL_INT_PROP_2

protected static final String COL_INT_PROP_2
See Also:
Constant Field Values

COL_LONG_PROP_1

protected static final String COL_LONG_PROP_1
See Also:
Constant Field Values

COL_LONG_PROP_2

protected static final String COL_LONG_PROP_2
See Also:
Constant Field Values

COL_DEC_PROP_1

protected static final String COL_DEC_PROP_1
See Also:
Constant Field Values

COL_DEC_PROP_2

protected static final String COL_DEC_PROP_2
See Also:
Constant Field Values

COL_BOOL_PROP_1

protected static final String COL_BOOL_PROP_1
See Also:
Constant Field Values

COL_BOOL_PROP_2

protected static final String COL_BOOL_PROP_2
See Also:
Constant Field Values

SELECT_SIMPLE_PROPS_TRIGGER

protected static final String SELECT_SIMPLE_PROPS_TRIGGER
See Also:
Constant Field Values

DELETE_SIMPLE_PROPS_TRIGGER

protected static final String DELETE_SIMPLE_PROPS_TRIGGER
See Also:
Constant Field Values

INSERT_SIMPLE_PROPS_TRIGGER

protected static final String INSERT_SIMPLE_PROPS_TRIGGER
See Also:
Constant Field Values

UPDATE_SIMPLE_PROPS_TRIGGER

protected static final String UPDATE_SIMPLE_PROPS_TRIGGER
See Also:
Constant Field Values

tablePrefix

protected String tablePrefix

schedNameLiteral

protected String schedNameLiteral
Constructor Detail

SimplePropertiesTriggerPersistenceDelegateSupport

public SimplePropertiesTriggerPersistenceDelegateSupport()
Method Detail

initialize

public void initialize(String tablePrefix,
                       String schedName)
Specified by:
initialize in interface TriggerPersistenceDelegate

getTriggerProperties

protected abstract SimplePropertiesTriggerProperties getTriggerProperties(org.quartz.spi.OperableTrigger trigger)

getTriggerPropertyBundle

protected abstract TriggerPersistenceDelegate.TriggerPropertyBundle getTriggerPropertyBundle(SimplePropertiesTriggerProperties properties)

deleteExtendedTriggerProperties

public int deleteExtendedTriggerProperties(Connection conn,
                                           TriggerKey triggerKey)
                                    throws SQLException
Specified by:
deleteExtendedTriggerProperties in interface TriggerPersistenceDelegate
Throws:
SQLException

insertExtendedTriggerProperties

public int insertExtendedTriggerProperties(Connection conn,
                                           org.quartz.spi.OperableTrigger trigger,
                                           String state,
                                           JobDetail jobDetail)
                                    throws SQLException,
                                           IOException
Specified by:
insertExtendedTriggerProperties in interface TriggerPersistenceDelegate
Throws:
SQLException
IOException

loadExtendedTriggerProperties

public TriggerPersistenceDelegate.TriggerPropertyBundle loadExtendedTriggerProperties(Connection conn,
                                                                                      TriggerKey triggerKey)
                                                                               throws SQLException
Specified by:
loadExtendedTriggerProperties in interface TriggerPersistenceDelegate
Throws:
SQLException

updateExtendedTriggerProperties

public int updateExtendedTriggerProperties(Connection conn,
                                           org.quartz.spi.OperableTrigger trigger,
                                           String state,
                                           JobDetail jobDetail)
                                    throws SQLException,
                                           IOException
Specified by:
updateExtendedTriggerProperties in interface TriggerPersistenceDelegate
Throws:
SQLException
IOException


Copyright 2001-2011, Terracotta, Inc.