com.sap.mdm.data
Class ComparisonRecordResultSet

java.lang.Object
  extended bycom.sap.mdm.data.ComparisonRecordResultSet

public class ComparisonRecordResultSet
extends Object

A class for comparing records. It allows for determining:

  1. If the field values for a field is the same across all records.
  2. If the attribute values for an attribute is the same across all records.

Note: For multi-valued field values and attribute values, order does matter.
Note: Qualified lookup field is not supported.

Since:
5.5. SP6 Patch 04

Constructor Summary
ComparisonRecordResultSet(RecordResultSet rrs)
          Constructor with the specified record result set.
ComparisonRecordResultSet(RecordResultSet rrs, boolean isIgnoreNulls)
          Constructor with the specified record result set and whether to ignore null values.
 
Method Summary
 AttributeId[] getAttributeIds(FieldId fieldId)
          Returns the list of attributes for the specified taxonomy field.
 FieldId[] getFieldIds()
          Returns the list of fields in the record result set.
 RecordResultSet getRecordResultSet()
          Returns the record result set.
 boolean isIdentical(FieldId fieldId)
          Returns true if the field values are the same across all records, otherwise false.
 boolean isIdentical(FieldId fieldId, AttributeId attributeId)
          Returns true if the attribute values are the same across all records, otherwise false.
 boolean isIgnoreNulls()
          Returns true if ignore nulls was specified, otherwise false.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComparisonRecordResultSet

public ComparisonRecordResultSet(RecordResultSet rrs)
Constructor with the specified record result set.

Parameters:
rrs - a record result set

ComparisonRecordResultSet

public ComparisonRecordResultSet(RecordResultSet rrs,
                                 boolean isIgnoreNulls)
Constructor with the specified record result set and whether to ignore null values.

Parameters:
rrs - a record result set
isIgnoreNulls - true to ignore null value when comparing, otherwise false to take it into consideration
Method Detail

getRecordResultSet

public RecordResultSet getRecordResultSet()
Returns the record result set.

Returns:
a record result set

getFieldIds

public FieldId[] getFieldIds()
Returns the list of fields in the record result set.

Returns:
a list of fields

getAttributeIds

public AttributeId[] getAttributeIds(FieldId fieldId)
Returns the list of attributes for the specified taxonomy field. If the taxonomy field has different lookup values, a union of the attributes are returned.

Parameters:
fieldId - a taxonomy field
Returns:
a list of attributes

isIdentical

public boolean isIdentical(FieldId fieldId)
Returns true if the field values are the same across all records, otherwise false.

Parameters:
fieldId - a field
Returns:
true if the field values are the same across all records, otherwise false

isIdentical

public boolean isIdentical(FieldId fieldId,
                           AttributeId attributeId)
Returns true if the attribute values are the same across all records, otherwise false.

Parameters:
fieldId - a taxonomy field
attributeId - an attribute
Returns:
true if the attribute values are the same across all records, otherwise false

isIgnoreNulls

public boolean isIgnoreNulls()
Returns true if ignore nulls was specified, otherwise false.

Returns:
true if ignore nulls was specified, otherwise false


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.