com.sap.mdm.data.commands
Class RetrieveLimitedHierTreeCommand

java.lang.Object
  extended bycom.sap.mdm.commands.AbstractCommandBase
      extended bycom.sap.mdm.commands.AbstractCommand
          extended bycom.sap.mdm.session.AbstractSessionCommand
              extended bycom.sap.mdm.session.AbstractUserSessionCommand
                  extended bycom.sap.mdm.data.commands.AbstractRetrieveLimitedRecordsCommand
                      extended bycom.sap.mdm.data.commands.AbstractRetrieveHierCommand
                          extended bycom.sap.mdm.data.commands.RetrieveLimitedHierTreeCommand
All Implemented Interfaces:
Command, PassportSupport
Direct Known Subclasses:
RetrieveLimitedHierTreeExCommand

public class RetrieveLimitedHierTreeCommand
extends AbstractRetrieveHierCommand

This command allows for retrieving the limited hierarchy tree based on the search criteria. Note: in case no open node id is set all tree nodes will be loaded.

See Also:
RetrieveLimitedHierChildrenCommand, RetrieveHierAncestorsCommand

Constructor Summary
RetrieveLimitedHierTreeCommand(ConnectionAccessor connection)
          Constructor.
RetrieveLimitedHierTreeCommand(UserSessionContext ctx)
          Creates a new instance of this command by context.
 
Method Summary
 RecordId[] getExpandedNodes()
          Returns the list of expanded nodes.
 RecordId[] getOpenNodeIds()
          Deprecated. replaced by getExpandedNodes()
 PickList getPicklist()
          Returns the pick list.
 FieldId[] getResultTablePath()
          Returns the result table path.
 RecordId getRootNode()
          Gets the root node for the limited tree.
 Search getSearch()
          Returns the search criteria.
 int getSearchTableMatchCount()
          Returns the match count for the search table, based on the search criteria.
 HierNode getTree()
          Returns limited hierarchy tree.
 boolean isRetrieveResultCounts()
          Returns true if result counts should be retrieved, otherwise returns false.
 void setExpandedNodes(RecordId[] expandedNodes)
          Specifies the list of expanded nodes such that other nodes, although valid, won't be included in the result (optional) .
 void setOpenNodeIds(RecordId[] openNodeIds)
          Deprecated. replaced by setExpandedNodes(RecordId[])
 void setResultTablePath(FieldId[] resultTablePath)
          Sets the result table path (optional).
 void setRetrieveResultCounts(boolean isRetrieveResultCounts)
          Specifies whether to retrieve result counts or not.
 void setRootNode(RecordId rootNode)
          Sets the root node for the limited tree (optional).
 void setSearch(Search search)
          Sets the search criteria (required).
 
Methods inherited from class com.sap.mdm.data.commands.AbstractRetrieveLimitedRecordsCommand
getRegionalLayer, getResultDefinition, getSupportingResultDefinitions, isRetrieveDisplayValue, setRegionalLayer, setResultDefinition, setRetrieveDisplayValue, setSupportingResultDefinitions
 
Methods inherited from class com.sap.mdm.commands.AbstractCommand
getSession, setSession
 
Methods inherited from class com.sap.mdm.commands.AbstractCommandBase
execute, getPassport, isCommandComplete, setPassport
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RetrieveLimitedHierTreeCommand

public RetrieveLimitedHierTreeCommand(ConnectionAccessor connection)
Constructor.

Parameters:
connection - the connection to the MDM server

RetrieveLimitedHierTreeCommand

public RetrieveLimitedHierTreeCommand(UserSessionContext ctx)
                               throws ConnectionException,
                                      SessionException
Creates a new instance of this command by context.

Parameters:
ctx - the user session context.
Method Detail

getSearch

public Search getSearch()
Returns the search criteria. The search criteria specifies the search table and what to search for.

Returns:
the search criteria

setSearch

public void setSearch(Search search)
Sets the search criteria (required). The search criteria specifies the search table and what to search for.

Parameters:
search - the search criteria

getResultTablePath

public FieldId[] getResultTablePath()
Returns the result table path. The result table path specifies the table to retrieve data from. It is specified by a list of fields. If the result table is the same as the search table, the list of field path is an empty list. Defaults to the search table.

Returns:
the result table path

setResultTablePath

public void setResultTablePath(FieldId[] resultTablePath)
Sets the result table path (optional). The result table path specifies the table to retrieve data from. It is specified by a list of fields. If the result table is the same as the search table, the list of field path is an empty list. If not specified empty list is used.

Parameters:
resultTablePath - the list of field Ids specifying the result table

setOpenNodeIds

public void setOpenNodeIds(RecordId[] openNodeIds)
Deprecated. replaced by setExpandedNodes(RecordId[])

Sets the ids of nodes that should be opened in the hierarchy tree (optional). Supply record id value 0 if you want to specify root as opened node. Opened node means the node and the first level children of the node are loaded only.

Parameters:
openNodeIds - The ids of records that should be opened.

getOpenNodeIds

public RecordId[] getOpenNodeIds()
Deprecated. replaced by getExpandedNodes()

Gets the ids of nodes that should be opened in the hierarchy tree. Opened node means the node and the first level children of the node are loaded .

Returns:
ids of open records.

setExpandedNodes

public void setExpandedNodes(RecordId[] expandedNodes)
Specifies the list of expanded nodes such that other nodes, although valid, won't be included in the result (optional) . The default is an empty array which is to retrieve all valid nodes. The main use case is when the hierarchy tree to retrieve has thousand of nodes.

For a given node, all ancestor nodes and it's immediate children nodes will be retrieved. To specifies the root node, provide a record of "RecordId(0)".

Parameters:
expandedNodes - a list of expanded nodes
Since:
7.1 SP 3

getExpandedNodes

public RecordId[] getExpandedNodes()
Returns the list of expanded nodes.

Returns:
a list of expanded nodes
Since:
7.1 SP 3

getRootNode

public RecordId getRootNode()
Gets the root node for the limited tree.

Returns:
the record ID of the root node

setRootNode

public void setRootNode(RecordId rootNode)
Sets the root node for the limited tree (optional). If not specified then root of hierarchy table will be used.

Parameters:
rootNode - the record ID of the root node

getTree

public HierNode getTree()
Returns limited hierarchy tree.

Returns:
root node of the limited hierarchy tree

getSearchTableMatchCount

public int getSearchTableMatchCount()
Returns the match count for the search table, based on the search criteria.

Returns:
the count

isRetrieveResultCounts

public boolean isRetrieveResultCounts()
Returns true if result counts should be retrieved, otherwise returns false.

Returns:
true if result counts should be retrieved, otherwise returns false
Since:
7.1 SP 3

setRetrieveResultCounts

public void setRetrieveResultCounts(boolean isRetrieveResultCounts)
Specifies whether to retrieve result counts or not.

Parameters:
isRetrieveResultCounts - true if result counts should be retrieved, otherwise returns false
Since:
7.1 SP 3

getPicklist

public PickList getPicklist()
Returns the pick list.

Returns:
a pick list
Since:
7.1 SP 3


Copyright 2004-2007 by SAP AG. All Rights Reserved.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.