com.starteam
Class Change

java.lang.Object
  extended by com.starteam.CacheRef
      extended by com.starteam.TypedResource
          extended by com.starteam.LiveObject
              extended by com.starteam.Change
All Implemented Interfaces:
java.lang.Cloneable

public final class Change
extends LiveObject

A Change is essentially a unit of a ChangePackage. Each Change object describes one item modified during the commit.


Nested Class Summary
static class Change.ChangeType
          The value of the Change Type Property
static class Change.CommitAction
          The action that was used to commit a change.
static class Change.Type
          The Type for Change
static class Change.WebCacheChange
          Change accessor for cached SDK Changes contained objects are obtained from the artifact cache
 
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 ChangeCollection find(Item source, Item target)
          Finds all Change objects for which the given items are the source and/or target.
static ChangeCollection findSource(Item source)
          Finds all Change objects for which the given item is the source.
static ChangeCollection findTarget(Item target)
          Finds all Change objects for which the given item is the target.
 ChangePackage getChangePackage()
          Gets the ChangePackage that contains this Change object.
 Change.ChangeType getChangeType()
          Gets a value representing the type of change.
 Change.CommitAction getCommitAction()
          Gets a value representing the action that was performed to commit this change.
 java.lang.String getDescription()
          Gets a user-friendly description of this Change object.
 Item.Type getItemType()
          Gets the type of the source and/or target item.
 Change.Type.PropertyCollection getProperties()
          Returns the properties of the Change object Type
 Item getSourceItem()
          Gets this Change object's source item, or null if there is no source item.
 LinkValue getSourceLink()
          Gets this Change object's source, as a LinkValue.
 DotNotation getSourceVersion()
          Gets the version number of the source item.
 Item getTargetItem()
          Gets this Change object's target item, or null if there is no target item.
 LinkValue getTargetLink()
          Gets this Change object's target, as a LinkValue.
 DotNotation getTargetVersion()
          Gets the version number of the target item.
 View getView()
          Gets the view that contains this Change object and the associated ChangePackage.
static boolean[] hasChanges(Item[] sources, Item[] targets)
          Check for changes between the specified sources and targets.
 
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

getProperties

public Change.Type.PropertyCollection getProperties()
Returns the properties of the Change object Type

Returns:
the properties of the Change Object Type

getView

public View getView()
Gets the view that contains this Change object and the associated ChangePackage.

Returns:
View

getChangePackage

public ChangePackage getChangePackage()
Gets the ChangePackage that contains this Change object.

Returns:
ChangePackage

getDescription

public java.lang.String getDescription()
Gets a user-friendly description of this Change object.

Returns:
String

getChangeType

public Change.ChangeType getChangeType()
Gets a value representing the type of change.

Returns:
ChangeType

getItemType

public Item.Type getItemType()
Gets the type of the source and/or target item.

Returns:
Type

getSourceItem

public Item getSourceItem()
Gets this Change object's source item, or null if there is no source item.

Returns:
Item

getSourceLink

public LinkValue getSourceLink()
Gets this Change object's source, as a LinkValue.

Returns:
LinkValue

getTargetItem

public Item getTargetItem()
Gets this Change object's target item, or null if there is no target item.

Returns:
Item

getTargetLink

public LinkValue getTargetLink()
Gets this Change object's target, as a LinkValue.

Returns:
LinkValue

getSourceVersion

public DotNotation getSourceVersion()
Gets the version number of the source item.

Returns:
The version number of the source item, or null.

getTargetVersion

public DotNotation getTargetVersion()
Gets the version number of the target item.

Returns:
The version number of the target item, or null.

getCommitAction

public Change.CommitAction getCommitAction()
Gets a value representing the action that was performed to commit this change.

Returns:
EnumeratedValue

findSource

public static ChangeCollection findSource(Item source)
Finds all Change objects for which the given item is the source.

The resulting Change objects may reside in any view on this server. They are always sorted by CreatedTime, with the most recent first.

Parameters:
source - Item
Returns:
ChangeCollection

findTarget

public static ChangeCollection findTarget(Item target)
Finds all Change objects for which the given item is the target.

The resulting Change objects may reside in any view on this server. They are always sorted by CreatedTime, with the most recent first.

Parameters:
target - Item
Returns:
ChangeCollection

hasChanges

public static boolean[] hasChanges(Item[] sources,
                                   Item[] targets)
Check for changes between the specified sources and targets. Return true if a subsequent call to find(source, target) would return a non-empty ChangeCollection false if the call would return an empty ChangeCollection each source is tested against the matching target all the sources should be from the same view all the targets should be from the same view however, the sources & the targets are expected to be fro different views

Parameters:
sources - the set of sources to compare
targets - the set of targets to compare against
Returns:
boolean array for every pair, true if the pair has changes, false if not. An empty array if returned if the server does not support this query.

find

public static ChangeCollection find(Item source,
                                    Item target)
Finds all Change objects for which the given items are the source and/or target.

The source item may be null, in which case any source item will do; or, the target item may be null, in which case any target item will do. If both source and target are specified, then they must belong to the same server instance.

The resulting Change objects may reside in any view on this server. They are always sorted by CreatedTime, with the most recent first.

Parameters:
source - Item
target - Item
Returns:
ChangeCollection


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