| java.lang.Object com.jofti.query.namespace.MatchNSRangeQuery
All known Subclasses: com.jofti.query.namespace.MatchNSSmallerQuery, com.jofti.query.namespace.MatchNSLargerQuery,
MatchNSRangeQuery | public class MatchNSRangeQuery implements IndexQuery,INameSpaceAware,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 <).
All nameSpace queries must provide a correct namespace type for the implementation. Some nameSpaces
are hierachical and so the search will use the nameSpace as starting point. Others are flat and so there is no
traversal step.
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 | MatchNSRangeQuery(Class className, Object nameSpace, String propertyName, Comparable startValue, Comparable endValue) Construct a query supplying the classname of the object type to be returned, the namespace
under which to start the search. | public | MatchNSRangeQuery(Class className, Object nameSpace, String propertyName, Comparable startValue, Comparable endValue, Object alias) | public | MatchNSRangeQuery(String className, Object nameSpace, String propertyName, Comparable startValue, Comparable endValue) | public | MatchNSRangeQuery(String className, Object nameSpace, String propertyName, Comparable startValue, Comparable endValue, Object alias) | public | MatchNSRangeQuery(Class className, Object nameSpace, String propertyName, Comparable startValue, Comparable endValue, boolean inclusive) Construct a query supplying the classname of the object type to be returned, the namespace
under which to start the search. | public | MatchNSRangeQuery(Class className, Object nameSpace, String propertyName, Comparable startValue, Comparable endValue, boolean inclusive, Object alias) | public | MatchNSRangeQuery(String className, Object nameSpace, String propertyName, Comparable startValue, Comparable endValue, boolean inclusive) | public | MatchNSRangeQuery(String className, Object nameSpace, String propertyName, Comparable startValue, Comparable endValue, boolean inclusive, Object alias) | public | MatchNSRangeQuery(Object nameSpace, Comparable startValue, Comparable endValue, boolean inclusive) Construct a query supplying the value to be searched against and the namespace
under which to start the search. | public | MatchNSRangeQuery(Object nameSpace, Comparable startValue, Comparable endValue, boolean inclusive, Object alias) |
inclusive | boolean inclusive(Code) | | |
MatchNSRangeQuery | public MatchNSRangeQuery(Class className, Object nameSpace, String propertyName, Comparable startValue, Comparable endValue)(Code) | | Construct a query supplying the classname of the object type to be returned, the namespace
under which to start the search. 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 (for JBossCache) would be:
new MatchNSQuery("org.package.Myclass", "/test", "myProperty" ,new Integer(10),new Integer(20));
Parameters: className - - the class of object to be returned. Parameters: nameSpace - - the name space to be searched. 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. |
MatchNSRangeQuery | public MatchNSRangeQuery(Class className, Object nameSpace, String propertyName, Comparable startValue, Comparable endValue, boolean inclusive)(Code) | | Construct a query supplying the classname of the object type to be returned, the namespace
under which to start the search. The field to be queried and the start and finish values to be used.
This method also allows inclusivity to be set.
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 (for JBossCache) would be:
new MatchNSRangeQuery("org.package.Myclass", "/test", "myProperty" ,new Integer(10),new Integer(20), true);
Parameters: className - - the class of object to be returned. Parameters: nameSpace - - the name space to be searched. 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 the seacrh should be inclusive of values. |
MatchNSRangeQuery | public MatchNSRangeQuery(Object nameSpace, Comparable startValue, Comparable endValue, boolean inclusive)(Code) | | Construct a query supplying the value to be searched against and the namespace
under which to start the search. 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.
An example usage (for JBossCache) would be:
new MatchNSRangeQuery("/test", "ab","zz",true);
This is so you do not have to use the methods above in the manner of
new MatchNSRangeQuery("java.lang.String", "/test", null ,"ab","zz",true);
Parameters: nameSpace - - the name space to be searched. 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 the seacrh should be inclusive of values. |
getClassName | public Class getClassName()(Code) | | Returns the className. |
getNameSpace | public synchronized Object getNameSpace()(Code) | | Returns the nameSpace. |
getPropertyName | public String getPropertyName()(Code) | | Returns the propertyName. |
isInclusive | public boolean isInclusive()(Code) | | |
setInclusive | public void setInclusive(boolean inclusive)(Code) | | |
setNameSpace | public synchronized void setNameSpace(Object nameSpace)(Code) | | Parameters: nameSpace - The nameSpace to set. |
|
|