on 09-23-2008 3:06 PM
Hi,
I am using the MDM Java APIs in my WebDynpro component to retrieve the records from the MDM Repository. The Java API version is 5.5.63.60
I have a product table and it has several records with same product name. If I use the 'RetrieveRecordsByValueCommand', I get only one record i.e., the first encountered record that matches the product name. But, I want to retrieve all the records having the same product name.
What is the retrieveCommand that I can use to retrieve all the records with the same value for a given field?
With Regards,
Yuvaraj
Look at simple example:
ResultDefinition rd = new ResultDefinition(tblCEMP);
rd.setSelectFields(new FieldId[]{tblCEMP.BRANCHES, tblCEMP.FULL_NAME, tblCEMP.MAIL});
Search srch = new Search(tblCEMP);
SearchDimension sd = new FieldSearchDimension(tblCEMP.FULL_NAME);
SearchConstraint sc = new TextSearchConstraint(strSearch, TextSearchConstraint.EQUALS);
srch.addSearchItem(new SearchParameter(sd, sc));
RetrieveLimitedRecordsCommand cmd = new RetrieveLimitedRecordsCommand(gate.getPool());
cmd.setResultDefinition(rd);
cmd.setSearch(srch);
cmd.setSession(gate.getUsrSessionId());
cmd.setPageSize(1);
cmd.execute();
cmd.setPageSize(cmd.getSearchTableMatchCount());
cmd.execute();
RecordResultSet recs = cmd.getRecords();
tblCEMP and gate it's my own objects not from Java API
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the RetrieveLimitedRecordsCommand.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.