| java.lang.Object com.jofti.query.MatchQuery
MatchQuery | public class MatchQuery implements IndexQuery,QueryId(Code) | | A utility class to enable simple queries to be done easily. The Query matches everything equal to the
value passed in for that particular field. This is equivalent to =.
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 | MatchQuery(Class className, String propertyName, Comparable value) Construct a query supplying the classname of the object type to be returned,and the
field to be queried and the value to be used. | public | MatchQuery(Class className, String propertyName, Comparable value, Object alias) | public | MatchQuery(String className, String propertyName, Comparable value) Construct a query supplying the classname of the object type to be returned,and the
field to be queried and the value to be used. | public | MatchQuery(String className, String propertyName, Comparable value, Object alias) | public | MatchQuery(Comparable value) Construct a query supplying the value to be searched against. |
MatchQuery | public MatchQuery(Class className, String propertyName, Comparable value)(Code) | | Construct a query supplying the classname of the object type to be returned,and the
field to be queried and the value to be used.
The field type in the object and the value must be of the same type.
An example usage would be:
new MatchQuery(org.package.Myclass.class, "myProperty" ,"some value");
Parameters: className - - the class of object to be returned. Parameters: propertyName - - the field name to use Parameters: value - - the value that is used as the search value. |
MatchQuery | public MatchQuery(String className, String propertyName, Comparable value)(Code) | | Construct a query supplying the classname of the object type to be returned,and the
field to be queried and the value to be used.
The field type in the object and the value must be of the same type.
An example usage would be:
new MatchQuery("org.package.Myclass", "myProperty" ,"some value");
Parameters: className - - the class of object to be returned. Parameters: propertyName - - the field name to use Parameters: value - - the value that is used as the search value. |
MatchQuery | public MatchQuery(Comparable value)(Code) | | Construct a query supplying the value to be searched against.
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 would be:
new MatchQuery("some value");
This is so you do not have to use the methods above in the manner of
new MatchQuery("java.lang.String", null ,"some value");
Parameters: value - - the value that is used as the search value. |
getClassName | public Class getClassName()(Code) | | Returns the className. |
getPropertyName | public String getPropertyName()(Code) | | Returns the propertyName. |
|
|