com.starteam
Class WorkRecord

java.lang.Object
  extended by com.starteam.TypedResource
      extended by com.starteam.LiveObject
          extended by com.starteam.TrackedObject
              extended by com.starteam.WorkRecord
All Implemented Interfaces:
java.lang.Cloneable

public final class WorkRecord
extends TrackedObject

Record of a period of work expended for a task.

  1. Work records are mutable and versioned, but there is no way to identify a version of a work record since the server does not send this information.
  2. The work record contains the ID of the task it is associated with, but not the version number, so there is no way to deduce the task version it is associated with.
  3. The task ID is a mutable property, but the semantics of changing it is unknown.


Nested Class Summary
static class WorkRecord.Type
          The type of the WorkRecord
static class WorkRecord.WebCacheWorkRecord
          Item accessor for cached SDK WorkRecords contained objects are obtained from the artifact cache
 
Nested classes/interfaces inherited from class com.starteam.TrackedObject
TrackedObject.WebCacheTrackedObject
 
Nested classes/interfaces inherited from class com.starteam.LiveObject
LiveObject.WebCacheLiveObject
 
Nested classes/interfaces inherited from class com.starteam.TypedResource
TypedResource.BranchState
 
Method Summary
 WorkRecord copy()
          Creates a copy of this workrecord object.
 boolean equals(java.lang.Object another)
          Returns true if the other object represents the same work record.
 Date getDateWorkedOn()
          Returns the date on which the work was begun.
 TimeSpan getEstimatedTimeRemaining()
          Returns the estimated time remaining to complete the task after this period.
 int getID()
          Returns the integer identifier of the work record.
 java.lang.String getNotes()
          Return the notes about this work record.
 WorkRecord.Type.PropertyCollection getProperties()
          The property collection of the WorkRecord type
 TimeSpan getTimeWorked()
          Returns the time spent on the task during this period.
 User getWorkPerformedBy()
          Returns the user who performed the work.
 int hashCode()
          Returns a hash code for this work record.
 boolean isDirty()
          Returns true if this WorkRecord has been modified but not yet saved.
 void setDateWorkedOn(Date date)
          Sets the date on which the work was begun.
 void setEstimatedTimeRemaining(TimeSpan timeRemaining)
          Sets the estimated number of hour remaining to complete the task after this period.
 void setNotes(java.lang.String notes)
          Sets the notes for this work record.
 void setTimeWorked(TimeSpan timeWorked)
          Sets the time spent on the task.
 java.lang.Object setValue(Property property, java.lang.Object value)
          Sets the value of the specified property and return the old value.
 void setWorkPerformedBy(User user)
          Sets the user who performed the work
 java.lang.String toString()
          Returns the notes of this work record.
 
Methods inherited from class com.starteam.TrackedObject
getModifiedBy, getModifiedTime
 
Methods inherited from class com.starteam.LiveObject
getCreatedBy, getCreatedTime, toStarTeamURL
 
Methods inherited from class com.starteam.TypedResource
addToIntegerArray, getBooleanValue, getByteArrayValue, getCachedProperties, getContentValue, getDateTimeValue, getDateValue, getDisplayName, getDoubleValue, getEnumDisplayName, getEnumeratedValues, getIntegerArrayValue, getIntegerValue, getLinkValue, getLongValue, getObjectID, getPossibleValues, getServer, getStringValue, getTimeSpanValue, getType, getValue, hasCachedProperties, hasValue, isNew, removeFromIntegerArray, setBooleanValue, setByteArrayValue, setContentValue, setDateTimeValue, setDateValue, setDoubleValue, setEnumeratedValue, setEnumeratedValues, setIntegerArrayValue, setIntegerValue, setLinkValue, setLongValue, setStringValue, setTimeSpanValue
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getProperties

public WorkRecord.Type.PropertyCollection getProperties()
The property collection of the WorkRecord type


isDirty

public boolean isDirty()
Returns true if this WorkRecord has been modified but not yet saved.

Overrides:
isDirty in class TypedResource
Returns:
true if this WorkRecord has been modified but not yet saved.
See Also:
Task.update()

getID

public int getID()
Returns the integer identifier of the work record.

Overrides:
getID in class TypedResource
Returns:
the integer identifier of the work record.

getWorkPerformedBy

public User getWorkPerformedBy()
Returns the user who performed the work.

Returns:
the user who performed the work.

setWorkPerformedBy

public void setWorkPerformedBy(User user)
Sets the user who performed the work

Parameters:
user - the user who performed the work

getDateWorkedOn

public Date getDateWorkedOn()
Returns the date on which the work was begun. The default value for a new instance is equal to the creation time of the instance.

Returns:
the date on which the work was begun.

setDateWorkedOn

public void setDateWorkedOn(Date date)
Sets the date on which the work was begun.

Parameters:
date - the date the work began.

getTimeWorked

public TimeSpan getTimeWorked()
Returns the time spent on the task during this period.

Returns:
the time spent on the task during this period.

setTimeWorked

public void setTimeWorked(TimeSpan timeWorked)
Sets the time spent on the task.

Parameters:
timeWorked - the time spent on the task.

getEstimatedTimeRemaining

public TimeSpan getEstimatedTimeRemaining()
Returns the estimated time remaining to complete the task after this period.

Returns:
the estimated time remaining to complete the task after this period.

setEstimatedTimeRemaining

public void setEstimatedTimeRemaining(TimeSpan timeRemaining)
Sets the estimated number of hour remaining to complete the task after this period.

Parameters:
timeRemaining - the amount of time remaining.

getNotes

public java.lang.String getNotes()
Return the notes about this work record.

Returns:
the notes about this work record.

setNotes

public void setNotes(java.lang.String notes)
Sets the notes for this work record.

Parameters:
notes - the notes for this work record.

setValue

public java.lang.Object setValue(Property property,
                                 java.lang.Object value)
                          throws NoSuchPropertyException,
                                 java.lang.ClassCastException
Sets the value of the specified property and return the old value.

Overrides:
setValue in class TypedResource
Parameters:
property - the name of the property to set
value - the new value to set for the specified property
Returns:
the old property value
Throws:
NoSuchPropertyException - if the named property does not exist
java.lang.ClassCastException - if the value is of the wrong type for the specified property

equals

public boolean equals(java.lang.Object another)
Returns true if the other object represents the same work record.

Overrides:
equals in class java.lang.Object
Parameters:
another - the object to be compared with
Returns:
true if the other object represents the same work record.

hashCode

public int hashCode()
Returns a hash code for this work record.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code for this work record.

toString

public java.lang.String toString()
Returns the notes of this work record.

Overrides:
toString in class TypedResource
Returns:
the notes of this work record.

copy

public WorkRecord copy()
Creates a copy of this workrecord object.

Returns:
A new copy of this workrecord object.


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.