com.starbase.starteam
Class PromotionModel

java.lang.Object
  |
  +--com.starbase.starteam.CacheRef
        |
        +--com.starbase.starteam.NamedCacheRef
              |
              +--com.starbase.starteam.TypedResource
                    |
                    +--com.starbase.starteam.SimpleTypedResource
                          |
                          +--com.starbase.starteam.PromotionModel
All Implemented Interfaces:
java.lang.Cloneable

public class PromotionModel
extends SimpleTypedResource

This class represents the Promotion model for a view. Each view has a single promotion model. The PromotionModel class primarily acts as the owner of an ordered list of PromotionStates.

See Also:
PromotionState

Method Summary
 boolean equals(java.lang.Object source)
          returns true if this object instance is equal to the source
 int getCreatedBy()
          Returns the User ID for the creator of the PromotionModel.
 OLEDate getCreatedOn()
          Returns the time at which the PromotionModel was created.
 int getDeletedBy()
          Returns the User ID for the user that deleted the model.
 OLEDate getDeletedOn()
          Returns the time at which the PromotionModel was deleted.
 java.lang.String getDescription()
          Returns the description of the PromotionModel.
 int getID()
          Return the object ID for the PromotionModel.
 java.lang.String getName()
          Returns the name of the PromotionModel.
 int getObjectID()
          Return the object ID for the PromotionModel.
 PromotionState[] getPromotionStates()
          Returns an array of PromotionStates for this model.
 View getView()
          Returns the View that owns this PromotionModel.
 int hashCode()
          returns a unique hash for all instances of this type
 void setDescription(java.lang.String description)
          Sets the description of the PromotionModel.
 void setName(java.lang.String name)
          Sets the name of the PromotionModel.
 void setPromotionStates(PromotionState[] states)
          Changes the list of PromotionStates for this model.
 java.lang.String toDebugString()
          Return a debug string for this model.
 void update()
          Stores the modified PromotionModel in the repository.
 
Methods inherited from class com.starbase.starteam.SimpleTypedResource
get, getByteArray, getDouble, getEnumDisplayName, getInt, getIntArray, getOLEDate, getPossibleValues, getPropertyNames, getString, getType, getTypeNames, put, putByPropertyID
 
Methods inherited from class com.starbase.starteam.TypedResource
addToIntArray, removeFromIntArray, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getView

public View getView()
Returns the View that owns this PromotionModel.

Returns:
the view for this model.

getObjectID

public int getObjectID()
Return the object ID for the PromotionModel.

Returns:
the model's object ID

getID

public int getID()
Return the object ID for the PromotionModel.

Overrides:
getID in class SimpleTypedResource
Returns:
the model's object ID. Same as getObjectID.

getName

public java.lang.String getName()
Returns the name of the PromotionModel.

Returns:
the name of the model

setName

public void setName(java.lang.String name)
Sets the name of the PromotionModel.

Parameters:
name - the new name for this promotion model

getDescription

public java.lang.String getDescription()
Returns the description of the PromotionModel.

Returns:
a description string for this model

setDescription

public void setDescription(java.lang.String description)
Sets the description of the PromotionModel.

Parameters:
description - the new description for this model

getCreatedOn

public OLEDate getCreatedOn()
Returns the time at which the PromotionModel was created.

Returns:
the time at which this model was created

getCreatedBy

public int getCreatedBy()
Returns the User ID for the creator of the PromotionModel.

Returns:
the user ID for the creator of this model

getDeletedOn

public OLEDate getDeletedOn()
Returns the time at which the PromotionModel was deleted.

Returns:
the time at which this model was deleted

getDeletedBy

public int getDeletedBy()
Returns the User ID for the user that deleted the model. Will return -1 for non-deleted models.

Returns:
the user ID for who deleted the model

getPromotionStates

public PromotionState[] getPromotionStates()
Returns an array of PromotionStates for this model. The ordering of states is significant.

Returns:
an array of promotion states defining this model
See Also:
PromotionModel.setPromotionStates(com.starbase.starteam.PromotionState[])

setPromotionStates

public void setPromotionStates(PromotionState[] states)
Changes the list of PromotionStates for this model. The array can contain new states and/or the array can be a re-ording of states.

Parameters:
states - the new array of promotion states
See Also:
PromotionModel.getPromotionStates()

update

public void update()
Stores the modified PromotionModel in the repository. Until this is called all changes to the model are local.


toDebugString

public java.lang.String toDebugString()
Return a debug string for this model.

Returns:
a debug string for this model.

equals

public boolean equals(java.lang.Object source)
returns true if this object instance is equal to the source

Overrides:
equals in class SimpleTypedResource
Parameters:
source - Object the source to comapre with
Returns:
boolean true if this object is equal to the source

hashCode

public int hashCode()
returns a unique hash for all instances of this type

Overrides:
hashCode in class SimpleTypedResource
Returns:
int a unique hash for all instances of this type


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.