-
Notifications
You must be signed in to change notification settings - Fork 1
SpecField
Fagner Lima edited this page Aug 24, 2020
·
1 revision
Used for single conditions.
Params:
-
value: the name of the field in the entity;
- default: the name of the field in the filter.
-
operation: the operation of the query (
SpecOperation
enum);- default: SpecOperation.EQUAL.
-
canBeNull: if
true
and the value isnull
, the conditionIS NULL
will be included.- default: false.
At the moment, the SpecOperation's
EQUAL_IGNORE_CASE_UNACCENT
andLIKE_IGNORE_CASE_UNACCENT
can be used only with PostgreSQL and require the unaccent extension.
Example:
@SpecEntity(Task.class)
public class TaskFilter implements Serializable {
// ...
@SpecField(operation = SpecOperation.LIKE_IGNORE_CASE)
private String description;
private Status status;
// getters and setters
}