org.yawlfoundation.yawl.worklet.selection
Class CheckedOutItem

java.lang.Object
  extended by org.yawlfoundation.yawl.worklet.selection.CheckedOutItem

public class CheckedOutItem
extends Object

The CheckedOutItem class maintains, for a workitem that has been checked-out of the engine, a dynamic set of data for each of the child items of which this workitem is a 'parent'. Note that all YAWL workitems have at least one child. ================== ======================= | CheckedOutItem | 1----M | CheckedOutChildItem | ================== ======================= ^^^

Author:
Michael Adams v0.8, 04-09/2006

Constructor Summary
CheckedOutItem()
           
CheckedOutItem(WorkItemRecord w)
          Constructs a CheckedOutItem
 
Method Summary
 void addChild(CheckedOutChildItem child)
          adds child from ChildItem (used when restoring from persistence)
 void addChild(WorkItemRecord w)
          adds a new child item to this parent
 String get_persistID()
           
 String get_wirStr()
           
 CheckedOutChildItem getCheckedOutChildItem(int i)
          returns the CheckedOutChildItem object of the index childitem
 CheckedOutChildItem getCheckedOutChildItem(String itemId)
          returns the CheckedOutChildItem object of the childitem with the id
 int getChildCount()
          returns the number of children of this parent
 List getChildren()
           
 WorkItemRecord getChildWorkItem(int i)
          returns the WorkItemRecord of the index childitem
 WorkItemRecord getItem()
           
 String getParentID()
           
 int getSpawnCount()
           
 YSpecificationID getSpecId()
           
 int getThreshold()
           
 boolean hasCheckedOutChildItem(CheckedOutChildItem child)
          returns true if this parent has the child passed
 boolean hasCheckedOutChildItems()
          returns true if this parent has children
 void incCompletedItems()
           
 void initNonPersistedItems()
           
 boolean isMultiTask()
           
 void persistThis()
           
 void removeAllChildren()
          removes all child records from this parent
 int removeChild(CheckedOutChildItem childToRemove)
          removes the child referenced by the CheckedOutChildItem passed
 void removeChild(int idx)
          removes the indexed child from the list of children
 void set_persistID(String id)
           
 void set_wirStr(String s)
           
 void setChildren(List c)
           
 void setItem(WorkItemRecord w)
           
 void setSpawnCount(int count)
           
 void setThreshold(int thres)
           
 boolean thresholdReached()
           
 String toString()
          returns String representation of current CheckedOutItem
 String toStringSub()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CheckedOutItem

public CheckedOutItem()

CheckedOutItem

public CheckedOutItem(WorkItemRecord w)
Constructs a CheckedOutItem

Parameters:
w - - the WorkItemRecord of the 'parent' workitem
Method Detail

set_persistID

public void set_persistID(String id)

set_wirStr

public void set_wirStr(String s)

get_wirStr

public String get_wirStr()

get_persistID

public String get_persistID()

initNonPersistedItems

public void initNonPersistedItems()

persistThis

public void persistThis()

setItem

public void setItem(WorkItemRecord w)

setChildren

public void setChildren(List c)

setSpawnCount

public void setSpawnCount(int count)

setThreshold

public void setThreshold(int thres)

isMultiTask

public boolean isMultiTask()

incCompletedItems

public void incCompletedItems()

thresholdReached

public boolean thresholdReached()

getItem

public WorkItemRecord getItem()

getSpecId

public YSpecificationID getSpecId()

getChildren

public List getChildren()

getParentID

public String getParentID()

getSpawnCount

public int getSpawnCount()

getThreshold

public int getThreshold()

getChildWorkItem

public WorkItemRecord getChildWorkItem(int i)
returns the WorkItemRecord of the index childitem


getCheckedOutChildItem

public CheckedOutChildItem getCheckedOutChildItem(int i)
returns the CheckedOutChildItem object of the index childitem


getCheckedOutChildItem

public CheckedOutChildItem getCheckedOutChildItem(String itemId)
returns the CheckedOutChildItem object of the childitem with the id


addChild

public void addChild(WorkItemRecord w)
adds a new child item to this parent


addChild

public void addChild(CheckedOutChildItem child)
adds child from ChildItem (used when restoring from persistence)


getChildCount

public int getChildCount()
returns the number of children of this parent


removeChild

public void removeChild(int idx)
removes the indexed child from the list of children


removeChild

public int removeChild(CheckedOutChildItem childToRemove)
removes the child referenced by the CheckedOutChildItem passed

Returns:
the (former) index of the removed child

removeAllChildren

public void removeAllChildren()
removes all child records from this parent


hasCheckedOutChildItems

public boolean hasCheckedOutChildItems()
returns true if this parent has children


hasCheckedOutChildItem

public boolean hasCheckedOutChildItem(CheckedOutChildItem child)
returns true if this parent has the child passed


toString

public String toString()
returns String representation of current CheckedOutItem

Overrides:
toString in class Object

toStringSub

public String toStringSub()


Copyright © 2004-2012 The YAWL Foundation.