cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

SearchCriteriaInfo.setIteration()

AntonBagryanov
3-Visitor

SearchCriteriaInfo.setIteration()

Hi!

Anybody know which arguments should I set to the setIteration(String arg) method? And may be you know an example of ObjectRefs() method argument.

Thanks!

5 REPLIES 5

HI Anton,

Not sure if this is of any help, I just found a reference for SearchCriteriaInfo.setIteration(); in SearchQueryHelper.getIteration(...)

paramString1 = "LATEST";

paramSearchCriteriaInfo.setIteration(paramString1);

I havent used this personally.

I am not quiet sure if I understood the second part of your question - 'And may be you know an example of ObjectRefs() method argument.' What API do you intend to use this in?

-Malavika.

Hi Malavika!

I want to search only documents that have the link with the part. I think that I can set this option throughs method...

You can use reference factory to find reference of the object :

Iterator localIterator = null;

Object localObject1;

if (paramIterator != null) {

localObject1 = this.searchInfo.getCriteriaInfo();

ArrayList localArrayList = new ArrayList();

while (paramIterator.hasNext())

{

Object localObject2 = ((SearchResultItem)paramIterator.next()).getItem();

if ((localObject2 instanceof WTReference)) {

String str = referenceFactory.getReferenceString((WTReference)localObject2);

localArrayList.add(str);

}

else {

localArrayList.add((String)localObject2);

}

}

try

{

((SearchCriteriaInfo)localObject1).setObjectRefs((String[])localArrayList.toArray(new String[0]));

........

Not sure if this is what you were looking for.

On second thoughts, do you think SearchCriteiraInfo.setWhereClause(...) can help you find only documents that have the link with the part ?

I am not sure, that I can do it with the SearchCriteiraInfo.setWhereClause(...). I am finding how I can do it. Thanks for reply!

Ahh... Let me know when you've figured out a way.

Announcements