Skip to main content
1-Visitor
November 14, 2014
Question

SearchCriteriaInfo.setIteration()

  • November 14, 2014
  • 1 reply
  • 1810 views

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!

1 reply

1-Visitor
November 17, 2014

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.

1-Visitor
November 17, 2014

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...

1-Visitor
November 17, 2014

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 ?