com.sap.mdm.data.commands
Class RetrieveLimitedHierChildrenCommand

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.RetrieveLimitedHierChildrenCommand
All Implemented Interfaces:
Command, PassportSupport
Direct Known Subclasses:
RetrieveLimitedHierChildrenExCommand

public class RetrieveLimitedHierChildrenCommand
extends AbstractRetrieveHierCommand

This command allows to retrieve from the hierarchy table the set of records that are limited by search criteria and are the child records of the specified parent record.

See Also:
RetrieveHierAncestorsCommand, RetrieveLimitedHierTreeCommand

Constructor Summary
RetrieveLimitedHierChildrenCommand(ConnectionAccessor connection)
          Constructor
RetrieveLimitedHierChildrenCommand(UserSessionContext ctx)
          Creates a new instance of this command by context.
 
Method Summary
 RecordResultSet getChildren()
          Returns set of limited child nodes.
 RecordId getParentNode()
          Gets the parent node of the requested children.
 FieldId[] getResultTablePath()
          Returns the result table path.
 Search getSearch()
          Returns the search criteria.
 int getSearchTableMatchCount()
          Returns the match count for the search table, based on the search criteria.
 boolean isAutoTraverse()
          Indicates whether to traverse to first node that has more than one child or is a leaf node.
 void setAutoTraverse(boolean autoTraverse)
          Indicates whether to traverse a hierarchy tree to first node that has more than one child or is a leaf node (optional).
 void setParentNode(RecordId parentNodeId)
          Sets the parent node for the requested children (optional).
 void setResultTablePath(FieldId[] resultTablePath)
          Sets the result table path (optional).
 void setSearch(Search search)
          Sets the search criteria (optional).
 
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

RetrieveLimitedHierChildrenCommand

public RetrieveLimitedHierChildrenCommand(ConnectionAccessor connection)
Constructor

Parameters:
connection - the connection to the MDM server

RetrieveLimitedHierChildrenCommand

public RetrieveLimitedHierChildrenCommand(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. The search criteria can be specified either for hierarchy table itself or for any other table where the hierarchy table is used as lookup table.

Returns:
the search criteria

setSearch

public void setSearch(Search search)
Sets the search criteria (optional). The search criteria specifies the search table and what to search for. The search criteria can be specified either for hierarchy table itself or for any other table where the hierarchy table is used as lookup table. If search criteria is not specified all child nodes will be returned

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. By default the result table is the same as the search table.

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

getParentNode

public RecordId getParentNode()
Gets the parent node of the requested children.

Returns:
the record ID of the parent node

setParentNode

public void setParentNode(RecordId parentNodeId)
Sets the parent node for the requested children (optional). By default the hierarchy root is used.

Parameters:
parentNodeId - the record ID of the root node

isAutoTraverse

public boolean isAutoTraverse()
Indicates whether to traverse to first node that has more than one child or is a leaf node.

Returns:
true if need to traverse tree to first node that has more than one child or is a leaf node.

setAutoTraverse

public void setAutoTraverse(boolean autoTraverse)
Indicates whether to traverse a hierarchy tree to first node that has more than one child or is a leaf node (optional). By default is true.

Parameters:
autoTraverse - traverse tree to first node that has more than one child or is a leaf node.

getChildren

public RecordResultSet getChildren()
Returns set of limited child nodes.

Returns:
set of HierHode instances

getSearchTableMatchCount

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

Returns:
the count


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.