wt.epm.structure
Class NavigateCollectors.Endpoints

java.lang.Object
  extended bywt.epm.structure.NavigateCollectors.AbstractCollector
      extended bywt.epm.structure.NavigateCollectors.Endpoints
All Implemented Interfaces:
NavigateResultProcessor, ResultProcessor
Enclosing class:
NavigateCollectors

public static class NavigateCollectors.Endpoints
extends NavigateCollectors.AbstractCollector

This NavigateResultProcessor collects the endpoints of the links and adds them to a Collection or WTKeyedMap. The endpoints are two-element arrays where the first element is the query key for the object that we navigated from and the second element is the query key for the object that we navigated to (i.e. the other-side object).


Field Summary
 
Fields inherited from class wt.epm.structure.NavigateCollectors.AbstractCollector
COLLECTION, INITIAL_SIZE, MAP, otherSideRole, results, resultType, reverse, role
 
Constructor Summary
NavigateCollectors.Endpoints(Collection collection)
          With this constructor, the class will add the endpoints of the links to the given Collection.
NavigateCollectors.Endpoints(WTKeyedMap map, boolean reverse)
          With this constructor, the class will add the endpoints of the links to the given WTKeyedMap.
 
Method Summary
 void addElement(Object object)
          Add the specified object to the result processor, and increase the size by one

Supported API: false
 void selectWhatToReturn(Relationship relationship, QuerySpec querySpec)
          Specifies what objects or attributes to return when navigating a Binary link from one set of objects to another.
 
Methods inherited from class wt.epm.structure.NavigateCollectors.AbstractCollector
clearPreviousResults, createQueryKey, getResults, processResults, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavigateCollectors.Endpoints

public NavigateCollectors.Endpoints(Collection collection)
With this constructor, the class will add the endpoints of the links to the given Collection. The endpoints are two-element arrays where the first element is the query key for the object that we navigated from and the second element is the query key for the object that we navigated to (i.e. the other-side object).


NavigateCollectors.Endpoints

public NavigateCollectors.Endpoints(WTKeyedMap map,
                                    boolean reverse)
With this constructor, the class will add the endpoints of the links to the given WTKeyedMap.

If the reverse flag is false, the values will be WTSets that hold the query keys for the other-side objects and the keys will be the query keys for the objects that we navigated from.

If the reverse flag is true, the keys will be the query keys for the other-side objects and the values will be WTSets that hold the query keys for the objects that we navigated from.

Method Detail

selectWhatToReturn

public void selectWhatToReturn(Relationship relationship,
                               QuerySpec querySpec)
                        throws WTException
Description copied from interface: NavigateResultProcessor
Specifies what objects or attributes to return when navigating a Binary link from one set of objects to another. The method may specify to return the links, the other-side objects, or specific attributes of either object or any combination of the three.

Supported API: false

Specified by:
selectWhatToReturn in interface NavigateResultProcessor
Overrides:
selectWhatToReturn in class NavigateCollectors.AbstractCollector
Throws:
WTException

addElement

public void addElement(Object object)
Description copied from interface: ResultProcessor
Add the specified object to the result processor, and increase the size by one

Supported API: false

Specified by:
addElement in interface ResultProcessor
Specified by:
addElement in class NavigateCollectors.AbstractCollector