wt.epm.clients.relateditems
Class RelatedItemsProcessor.ObjectGroup

java.lang.Object
  extended bywt.epm.clients.relateditems.RelatedItemsProcessor.ObjectGroup
Enclosing class:
RelatedItemsProcessor

protected static class RelatedItemsProcessor.ObjectGroup
extends Object

ObjectGroup is a collection of objects that share a common lineage. The lineage describes how the objects in the group are related to (or derived from) a selected object.


Field Summary
private  String lineage
           
private  List objects
           
 
Constructor Summary
protected RelatedItemsProcessor.ObjectGroup(List objects, RelatedItemsSelector.IncludeType includeType)
          Constructs an ObjectGroup.
protected RelatedItemsProcessor.ObjectGroup(List objects, RelatedItemsSelector.IncludeType includeType, String lineage)
          Constructs an ObjectGroup.
private RelatedItemsProcessor.ObjectGroup(List objects, String lineage)
           
 
Method Summary
static List filter(Collection groups, EPMFilter filter)
          Filters each group on the given list.
 RelatedItemsProcessor.ObjectGroup filter(EPMFilter filter)
          Filters the list of objects that belong to this group and returns a new ObjectGroup that holds the filtered list of objects.
static List getAllObjects(Collection groups)
          Returns all of the objects from all of the groups in the given list.
private static QueryKey getKey(Persistable object)
           
 String getLineage()
           
 Collection getObjects()
           
private static Map indexByMaster(Collection groups)
           
 boolean isEmpty()
           
static void reconcile(Collection firstGroups, Collection secondGroups)
          Reconciles the differences between the two sets of groups.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objects

private List objects

lineage

private String lineage
Constructor Detail

RelatedItemsProcessor.ObjectGroup

protected RelatedItemsProcessor.ObjectGroup(List objects,
                                            RelatedItemsSelector.IncludeType includeType)
Constructs an ObjectGroup.


RelatedItemsProcessor.ObjectGroup

protected RelatedItemsProcessor.ObjectGroup(List objects,
                                            RelatedItemsSelector.IncludeType includeType,
                                            String lineage)
Constructs an ObjectGroup.


RelatedItemsProcessor.ObjectGroup

private RelatedItemsProcessor.ObjectGroup(List objects,
                                          String lineage)
Method Detail

getObjects

public Collection getObjects()

getLineage

public String getLineage()

isEmpty

public boolean isEmpty()

filter

public RelatedItemsProcessor.ObjectGroup filter(EPMFilter filter)
                                         throws WTException
Filters the list of objects that belong to this group and returns a new ObjectGroup that holds the filtered list of objects. The original group is left unchanged.

Throws:
WTException

filter

public static List filter(Collection groups,
                          EPMFilter filter)
                   throws WTException
Filters each group on the given list. Returns a new list that holds the new filtered groups. The original groups and list are left unchanged.

Throws:
WTException

reconcile

public static void reconcile(Collection firstGroups,
                             Collection secondGroups)
Reconciles the differences between the two sets of groups. If a group in the second set has a different iteration of the same master as a group in the first set, it is replaced with the iteration from the first group. A master in either set is replaced with an iteration from the other.


getAllObjects

public static List getAllObjects(Collection groups)
Returns all of the objects from all of the groups in the given list. Since an object may belong to more than one group, duplicates are removed.


indexByMaster

private static Map indexByMaster(Collection groups)

getKey

private static QueryKey getKey(Persistable object)