Class LookupSpec

java.lang.Object
wt.inf.container.LookupSpec
All Implemented Interfaces:
Serializable, Cloneable

public final class LookupSpec extends Object implements Cloneable, Serializable
Encapsulates the criteria needed to do a container-based lookup. The lookup will execute the queries in the querySpecs property in each container starting with startPoint and ending with endPoint. Objects located in containers for which the user does not have Read permission will be excluded from the lookup results.
Usage:
 //find all docs in proj and its parents
 Project2 proj = getProjectToStartIn();
 //build a query for documents, this query will be executed in proj &its
 parents
 QuerySpec qs = new QuerySpec(WTDocumentMaster.class);
 LookupSpec ls = new LookupSpec(qs,WTContainerRef.newWTContainerRef(proj));
 QueryResult qr = WTContainerHelper.service.lookup(ls);
 //filter out "overridden" docs. by default this is done by comparing
 the "name" property of the objects
 ls.setFilterOverrides(true);
 qr = WTContainerHelper.service.lookup(ls);
 //only fiind documents named "plan"
 ls.setFilterOverrides(false);
 qs.appendWhere(new SearchCondition(WTDocumentMaster.class, WTDocumentMaster.NAME,
 SearchCondiiton.EQUAL, "Plan"), new int[]{0});
 qr = WTContainerHelper.service.lookup(ls);
 //only return the first doc named "plan"
 ls.setFirstMatchOnly(true);
 qr = WTContainerHelper.service.lookup(ls);
 


Supported API: true

Extendable: false
See Also: