Build complex OSID queries by flowing through an assembler and adding terms one at a time.
An assembler accepts individual query terms and accumulates them
into a completed OsidQuery. You obtain an assembler from a lookup or query
session, add matching criteria — display name, type, catalog scope, any domain-specific
field — and then call assemble() to get the finished query object ready to
pass to a query session.
Assemblers decouple query construction from query execution and make it easy to build queries programmatically or from user-supplied criteria without constructing query objects directly.
net.okapia.osid.jamocha.assembly.query
GradeQueryAssembler asm = gradebookQuerySession.getGradeQueryAssembler();
asm.matchDisplayName("A", StringMatchType.STARTS_WITH, true);
asm.matchGradeSystem(gradeSystemId, true);
GradeQuery query = asm.assemble();
GradeList grades = gradebookQuerySession.getGradesByQuery(query);
| Parameter | Type | Description |
|---|---|---|
query |
OsidObjectQuery |
the query object to accumulate terms into |
| Parameter | Type | Description |
|---|---|---|
query |
OsidObjectQuery |
a fresh query obtained from the session |
Returns OsidObjectQueryAssembler — a new assembler ready to accept terms