on 11-14-2008 3:38 PM
Hi,
I'm trying to port some code from old MDM4J and put it to work on the new MDM Java API, but I can't find a object that substitute the old classes. Look at this piece of code, please:
TaxonomyLookupParameter txParameter = new TaxonomyLookupParameter(tableProducts, fieldUnscpsc);
AttributeParameters params = txParameter.GetAttributes();
params.NewFeatureParameter(myAttributeId)).Add(Integer.parseInt(myAttributeValue));
FreeFormTableParameter freeFormTableParameter = new FreeFormTableParameter(tableProducts);
freeFormTableParameter.GetFields().New(fieldUnscpsc).GetFreeForm().NewString(myFreeTableString, FreeFormParameter.EqualToSearchType);
Search search = new Search(tableProducts);
search.Add(freeFormTableParameter);
search.Add(txParameter);
I'm trying to find a substitute for those classes: TaxonomyLookupParameter, AttributeParameters and FreeFormTableParameter.
Regards
Hi,
Please find some sample code.
SearchWithAttributes serAtt =new SearchWithAttributes();
LookupFieldProperties lookupFieldSer = (LookupFieldProperties) serFieldName;
AttributeSearchDimension attLookupType = new AttributeSearchDimension(serFieldName.getId(), serAttName.getId());
TextAttributeValueProperties attValProp = serAtt.serTextAttributeValue(connections, sessionId, lookupFieldSer.getLookupTableId(), serAttName, serFieldValue);
MdmValue[] strValue = { new TextAttributeValue(attValProp.getId()) };
PickListSearchConstraint pickListserConstraint = new PickListSearchConstraint(strValue);
// Searching the record by specifying the Table Name, Field Name andCondition
Search seSearchMainRoot = new Search(new TableId(serTableName.getId()));
// Add the parameters to the search
seSearchMainRoot.addSearchItem(attLookupType, pickListserConstraint);
Thanks,
Priya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.