org.pm4j.core.pm.impl
Class ChangedChildStateRegistry

java.lang.Object
  extended by org.pm4j.core.pm.impl.ChangedChildStateRegistry

public class ChangedChildStateRegistry
extends java.lang.Object

A registry that observes changes of items within parent PM.

Current restriction: Works only if all items belong to the same class. E.g. PmTableRowPm for It may work if all items

Author:
OBOEDE

Constructor Summary
ChangedChildStateRegistry(PmObject observedRootPm)
           
 
Method Summary
 void clearChangedItems()
           
protected  PmDataInput findChildItemToObserve(PmObject changedItem)
           
 java.util.Collection<PmObject> getChangedItems()
           
 boolean isAChangeRegistered()
           
 void onAddNewItem(PmObject newItemPm)
           
 void onDeleteItem(PmObject deletedItem)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangedChildStateRegistry

public ChangedChildStateRegistry(PmObject observedRootPm)
Parameters:
observedRootPm - The PM to observe the child item change states for.
itemPmClass - The class of the child items to observe.
Method Detail

isAChangeRegistered

public boolean isAChangeRegistered()

findChildItemToObserve

protected PmDataInput findChildItemToObserve(PmObject changedItem)

clearChangedItems

public void clearChangedItems()

onAddNewItem

public void onAddNewItem(PmObject newItemPm)

onDeleteItem

public void onDeleteItem(PmObject deletedItem)

getChangedItems

public java.util.Collection<PmObject> getChangedItems()