|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.prc.task.Task
public abstract class Task
The Task class stores information about each task (WorkUnit or Result), including the task's ID, the users who are responsible for this task, and the data the task contains. Note: this class has a natural ordering that is inconsistent with equals.
Field Summary | |
---|---|
private java.util.Date |
creationDate
|
private java.util.List<byte[]> |
dataPartitions
|
private long |
id
|
static int |
MIN_PRIORITY
|
private static int |
PARTITION_LENGTH
|
private int |
priority
|
private java.lang.String |
stateStr
|
private java.lang.String |
taskID
|
Constructor Summary | |
---|---|
Task()
|
Method Summary | |
---|---|
abstract void |
delete()
Deletes this Task from the database. |
java.util.Date |
getCreationDate()
|
byte[] |
getData()
|
protected java.util.List<byte[]> |
getDataPartitions()
|
protected long |
getId()
|
int |
getPriority()
|
TaskState |
getState()
|
protected java.lang.String |
getStateStr()
|
java.lang.String |
getTaskID()
|
boolean |
isEqual(java.lang.Object o)
Tests whether this Task is equal to another. |
abstract void |
save()
Inserts this Task into the database as a new record. |
protected void |
setCreationDate(java.util.Date creationDate)
|
void |
setData(byte[] data)
|
protected void |
setDataPartitions(java.util.List<byte[]> dataPartitions)
Sets the list of data partitions (required for Hibernate to work). |
protected void |
setId(long id)
|
void |
setPriority(int priority)
|
void |
setState(TaskState state)
Sets the current state of this Task. |
protected void |
setStateStr(java.lang.String taskStateStr)
|
void |
setTaskID(java.lang.String taskID)
|
abstract void |
update()
Updates this Task in the database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MIN_PRIORITY
private static final int PARTITION_LENGTH
private long id
private java.lang.String taskID
private java.util.List<byte[]> dataPartitions
private java.lang.String stateStr
private java.util.Date creationDate
private int priority
Constructor Detail |
---|
public Task()
Method Detail |
---|
protected long getId()
protected void setId(long id)
id
- The id to set.protected java.util.List<byte[]> getDataPartitions()
protected void setDataPartitions(java.util.List<byte[]> dataPartitions)
public byte[] getData()
public void setData(byte[] data)
data
- The data to set.public java.lang.String getTaskID()
public void setTaskID(java.lang.String taskID)
taskID
- The taskID to set.protected java.lang.String getStateStr()
protected void setStateStr(java.lang.String taskStateStr)
taskStateStr
- The stateStr to set.public TaskState getState()
public void setState(TaskState state)
state
- The state to set.public java.util.Date getCreationDate()
protected void setCreationDate(java.util.Date creationDate)
creationDate
- The creationDate to set.public int getPriority()
getPriority
in interface Prioritizable
public void setPriority(int priority)
priority
- The priority to set.public abstract void save()
public abstract void update()
public abstract void delete()
public boolean isEqual(java.lang.Object o)
o
- The object to compare this Task to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |