|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.javamatch.query.MatchQuery
net.sourceforge.javamatch.query.QuerySet
Class QuerySet combines multiple subqueries into a single query. The subqueries in a QuerySet may be required or preferred. When an object is matched, all required subqueries must match completely, or the QuerySet reports a mismatch. When all required subqueries match, the preferred subqueries determine the match value of the matched object. Preferred subqueries may be weighted. The match value is the weighted average of all preferred subqueries.
Constructor Summary | |
QuerySet()
|
Method Summary | |
void |
addPreferred(MatchQuery query)
Adds a the given subquery to the list of preferred queries, with a default weight (1) |
void |
addPreferred(MatchQuery query,
float weight)
Adds a the given subquery to the list of preferred queries, with the given weight |
void |
addRequired(MatchQuery query)
Adds a the given subquery to the list of required queries |
float |
getMatchValue(java.lang.Object targetObject)
Returns the match value of this match query, when executed on the given object. |
boolean |
isTwoPass()
Returns if this MatchQuery is two-pass. |
void |
prePass(java.lang.Object matchedObject)
Performs the pre-pass of a two-pass query. |
Methods inherited from class net.sourceforge.javamatch.query.MatchQuery |
getObjectValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public QuerySet()
Method Detail |
public void addPreferred(MatchQuery query)
query
- the subquery that is added to the list of preferred queriespublic void addPreferred(MatchQuery query, float weight)
query
- the subquery that is added to this MatchListweight
- the relative weight of this subquerypublic void addRequired(MatchQuery query)
query
- the subquery that is added to the list of required queriespublic boolean isTwoPass()
isTwoPass
in class MatchQuery
public void prePass(java.lang.Object matchedObject) throws MatchException
prePass
in class MatchQuery
matchedObject
- the object theat is currently matched
MatchException
- when the prePass failedpublic float getMatchValue(java.lang.Object targetObject) throws MatchException
getMatchValue
in class MatchQuery
targetObject
- the object agains which the query is executed
MatchException
- when the value could not be retrieved
|
Hosted by |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |