cancel
Showing results for 
Search instead for 
Did you mean: 

Please share any code for searching Qualifier table using MDM 5.5 Java API

Former Member
0 Kudos

Hi All,

I have a requirement for searching a qualifier Look up and the Non Qualifier is a flat look up table.

I need to search on the qualifier values based on one value of Non Qualifier field.

Its like I have an Identification column in main table which is linked to an Qualifier - "ID".

ID has three fields -

IDType(Non - Qualifier) - this is a Flat look up

IDVal - Qualifier

IDCountry - Qualifier

Please help....

Regards,

Priya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Priya,

You may use the below code for searching Qualifiers for a Given Main Table record:

ResultDefinition objResultDefiniton = new ResultDefinition(new TableId(strMainTableID));

objResultDefiniton.addSelectField( new FieldId( (strMainTableQualifierFieldID ) ) );

RetrieveRecordsByIdCommand objRecordsByIDCommand = new RetrieveRecordsByIdCommand(getConnectionAccessor());

objRecordsByIDCommand.addId( new RecordId(strMainTableRecordID));

objRecordsByIDCommand.setSession(strUserSessionId);

objRecordsByIDCommand.setResultDefinition(objResultDefiniton);

objRecordsByIDCommand.execute();

if(objRecordsByIDCommand.getRecords().getCount() > 0)

QualifiedLinkValue objQualifiedLinkValue = (QualifiedLinkValue) objRecordsByIDCommand.getRecords().getRecord(0).getFieldValue( new FieldId( strMainTableQualifierFieldID )) ) ;

This will give you a QualifiedLinkValue from where you can retrieve the NoQualifier as well s Yes Qualifier values.

Since you have No Qualifier as a Lookup, you will get the Record Id of the No Qualifier in the QualifiedLinkValue. You can also try getDisplayValue() method of QualifiedLinkValue to get the Value of the no Qualifier(Not so sure i this last one will work).

Hope this helps!!

Cheers,

Arafat

Former Member
0 Kudos

Thanks for the reply..it helped.

Answers (0)