| java.lang.Object com.jofti.query.MatchInQuery
MatchInQuery | public class MatchInQuery implements IndexQuery,QueryId(Code) | | A utility class to enable simple queries to be done easily. The Query matches everything in the
value array passed in for that particular field. For example, x IN [val1, val2, val3] is equivalent to testing [x = val1, or x= = val2, or x = val3].
This query cannot be combined with any other. iF you want to construct more complex queries use the @link com.jofti.query.Query or EJBQuery class.
author: Steve Woodcock |
Constructor Summary | |
public | MatchInQuery(Class className, String propertyName, Comparable[] values) Construct a query supplying the classname of the object type to be returned,and the
field to be queried and the values to be used. | public | MatchInQuery(Class className, String propertyName, Comparable[] values, Object alias) | public | MatchInQuery(String className, String propertyName, Comparable[] values) Construct a query supplying the classname of the object type to be returned,and the
field to be queried and the values to be used. | public | MatchInQuery(String className, String propertyName, Comparable[] values, Object alias) | public | MatchInQuery(Comparable[] values) Construct a query supplying the values to be searched against. |
MatchInQuery | public MatchInQuery(Class className, String propertyName, Comparable[] values)(Code) | | Construct a query supplying the classname of the object type to be returned,and the
field to be queried and the values to be used.
The field type in the object and each of the values must be of the same type or be able
to be coerced using java's assingability rules.
An example usage would be:
new MatchInQuery(org.package.Myclass.class, "myProperty" ,[20,21,22]);
Parameters: className - - the class of object to be returned. Parameters: propertyName - - the field name to use Parameters: values - - the values that are used as the search value. |
MatchInQuery | public MatchInQuery(String className, String propertyName, Comparable[] values)(Code) | | Construct a query supplying the classname of the object type to be returned,and the
field to be queried and the values to be used.
The field type in the object and each of the values must be of the same type or be able
to be coerced using java's assingability rules.
An example usage would be:
new MatchInQuery("org.package.Myclass", "myProperty" ,[20,21,22]);
Parameters: className - - the class of object to be returned. Parameters: propertyName - - the field name to use Parameters: values - - the values that are used as the search value. |
MatchInQuery | public MatchInQuery(Comparable[] values)(Code) | | Construct a query supplying the values 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 of the values
in the array.
An example usage would be:
new MatchInQuery(["test","test1"]);
This is so you do not have to use the methods above in the manner of
new MatchInQuery("java.lang.String", null ,["test","test1"]);
Parameters: values - - the values that are used as the search value. |
getClassName | public Class getClassName()(Code) | | Returns the className. |
getPropertyName | public String getPropertyName()(Code) | | Returns the propertyName. |
|
|