com.starteam
Class VersionedObject

java.lang.Object
  extended by com.starteam.CacheRef
      extended by com.starteam.TypedResource
          extended by com.starteam.LiveObject
              extended by com.starteam.TrackedObject
                  extended by com.starteam.VersionedObject
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
TaskDependency, ViewMember, WorkRecord

public class VersionedObject
extends TrackedObject

A VersionedObject is a TrackedObject that maintains a revision history.


Nested Class Summary
static class VersionedObject.Type
          The Type for VersionedObject
static class VersionedObject.WebCacheVersionedObject
          Tracked Object accessor for cached SDK Objects 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
static int getBranchRevision(DotNotation dotNotation)
          Computes the "branch revision" from the specified dot notation.
 java.lang.String getComment()
          Gets the comment describing this revision of the item.
 DotNotation getDotNotation()
          Gets the dot notation identification of this resource version.
 int getRevisionNumber()
          Gets the revision number for this object revision.
 int getRootObjectID()
          Gets the root object ID for this resource.
 int getViewVersion()
          The version number of this item calculated by counting direct ancestors of this item from this version to the initial version.
static int getViewVersion(DotNotation dotNotation)
          Computes the "view version" from the specified dot notation.
 boolean isFromHistory()
          Determines whether or not this is a historical resource obtained from the history.
 void setComment(java.lang.String comment)
          Sets the comment describing this revision of the item.
 
Methods inherited from class com.starteam.TrackedObject
getModifiedBy, getModifiedTime
 
Methods inherited from class com.starteam.LiveObject
getCreatedBy, getCreatedTime
 
Methods inherited from class com.starteam.TypedResource
addToIntegerArray, getBooleanValue, getByteArrayValue, getCachedProperties, getContentValue, getDateTimeValue, getDateValue, getDisplayName, getDoubleValue, getEnumDisplayName, getEnumeratedValues, getID, getIntegerArrayValue, getIntegerValue, getLinkValue, getLongValue, getObjectID, getPossibleValues, getServer, getStringValue, getTimeSpanValue, getType, getValue, hasCachedProperties, isCachedProperty, isDirty, isNew, removeFromIntegerArray, setBooleanValue, setByteArrayValue, setContentValue, setDateTimeValue, setDateValue, setDoubleValue, setEnumeratedValue, setEnumeratedValues, setIntegerArrayValue, setIntegerValue, setLinkValue, setLongValue, setStringValue, setTimeSpanValue, setValue, toString
 
Methods inherited from class com.starteam.CacheRef
clone
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getRevisionNumber

public int getRevisionNumber()
Gets the revision number for this object revision. The first revision has revision number zero.

Returns:
The revision number for this object revision.

getComment

public java.lang.String getComment()
Gets the comment describing this revision of the item.

Returns:
The comment describing this revision of the item.

setComment

public void setComment(java.lang.String comment)
Sets the comment describing this revision of the item.

Parameters:
comment - The comment for the next revision of this item.

getViewVersion

public int getViewVersion()
The version number of this item calculated by counting direct ancestors of this item from this version to the initial version. The first revision will have a view version number of (1).

Returns:
The view version number of this item.

getRootObjectID

public int getRootObjectID()
Gets the root object ID for this resource. All resources with the same root object ID were derived from the same underlying object. Revisions with the same object ID are all on the same branch.

Returns:
The root object ID for this resource.

getDotNotation

public DotNotation getDotNotation()
Gets the dot notation identification of this resource version.

The first version added to the repository will have a dot notation of "1.0". Each new revision will increment the version number portion so the second revision would be "1.1".

When an item branches a new branch number will be issued and revision will start counting from 0 again. For example, branching from version "1.2" might result in "1.2.5.0" after which the next version will be "1.2.5.1".

The value 5 in the previous example was assigned by the server based on the number of branches already made from the revision being branched.

Returns:
The dot notation identification of this resource version.

isFromHistory

public boolean isFromHistory()
Determines whether or not this is a historical resource obtained from the history.

Returns:
true if this is a historical resource obtained from the history.

getViewVersion

public static int getViewVersion(DotNotation dotNotation)
Computes the "view version" from the specified dot notation. The view version starts at 1, and increments for each new item revision. For example, the view version of "1.1" is 2; the view version of "1.2.4.7" is 11.

Parameters:
dotNotation - A dot notation.
Returns:
The corresponding view version.

getBranchRevision

public static int getBranchRevision(DotNotation dotNotation)
Computes the "branch revision" from the specified dot notation. The branch revision is the final number in the notation. For example, the branch revision of "1.1" is 1; the branch revision of "1.2.4.7" is 7.

Parameters:
dotNotation - A dot notation.
Returns:
The corresponding branch revision.


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