|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Implementations of this interface are used by the ConfigService
to convert Mastered
objects into Iterated
objects based on some existing QuerySpec
. Due to the
nature of the master to iteration relationship in the database most but
not all of the selection work can be done in the database; some of the
work must be done after iterations are retrieved from the database.
A ConfigSpec
has two key methods: appendSearchCriteria(wt.query.QuerySpec)
adds to the database query specification that iterations must meet and
process(wt.fc.QueryResult)
does post-query filtering required to finally determine
the appropriate iteration(s). Because no assumptions are made as to
whether or not the iterations to process are "latest" iterations, the
query criteria becomes especially important.
ConfigSpec
usage:
ConfigService.filteredIterationsOf(wt.vc.Mastered, wt.vc.config.ConfigSpec)
ConfigService.filteredIterationsOf(wt.fc.QueryResult, wt.vc.config.ConfigSpec)
ConfigService.queryIterations(wt.query.QuerySpec, wt.vc.config.ConfigSpec)
When creating new ConfigSpec
s it is important to document
carefully what both key methods do. Usually reuse is achived by delegation
rather than inheritance, so it is likely that one or both of the key
methods in a ConfigSpec
may be reused. In particular if
one of the key methods does nothing, then that should be noted.
Supported API: true
Extendable: true
LatestConfigSpec
,
MultipleLatestConfigSpec
,
WTPartConfigSpec
,
WTPartBaselineConfigSpec
,
WTPartEffectivityConfigSpec
,
WTPartStandardConfigSpec
Method Summary | |
QuerySpec |
appendSearchCriteria(QuerySpec querySpec)
Appends to the supplied QuerySpec additional search criteria to reduce the resulting iterations to only those that will be considered by this ConfigSpec. |
QueryResult |
process(QueryResult results)
Process the QueryResult of iterations, returning only those that "match" according to the algorithm. |
Methods inherited from interface java.io.Externalizable |
readExternal, writeExternal |
Method Detail |
public QuerySpec appendSearchCriteria(QuerySpec querySpec) throws WTException, QueryException
The QueryResult returned should be a copy of the passed in one (taking advantage of side-effects is not encouraged).
querySpec
- A QuerySpec with a target class that is Iterated.
WTException
QueryException
QuerySpec
,
SearchCondition
public QueryResult process(QueryResult results) throws WTException
The QueryResult returned should be a copy of the passed-in QueryResult (side-effects should be avoided).
results
- QueryResult of iterations to filter. Assumed to be the result of a query that included the additional search conditions applied by appendSearchCriteria. Note that after enumerating through the elements of this QueryResult, it should be reset.
WTException
QueryResult
,
Iterated
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |