org.jwarp.service.work
Class DBToolJob

java.lang.Object
  |
  +--org.jwarp.service.work.AJob
        |
        +--org.jwarp.service.work.ToolJob
              |
              +--org.jwarp.service.work.DBToolJob
All Implemented Interfaces:
IJob, IPooledObject, java.lang.Runnable

public class DBToolJob
extends ToolJob

This is the abstract base class who helps implementing job enities. It implements the IJob interface.


Field Summary
protected  org.exolab.castor.jdo.JDO jdo
           
 
Fields inherited from class org.jwarp.service.work.ToolJob
managerReference, params, toolName, toolRunner, tstamp
 
Fields inherited from class org.jwarp.service.work.AJob
creationDate, exitResult, finishedDate, id, maxTime, priority, reference, startDate, status, user
 
Fields inherited from interface org.jwarp.service.work.IJob
ANY, STATUS_ACTIVE, STATUS_CREATED, STATUS_EXITED_ERROR, STATUS_EXITED_OK
 
Constructor Summary
DBToolJob(int id, org.exolab.castor.jdo.JDO jdo, IToolManager toolManager)
           
DBToolJob(ITool tool, int user, java.lang.String reference, java.lang.String managerRef, long maxTime, org.exolab.castor.jdo.JDO jdo)
           
 
Method Summary
 void create()
          Creates a representation on the database
 void delete()
          Remove the object from the db.
protected  void jobFinished()
           
protected  void jobFinishedWithError(java.lang.String errorString)
           
protected  void jobStarted()
           
 void read()
           
 void setMaxRuntime(long newTime)
           
 void store()
          Synchronise the objects and the database's state.
 
Methods inherited from class org.jwarp.service.work.ToolJob
doWork, getKey, getManagerReference, getParameters, getToolName, initJob, jdoGetTimeStamp, jdoSetTimeStamp, setManagerReference, setToolName
 
Methods inherited from class org.jwarp.service.work.AJob
getCreationDate, getExitResult, getFinishedDate, getId, getMaxTime, getPriority, getReference, getStartDate, getStatus, getTotalRuntime, getUser, run, setCreationDate, setExitResult, setFinishedDate, setId, setMaxTime, setPriority, setReference, setStartDate, setStatus, setStatus, setUser
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jdo

protected org.exolab.castor.jdo.JDO jdo
Constructor Detail

DBToolJob

public DBToolJob(int id,
                 org.exolab.castor.jdo.JDO jdo,
                 IToolManager toolManager)
          throws PersistenceException

DBToolJob

public DBToolJob(ITool tool,
                 int user,
                 java.lang.String reference,
                 java.lang.String managerRef,
                 long maxTime,
                 org.exolab.castor.jdo.JDO jdo)
          throws PersistenceException
Method Detail

jobStarted

protected void jobStarted()
                   throws InvalidJobStateException
Overrides:
jobStarted in class AJob

jobFinished

protected void jobFinished()
                    throws InvalidJobStateException
Overrides:
jobFinished in class AJob

jobFinishedWithError

protected void jobFinishedWithError(java.lang.String errorString)
                             throws InvalidJobStateException
Overrides:
jobFinishedWithError in class AJob

setMaxRuntime

public void setMaxRuntime(long newTime)

create

public void create()
            throws PersistenceException
Creates a representation on the database

read

public void read()
          throws PersistenceException

store

public void store()
           throws PersistenceException
Synchronise the objects and the database's state.

delete

public void delete()
            throws PersistenceException
Remove the object from the db.

©   O R C A   S y s t e m s