Interface COM.ibm.jaws.mofw.QueryableCollection
All Packages Class Hierarchy This Package Previous Next Index
Interface COM.ibm.jaws.mofw.QueryableCollection
- public interface QueryableCollection
- extends Object
The QueryableCollection interface is a collection of entries
that can be iterated over via a query over the contained
objects.
Select a QueryableCollection in your object's methods when there is
no need to access objects individually by a key, and/or
specify how they got into the collection in the first place. This
allows any of the subtypes (KeyedCollection, BaseCollection,
NamedCollection, or ReferenceCollection) to be substituted.
-
dispatchAll(String, String, CommandOn)
- Use this method to evaluate a query and execute a command
using the matching objects as the target and return a copy of the
command passed in (in the "done" state where the results can
be retrieved and possibly be undone).
-
evaluate(String, String)
- Use this method to evaluate a query and return the results in an
Iterator.
evaluate
public abstract Iterator evaluate(String queryParameters,
String queryKey) throws InvalidQueryError
- Use this method to evaluate a query and return the results in an
Iterator.
- Parameters:
- queryArguments - is a
String
representing the
arguments for the query identified by the queryKey parameter.
- queryKey - is a
String
that identifies
the query. The target QueryableCollection can interprete this
as the query string itself or as a key that it uses to lookup the
query string in the dependent context.
- Returns:
- an
Iterator
that contains the values selected
in the query.
- Throws: InvalidQueryError
- is thrown when the query
string parameter is not supported by this collection.
Like other Java Errors, the client need not
have to use the catch/throw mechanism nor does the
implementor of this method have to declare it.
An evaluate(null, "MOFW::objects") returns references for all the
objects in the QueryableCollection.
An evaluate(null, "MOFW::keys") returns the key string for all the
objects in the QueryableCollection.
dispatchAll
public abstract Iterator dispatchAll(String queryArguments,
String queryKey,
CommandOn command) throws InvalidQueryError
- Use this method to evaluate a query and execute a command
using the matching objects as the target and return a copy of the
command passed in (in the "done" state where the results can
be retrieved and possibly be undone). These commands are
returned in an Iterator. A null query string executes the command
to all the objects in the QueryableCollection.
- Parameters:
- queryArguments - is a
String
representing the
arguments for the query identified by the queryKey parameter.
- queryKey - is a
String
that identifies
the query. The target QueryableCollection can interprete this
as the query string itself or as a key that it uses to lookup the
query string in the dependent context.
- command - a
CommandOn
object that is
executed for each object matching the query.
- Returns:
- an
Iterator
that contains command objects
representing the results of each invocation.
- Throws: InvalidQueryError
- is thrown when the query
string parameter is not supported by this collection.
Like other Java Errors, the client need not
have to use the catch/throw mechanism nor does the
implementor of this method have to declare it.
All Packages Class Hierarchy This Package Previous Next Index