And (query directive)
From WandoraWiki
Contents |
Description
Includes rows which satisfy all inner filtering directives.
Constructor
And(WhereDirective d1,WhereDirective d2,...)
Notes
In simple cases you can avoid using And directive by calling the where method twice. A.where(new And(B,C)) is logically same as A.where(B).where(C) though structurally it resolves to a slightly different query.
Examples
importPackage(org.wandora.query2); importPackage(org.wandora.topicmap); new Instances().where( new And( new IsOfType("http://www.wandora.org/core/associationtype"), new IsOfType("http://www.wandora.org/core/contenttype") ) )
This gets all instances of the input topic that are also instances of both association type and content type.