Query Session Pattern

Search objects by criteria — issue structured queries against a domain catalog.

Overview

A query session exposes a fresh [OsidObject]Query per call to get[OsidObject]Query(), accepts criteria via the query object's match methods, and executes the search through get[OsidObject]sByQuery(query). Override the execution method to translate the populated query into a back-end search.

Javadoc Reference

net.okapia.osid.jamocha.spi

Class Declaration Pattern

public abstract class AbstractQueryOsidObjectSession
extends AbstractOsidSession
implements QueryOsidObjectSession

Constructor Pattern

AbstractQueryOsidObjectSession(OsidObjectManager manager, Id catalogId)
ParameterTypeDescription
manager OsidObjectManager the manager that opened this session
catalogId Id the catalog this session is scoped to

Key Override Pattern

public OsidObjectList getOsidObjectsByQuery(OsidObjectQuery query) throws OperationFailedException
ParameterTypeDescription
query OsidObjectQuery a query populated with match criteria