com.telelogic.cs.api
Class Task

java.lang.Object
  extended by com.telelogic.cs.api.Task
All Implemented Interfaces:
java.io.Serializable

public class Task
extends java.lang.Object
implements java.io.Serializable

Represents a task at a particular moment in time. That is, a task ID along with a set of attribute values for the task when it was retrieved. The attributes are not live; to see their latest values you must retrieve them again. All of the attributes stored in the database are not necessarily on a Task object--only those what were asked for from the API returning the object.

Since:
4.7 06
See Also:
Serialized Form

Constructor Summary
Task(java.lang.String task, java.util.Map<java.lang.String,Attribute> attributes)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 Attribute getAttribute(java.lang.String name)
          Gets an attribute for this task at the time it was looked up.
 Attribute[] getAttributes()
          Gets all the attributes that were looked up with this task.
 java.lang.String getTaskId()
          Gets the task ID for this task.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Task

public Task(java.lang.String task,
            java.util.Map<java.lang.String,Attribute> attributes)
Method Detail

getTaskId

public java.lang.String getTaskId()
Gets the task ID for this task. Includes the DCM ID in DCM enabled databases.

Returns:
the task ID for this task.

getAttribute

public Attribute getAttribute(java.lang.String name)
Gets an attribute for this task at the time it was looked up. The attributes may be stale by the time they are inspected since they are not live; they are only a snapshot. Only the attributes that were looked up when requesting this task can be seen though there may be more attributes in the database. Attributes that were not on this task at the time of lookup cannot be found.

Parameters:
name - the name of the attribute to get.
Returns:
the requested attribute. null if the attribute did not exist on task or was not requested when looking it up.

getAttributes

public Attribute[] getAttributes()
Gets all the attributes that were looked up with this task.

Returns:
all the attributes looked up with this task.
See Also:
getAttribute(String)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


© Copyright IBM Corporation 2000, 2009
US Government Users Restricted Rights--Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Notices