cancel
Showing results for 
Search instead for 
Did you mean: 

MDM Java API:ComparisonRecordResultSet Usage????

Former Member
0 Kudos

Hi all,

Could someone explain to me what's the advantage of using ComparisonRecordResultSet class to retrieve data from MDM 7.1 using java APIs.

It would also help if i could get a sample code for the same.

Regards

Harsh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

This class can be used to compare records. If you want to retrieve data you have to use classes such as RetrieveLimitedRecordsCommand.

Here's a blog that explains how to use commands : [How to work with Command in the new MDM Java API|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/8642] [original link is broken] [original link is broken] [original link is broken];.

Regards,

Pierre

Former Member
0 Kudos

Hi,

I know how to execute commands and the blog mentioned does not demonstrate the Compare command.

I need some sample code.

Regards

Harsh

Former Member
0 Kudos

Hi,

According to the documentation, you should use it like this :

RecordResultSet records = limitingCommand.getRecords();

ComparisonRecordResultSet comparison = new ComparisonRecordResultSet(records);
boolean fieldValuesIdentical = comparison.isIdentical(fieldId); // true if the field values are identical across all records

Regards,

Pierre