com.uwyn.rife.scheduler.taskmanagers
Class DatabaseTasks

java.lang.Object
  extended by com.uwyn.rife.database.DbQueryManager
      extended by com.uwyn.rife.scheduler.taskmanagers.DatabaseTasks
All Implemented Interfaces:
TaskManager, Cloneable

public abstract class DatabaseTasks
extends DbQueryManager
implements TaskManager


Nested Class Summary
protected  class DatabaseTasks.ProcessTask
           
 
Constructor Summary
protected DatabaseTasks(Datasource datasource)
           
 
Method Summary
protected  boolean _activateTask(Update activateTask, int id)
           
protected  int _addTask(SequenceValue getTaskId, Insert insertTask, DbPreparedStatementHandler handler, Task task)
           
protected  boolean _concludeTask(Task task)
           
protected  boolean _desactivateTask(Update desactivateTask, int id)
           
protected  Collection<Task> _getScheduledTasks(Select getScheduledTasks, DatabaseTasks.ProcessTask processTask)
           
protected  Task _getTask(Select getTask, DatabaseTasks.ProcessTask processTask, int id)
           
protected  Collection<Task> _getTasksToProcess(Select getTasksToProcess, DatabaseTasks.ProcessTask processTask)
           
protected  boolean _install(CreateSequence createSequenceTask, CreateTable createTableTask)
           
protected  boolean _remove(DropSequence dropSequenceTask, DropTable dropTableTask)
           
protected  boolean _removeTask(Delete removeTask, int id)
           
protected  boolean _rescheduleTask(Task task, long newPlanned, String frequency)
           
protected  boolean _updateTask(Update updateTask, DbPreparedStatementHandler handler, Task task)
           
 Scheduler getScheduler()
           
abstract  boolean install()
           
abstract  boolean remove()
           
 void setScheduler(Scheduler scheduler)
           
 
Methods inherited from class com.uwyn.rife.database.DbQueryManager
clone, executeFetchAll, executeFetchAll, executeFetchAllBeans, executeFetchAllBeans, executeFetchFirst, executeFetchFirst, executeFetchFirstBean, executeFetchFirstBean, executeGetFirstBoolean, executeGetFirstBoolean, executeGetFirstByte, executeGetFirstByte, executeGetFirstBytes, executeGetFirstBytes, executeGetFirstDate, executeGetFirstDate, executeGetFirstDate, executeGetFirstDate, executeGetFirstDouble, executeGetFirstDouble, executeGetFirstFloat, executeGetFirstFloat, executeGetFirstInt, executeGetFirstInt, executeGetFirstLong, executeGetFirstLong, executeGetFirstShort, executeGetFirstShort, executeGetFirstString, executeGetFirstString, executeGetFirstTime, executeGetFirstTime, executeGetFirstTime, executeGetFirstTime, executeGetFirstTimestamp, executeGetFirstTimestamp, executeGetFirstTimestamp, executeGetFirstTimestamp, executeHasResultRows, executeHasResultRows, executeQuery, executeQuery, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUseFirstAsciiStream, executeUseFirstAsciiStream, executeUseFirstBinaryStream, executeUseFirstBinaryStream, executeUseFirstCharacterStream, executeUseFirstCharacterStream, fetch, fetch, fetchAll, getConnection, getDatasource, inTransaction, reserveConnection
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.uwyn.rife.scheduler.TaskManager
activateTask, addTask, concludeTask, deactivateTask, getScheduledTasks, getTask, getTasksToProcess, removeTask, rescheduleTask, updateTask
 

Constructor Detail

DatabaseTasks

protected DatabaseTasks(Datasource datasource)
Method Detail

setScheduler

public void setScheduler(Scheduler scheduler)
Specified by:
setScheduler in interface TaskManager

getScheduler

public Scheduler getScheduler()
Specified by:
getScheduler in interface TaskManager

install

public abstract boolean install()
                         throws TaskManagerException
Throws:
TaskManagerException

remove

public abstract boolean remove()
                        throws TaskManagerException
Throws:
TaskManagerException

_install

protected boolean _install(CreateSequence createSequenceTask,
                           CreateTable createTableTask)
                    throws TaskManagerException
Throws:
TaskManagerException

_remove

protected boolean _remove(DropSequence dropSequenceTask,
                          DropTable dropTableTask)
                   throws TaskManagerException
Throws:
TaskManagerException

_addTask

protected int _addTask(SequenceValue getTaskId,
                       Insert insertTask,
                       DbPreparedStatementHandler handler,
                       Task task)
                throws TaskManagerException
Throws:
TaskManagerException

_updateTask

protected boolean _updateTask(Update updateTask,
                              DbPreparedStatementHandler handler,
                              Task task)
                       throws TaskManagerException
Throws:
TaskManagerException

_getTask

protected Task _getTask(Select getTask,
                        DatabaseTasks.ProcessTask processTask,
                        int id)
                 throws TaskManagerException
Throws:
TaskManagerException

_getTasksToProcess

protected Collection<Task> _getTasksToProcess(Select getTasksToProcess,
                                              DatabaseTasks.ProcessTask processTask)
                                       throws TaskManagerException
Throws:
TaskManagerException

_getScheduledTasks

protected Collection<Task> _getScheduledTasks(Select getScheduledTasks,
                                              DatabaseTasks.ProcessTask processTask)
                                       throws TaskManagerException
Throws:
TaskManagerException

_removeTask

protected boolean _removeTask(Delete removeTask,
                              int id)
                       throws TaskManagerException
Throws:
TaskManagerException

_rescheduleTask

protected boolean _rescheduleTask(Task task,
                                  long newPlanned,
                                  String frequency)
                           throws TaskManagerException
Throws:
TaskManagerException

_concludeTask

protected boolean _concludeTask(Task task)
                         throws TaskManagerException
Throws:
TaskManagerException

_activateTask

protected boolean _activateTask(Update activateTask,
                                int id)
                         throws TaskManagerException
Throws:
TaskManagerException

_desactivateTask

protected boolean _desactivateTask(Update desactivateTask,
                                   int id)
                            throws TaskManagerException
Throws:
TaskManagerException


Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.