public static class ReportSpec.Criteria extends Object
table.fieldform), an operator, and a value (or list or range of values). Date values should be specified as MM/DD/YYYY [HH:MM:SS optional]. Code list values may be specified using either their formatted or unformatted representation (e.g. both "2" and "Out" are valid for "vial.vial_status"). Lists of values should be separated by semicolons (;), while ranges of values should be separated by a minus sign (-).
If you are searching on a field that has the WebServiceConstants.FieldFlags MULTI_VALUE flag set, then the search must be constructed in a specific way. A multi-value field is always associated with a format in the system. The format associated with a field can be retrieved by using DatabaseService.getFields. The Criteria object must be constructed in the following format for these fields:
field = 'table.field'
operator = 'all terms' | 'any term'
value = attribute operator [value] [; ... ]
For example, if you were searching for samples that have a sample_modifier of 'GROUP' (Study
Group) with a value of 6 and a sample_modifier of 'PA' (PANCREATIC), then your Criteria would
field = 'sample.sample_modifiers'
operator = 'all terms'
value = 'GROUP=6;PA=*'
When specifying the operator for a MULTI_VALUE field, you may only use the 'all terms' (=&) or 'any term' (=|) operator. You may specify this by using the WebServiceConstants.Operators or WebServiceConstants.OperatorSymbols strings. However, more choices are available when you are specifying the operator for Criteria.value. In this case, you may only use the WebServiceConstants.OperatorSymbols. Also, in some cases, you are required to specify a value for the attribute. By looking at the the format associated with the field, in this case lkup_sample_modifier, you can tell that req_value equals '1' for the 'GROUP' attribute and req_value equals '0' for the 'PA' attribute. If the attribute does not require a value, then you must use the Exists (=*) operator. Notice the semicolon is used as a delimeter between different attributes.
|Modifier and Type||Field and Description|
The field to search on, in
The operator to use when searching on the given field.
The value, or list/range of values, to search on.
|Constructor and Description|
public String field
table.fieldform; for instance "vial.vial_status".
public String operator
public String value
public Criteria(String f, String o, String v)