|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Query
handle to a query graph and reference to a specific node.
The query graph consists of multiple nodes, each representing a
class or a member of a class. The structure can be linked in
any way that the class model used allows. A Query
object references a single node of this graph.
The graph can
be traversed with the functions descendant() and parent()
which return references to other nodes of the graph. These two
functions will automatically extend the graph, if necessary.
execute() evaluates the entire graph against the objects stored
in the data container. execute() can be called from any node of the
graph and will create an
ObjectSet
filled with objects of the object type
that the node, it was called from, represents. Objects for all
descendant nodes of the caller Query
object will be instantiated.
Objects of parent nodes will not be visible in the
ObjectSet
if they are
not referenced from the caller Query
object.
Method Summary | |
---|---|
Constraint |
constrain(Object example)
adds a constraint to this node. |
Query |
descendant(String path)
returns a reference to a descendant node in the query graph. |
ObjectSet |
execute()
executes the query. |
Query |
limitSize(int count)
limits the maximum amount of objects returned. |
Query |
orderAscending()
adds an ascending order criteria to this node of the query graph. |
Query |
orderDescending()
adds a descending order criteria to this node of the query graph. |
Query |
parent(String path)
returns a reference to a parent node in the query graph. |
Method Detail |
---|
Constraint constrain(Object example)
example
- object for comparison
ObjectSet execute()
Query descendant(String path)
"[membername].[membername].[membername]"
"[membername].[membername].[membername]."
path
- path to the descendant. "[membername].[membername]"
path
specified.Query parent(String path)
"[classname].[membername].[membername]"
path
- to the parent node "[classname].[membername]"
path
specified.Query limitSize(int count)
count
- - the maximum amount of objects desired.
Query orderAscending()
Query orderDescending()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |