| java.lang.Object com.jofti.query.MatchRangeQuery
All known Subclasses: com.jofti.query.MatchSmallerQuery, com.jofti.query.MatchLargerQuery,
MatchRangeQuery | public class MatchRangeQuery implements IndexQuery,QueryId(Code) | | A utility class to enable simple queries to be done easily. The Query matches
ranges for particular field. This is equivalent to (>= and <=) or (> and <).
This query cannot be combined with any other. iF you want to construct more complex queries use the @link com.jofti.query.Query class.
author: steve Woodcock |
Constructor Summary | |
public | MatchRangeQuery(Class className, String propertyName, Comparable startValue, Comparable endValue) Construct a query supplying the classname of the object type to be returned, the field to be queried and the start and finish values to be used. | public | MatchRangeQuery(Class className, String propertyName, Comparable startValue, Comparable endValue, Object alias) | public | MatchRangeQuery(String className, String propertyName, Comparable startValue, Comparable endValue) Construct a query supplying the classname of the object type to be returned, the field to be queried and the start and finish values to be used. | public | MatchRangeQuery(String className, String propertyName, Comparable startValue, Comparable endValue, Object alias) | public | MatchRangeQuery(Class className, String propertyName, Comparable startValue, Comparable endValue, boolean inclusive) Construct a query supplying the classname of the object type to be returned, the field to be queried and the start and finish values to be used. | public | MatchRangeQuery(Class className, String propertyName, Comparable startValue, Comparable endValue, boolean inclusive, Object alias) | public | MatchRangeQuery(String className, String propertyName, Comparable startValue, Comparable endValue, boolean inclusive) Construct a query supplying the classname of the object type to be returned, the field to be queried and the start and finish values to be used. | public | MatchRangeQuery(String className, String propertyName, Comparable startValue, Comparable endValue, boolean inclusive, Object alias) | public | MatchRangeQuery(Comparable startValue, Comparable endValue, boolean inclusive) Construct a query supplying the start and finish values to be used. | public | MatchRangeQuery(Comparable startValue, Comparable endValue, boolean inclusive, Object alias) |
inclusive | boolean inclusive(Code) | | |
MatchRangeQuery | public MatchRangeQuery(Class className, String propertyName, Comparable startValue, Comparable endValue)(Code) | | Construct a query supplying the classname of the object type to be returned, the field to be queried and the start and finish values to be used.
The field type in the object and the values must be of the same type. In addition the end value must
be greater (comparaison >0 ) than the start value;
An example usage would be:
new MatchNSQuery(org.package.Myclass.class, "myProperty" ,10,20);
Parameters: className - - the class of object to be returned. Parameters: propertyName - - the field name to use Parameters: startValue - - the value that is used as the start search value. Parameters: endValue - - the value that is used as the end search value. |
MatchRangeQuery | public MatchRangeQuery(String className, String propertyName, Comparable startValue, Comparable endValue)(Code) | | Construct a query supplying the classname of the object type to be returned, the field to be queried and the start and finish values to be used.
The field type in the object and the values must be of the same type. In addition the end value must
be greater (comparaison >0 ) than the start value;
An example usage would be:
new MatchNSQuery("org.package.Myclass", "myProperty" ,10,20);
Parameters: className - - the class of object to be returned. Parameters: propertyName - - the field name to use Parameters: startValue - - the value that is used as the start search value. Parameters: endValue - - the value that is used as the end search value. |
MatchRangeQuery | public MatchRangeQuery(Class className, String propertyName, Comparable startValue, Comparable endValue, boolean inclusive)(Code) | | Construct a query supplying the classname of the object type to be returned, the field to be queried and the start and finish values to be used.
The field type in the object and the values must be of the same type. In addition the end value must
be greater (comparaison >0 ) than the start value. thi method also allows the setting of search inclusivity.
An example usage would be:
new MatchNSQuery(org.package.Myclass.class, "myProperty" ,10,20, true);
Parameters: className - - the class of object to be returned. Parameters: propertyName - - the field name to use Parameters: startValue - - the value that is used as the start search value. Parameters: endValue - - the value that is used as the end search value. Parameters: inclusive - - whether a search is inclusive of values |
MatchRangeQuery | public MatchRangeQuery(String className, String propertyName, Comparable startValue, Comparable endValue, boolean inclusive)(Code) | | Construct a query supplying the classname of the object type to be returned, the field to be queried and the start and finish values to be used.
The field type in the object and the values must be of the same type. In addition the end value must
be greater (comparaison >0 ) than the start value. thi method also allows the setting of search inclusivity.
An example usage would be:
new MatchNSQuery("org.package.Myclass", "myProperty" ,10,20, true);
Parameters: className - - the class of object to be returned. Parameters: propertyName - - the field name to use Parameters: startValue - - the value that is used as the start search value. Parameters: endValue - - the value that is used as the end search value. Parameters: inclusive - - whether a search is inclusive of values |
MatchRangeQuery | public MatchRangeQuery(Comparable startValue, Comparable endValue, boolean inclusive)(Code) | | Construct a query supplying the start and finish values to be used.
The values must be of the same type. In addition the end value must
be greater (comparaison >0 ) than the start value. This is a convenience method for classes (such as String,Integer etc)
that have no property value as such. Instead the value is the class type. This method also allows the setting of search inclusivity.
An example usage would be:
new MatchRangeQuery(new Integer(10), new Integer(20), true);
Parameters: startValue - - the value that is used as the start search value. Parameters: endValue - - the value that is used as the end search value. Parameters: inclusive - - whether a search is inclusive of values |
getClassName | public Class getClassName()(Code) | | Returns the className. |
getPropertyName | public String getPropertyName()(Code) | | Returns the propertyName. |
isInclusive | public boolean isInclusive()(Code) | | |
setInclusive | public void setInclusive(boolean inclusive)(Code) | | |
|
|