net.sf.jbatchengine.batch.adapter.database
Class DatabaseAdapter

java.lang.Object
  extended by net.sf.jbatchengine.batch.adapter.database.DatabaseAdapter
All Implemented Interfaces:
Adapter

public class DatabaseAdapter
extends Object
implements Adapter

Implementation of a DatabaseAdapter using iBatis

Version:
$Revision: 1.1 $, $Date: 2006/10/20 11:30:58 $
Author:
$Author: simas_ch $

Field Summary
private static org.apache.log4j.Logger log
           
private  Properties properties
           
private  Long sleeptime
           
private  SqlMapClientTemplate sqlMapClientTemplate
           
 
Constructor Summary
DatabaseAdapter()
           
 
Method Summary
 void cancelJob(int id)
          Cancels a Job See the state diagram of Job lifecycle for more details
 Job getJob(int id)
          Returns the Job with the given Id
 Job getNextJob()
          This method is waiting until a new Job to process shows up
 Job insertJob(Job job)
          Creates a new Job
 List<Job> listJobs()
          Lists all Jobs
 void setSqlMapClientTemplate(SqlMapClientTemplate sqlMapClientTemplate)
           
 void updateJob(Job job)
          Updates a Job
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static transient org.apache.log4j.Logger log

sqlMapClientTemplate

private SqlMapClientTemplate sqlMapClientTemplate

properties

private Properties properties

sleeptime

private Long sleeptime
Constructor Detail

DatabaseAdapter

public DatabaseAdapter()
Method Detail

getNextJob

public Job getNextJob()
Description copied from interface: Adapter
This method is waiting until a new Job to process shows up

Specified by:
getNextJob in interface Adapter
Returns:
next Job

updateJob

public void updateJob(Job job)
Description copied from interface: Adapter
Updates a Job

Specified by:
updateJob in interface Adapter

insertJob

public Job insertJob(Job job)
Description copied from interface: Adapter
Creates a new Job

Specified by:
insertJob in interface Adapter
Returns:
Job with Id

getJob

public Job getJob(int id)
Description copied from interface: Adapter
Returns the Job with the given Id

Specified by:
getJob in interface Adapter
Returns:
Job

listJobs

public List<Job> listJobs()
Description copied from interface: Adapter
Lists all Jobs

Specified by:
listJobs in interface Adapter
Returns:
list of Jobs

cancelJob

public void cancelJob(int id)
Description copied from interface: Adapter
Cancels a Job See the state diagram of Job lifecycle for more details

Specified by:
cancelJob in interface Adapter

setSqlMapClientTemplate

public void setSqlMapClientTemplate(SqlMapClientTemplate sqlMapClientTemplate)