org.apache.lokahi.core.agent.dao
Class AgentJob
java.lang.Object
org.apache.lokahi.core.agent.dao.AgentJob
- All Implemented Interfaces:
- Collectable, Dao
- Direct Known Subclasses:
- MonitoringJob, ScheduledJob
public class AgentJob
- extends java.lang.Object
- implements Dao, Collectable
- Version:
- $Id: AgentJob.java,v 1.4 2006/03/07 20:18:45 drtobes Exp $
- Author:
- Stephen Toback
Constructor Summary |
AgentJob()
|
AgentJob(int pk,
int type,
java.lang.String name,
java.lang.String parentName,
int stateId,
int functionId,
java.lang.String options,
java.lang.String returnTo,
java.lang.String returnEndpoint,
java.lang.String returnMethod,
java.util.Date runtime,
java.lang.String attachment,
java.lang.String result)
|
AgentJob(int type,
java.lang.String name,
java.lang.String parentName,
int stateId,
int functionId,
java.lang.String options,
java.lang.String returnTo,
java.lang.String returnEndpoint,
java.lang.String returnMethod,
java.util.Date runtime,
java.lang.String attachment,
java.lang.String result)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AgentJob
public AgentJob()
AgentJob
public AgentJob(int type,
java.lang.String name,
java.lang.String parentName,
int stateId,
int functionId,
java.lang.String options,
java.lang.String returnTo,
java.lang.String returnEndpoint,
java.lang.String returnMethod,
java.util.Date runtime,
java.lang.String attachment,
java.lang.String result)
AgentJob
public AgentJob(int pk,
int type,
java.lang.String name,
java.lang.String parentName,
int stateId,
int functionId,
java.lang.String options,
java.lang.String returnTo,
java.lang.String returnEndpoint,
java.lang.String returnMethod,
java.util.Date runtime,
java.lang.String attachment,
java.lang.String result)
getPk
public int getPk()
- Description copied from interface:
Collectable
- Gets the primary key
- Specified by:
getPk
in interface Collectable
- Returns:
- the
int
primary key
setType
public void setType(TaskType type)
getType
public TaskType getType()
setPk
public void setPk(int pk)
getName
public java.lang.String getName()
- Description copied from interface:
Collectable
- Gets the name.
- Specified by:
getName
in interface Collectable
- Returns:
- the
String
name.
setName
public void setName(java.lang.String name)
getAttachment
public java.lang.String getAttachment()
setAttachment
public void setAttachment(java.lang.String attachment)
getOptions
public java.lang.String[] getOptions()
setOptions
public void setOptions(java.lang.String[] options)
getParentName
public java.lang.String getParentName()
setParentName
public void setParentName(java.lang.String parentName)
getReturnTo
public java.lang.String getReturnTo()
setReturnTo
public void setReturnTo(java.lang.String returnTo)
getReturnEndpoint
public java.lang.String getReturnEndpoint()
setReturnEndpoint
public void setReturnEndpoint(java.lang.String returnEndpoint)
getReturnMethod
public java.lang.String getReturnMethod()
setReturnMethod
public void setReturnMethod(java.lang.String returnMethod)
getRunTime
public java.util.Date getRunTime()
setRunTime
public void setRunTime(java.util.Date runTime)
getFunction
public Function getFunction()
setFunction
public void setFunction(Function function)
getResult
public java.lang.String getResult()
setResult
public void setResult(java.lang.String result)
getStatus
public State getStatus()
setStatus
public void setStatus(State status)
store
public static AgentJob store(AgentJob j)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getJobs
public static java.util.Collection<AgentJob> getJobs(State s)
update
public void update()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
fillObject
public AgentJob fillObject(java.sql.ResultSet r)
throws java.sql.SQLException
- Description copied from interface:
Dao
- Creates the Dao from the passed resultset,
internally calling the appriate constructor.
- Specified by:
fillObject
in interface Dao
- Parameters:
r
- the resultset from a database call,
should include the entire object
- Returns:
- Object populated from the resultset
- Throws:
java.sql.SQLException