com.sap.mdm.matching.commands
Class RetrieveMatchingResultCommand

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.matching.commands.RetrieveMatchingResultCommand
All Implemented Interfaces:
Command, PassportSupport

public class RetrieveMatchingResultCommand
extends AbstractUserSessionCommand

A command to retrieve the matching results for a matching strategy. The matching results are an overview of a matching strategy for the individual source record.

See Also:
ExecuteMatchingStrategyCommand, ExecuteMatchingStrategyForNewRecordValuesCommand, com.sap.mdm.matching.commands

Constructor Summary
RetrieveMatchingResultCommand(ConnectionAccessor connection)
          Creates a new instance of this command.
RetrieveMatchingResultCommand(UserSessionContext ctx)
          Creates a new instance of this command by context.
 
Method Summary
 SortDefinition getFieldSortingOrder()
          Deprecated. replaced by ResultDefinition.getFieldSortingOrder()
 MatchingResult[] getMatchingResults()
           Returns the matching results.
 MatchingTaskId getMatchingTaskId()
          Returns the matching task Id.
 int getPageIndex()
          Returns the paging index.
 int getPageSize()
          Returns the page size.
 RecordId[] getRecordIds()
          Returns the source records.
 int getRegionalLayer()
          Retrieves the regional layer.
 ResultDefinition getResultDefinition()
          Returns the result definition.
 Search getSearch()
          Returns the source records in a form of a search object.
 ResultDefinition[] getSupportingResultDefinitions()
          Returns the list of result definitions.
 boolean isRetrieveDisplayValue()
          Indicates if display values should be retrieved.
 void setFieldSortingOrder(SortDefinition fieldSortingOrder)
          Deprecated. replaced by ResultDefinition.setFieldSortingOrder(SortDefinition)
 void setMatchingTaskId(MatchingTaskId matchingTaskId)
          Sets the matching task Id (required).
 void setPageIndex(int pageIndex)
          Sets the paging index (optional).
 void setPageSize(int pageSize)
          Sets the page size (optional).
 void setRegionalLayer(int regionalLayer)
          Sets the regional layer to retrieve (optional).
 void setResultDefinition(ResultDefinition resultDefinition)
          Sets the result definition (required).
 void setRetrieveDisplayValue(boolean isRetrieveDisplayValue)
          Indicates whether display value should be retrieved (optional).
 void setSource(RecordId[] recordIds)
          Sets the source records (required*).
 void setSource(Search search)
          Sets the source records in a form of a search object (required*).
 void setSupportingResultDefinitions(ResultDefinition[] supportingResultDefinitions)
          Sets the result definition (optional).
 
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

RetrieveMatchingResultCommand

public RetrieveMatchingResultCommand(ConnectionAccessor connection)
Creates a new instance of this command.

Parameters:
connection - the connections to the server.

RetrieveMatchingResultCommand

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

Parameters:
ctx - the user session context.
Method Detail

getMatchingTaskId

public MatchingTaskId getMatchingTaskId()
Returns the matching task Id.

Returns:
a matching task Id

setMatchingTaskId

public void setMatchingTaskId(MatchingTaskId matchingTaskId)
Sets the matching task Id (required). This identifier is a handle to the matching strategy that was executed.

Parameters:
matchingTaskId - a matching task Id
See Also:
ExecuteMatchingStrategyCommand, ExecuteMatchingStrategyForNewRecordValuesCommand

getSearch

public Search getSearch()
Returns the source records in a form of a search object. This is null if setSource(RecordId[]) was used.

Returns:
the source records

setSource

public void setSource(Search search)
Sets the source records in a form of a search object (required*). This is the source records specified in the execution of a matching strategy.

Parameters:
search - a search object

getRecordIds

public RecordId[] getRecordIds()
Returns the source records. This is null if setSource(Search) was used.

Returns:
the source records

setSource

public void setSource(RecordId[] recordIds)
Sets the source records (required*). This is the source records specified in the execution of a matching strategy.

Parameters:
recordIds - a list of record IDs

getMatchingResults

public MatchingResult[] getMatchingResults()

Returns the matching results. Each matching result contains a source record and the list of matched records.

Note: For this command, MatchingResult.getMatchedRecordResults() will return null. Please use RetrieveMatchedRecordsCommand to retrieve this info.

Returns:
the matching results

getResultDefinition

public ResultDefinition getResultDefinition()
Returns the result definition.

Returns:
the result definition

setResultDefinition

public void setResultDefinition(ResultDefinition resultDefinition)
Sets the result definition (required). The result definition specifies the list of field/columns to retrieve the data for.

Parameters:
resultDefinition - a result definition

getFieldSortingOrder

public SortDefinition getFieldSortingOrder()
Deprecated. replaced by ResultDefinition.getFieldSortingOrder()

Returns the field sorting order.

Returns:
the field sorting order

setFieldSortingOrder

public void setFieldSortingOrder(SortDefinition fieldSortingOrder)
Deprecated. replaced by ResultDefinition.setFieldSortingOrder(SortDefinition)

Sets the field sorting order (optional). The default is no sort order.

Parameters:
fieldSortingOrder - a field sorting order

getSupportingResultDefinitions

public ResultDefinition[] getSupportingResultDefinitions()
Returns the list of result definitions. These result definitions specify the list of fields/columns to retrieve for supporting lookup fields from the main result definition.

Returns:
the list of result definitions

setSupportingResultDefinitions

public void setSupportingResultDefinitions(ResultDefinition[] supportingResultDefinitions)
Sets the result definition (optional). The result definition specifies the list of field/columns to retrieve the data for. The default is none.

Parameters:
supportingResultDefinitions - the result definitions

getPageIndex

public int getPageIndex()
Returns the paging index. The paging index is zero-based.

Returns:
a paging index

setPageIndex

public void setPageIndex(int pageIndex)
Sets the paging index (optional). It allows for retrieving the matching result a page at time instead of all at once. The paging index is zero-based. The default is zero.

Parameters:
pageIndex - the paging index

getPageSize

public int getPageSize()
Returns the page size. The page size specifies the maximum number of records to retrieve for a page.

Returns:
a page size

setPageSize

public void setPageSize(int pageSize)
Sets the page size (optional). The page size specifies the maximum number of records to retrieve. The default is 100.

Parameters:
pageSize - a page size

isRetrieveDisplayValue

public boolean isRetrieveDisplayValue()
Indicates if display values should be retrieved.

Returns:
true if display value should be retrieved, otherwise false
Since:
7.1 SP4

setRetrieveDisplayValue

public void setRetrieveDisplayValue(boolean isRetrieveDisplayValue)
Indicates whether display value should be retrieved (optional). The default is true.

Parameters:
isRetrieveDisplayValue - true if display value should be retrieved, otherwise false
Since:
7.1 SP4

getRegionalLayer

public int getRegionalLayer()
Retrieves the regional layer.

Returns:
the regional layer
Since:
7.1 SP4

setRegionalLayer

public void setRegionalLayer(int regionalLayer)
Sets the regional layer to retrieve (optional). The default is RegionalLayer.CURRENT.

Parameters:
regionalLayer - the regional layer
Since:
7.1 SP4


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.