public class QueryField extends Object
FilterFactory.queryString(EntityDescriptor, String, QueryField...)
.Modifier and Type | Class and Description |
---|---|
static class |
QueryField.Mode
Determines the way, the filter value can be applied to a given field.
|
Modifier and Type | Method and Description |
---|---|
static QueryField |
contains(Mapping field)
Informs the compiler, that by default a fully expanding search like a contains query may be generated for this field.
|
static QueryField |
eq(Mapping field)
Informs the compiler, that only real equality checks are permitted for this field.
|
Mapping |
getField() |
QueryField.Mode |
getMode() |
static QueryField |
like(Mapping field)
Informs the compiler, that by default, equality checks are used for this field.
|
static QueryField |
startsWith(Mapping field)
Informs the compiler, that by default an expanding search like a prefix query may be generated for this field.
|
public static QueryField eq(Mapping field)
This ensures that a proper database index can be used for all queries.
field
- the field to search inpublic static QueryField like(Mapping field)
However, if there are wildcards in the filter value, an expanding constraint can be generated.
This ensures that a proper database index can be used for common queries.
field
- the field to search inpublic static QueryField startsWith(Mapping field)
Depending on the underlying database an index might be used to support this query. If the database cannot execute prefix queries if may fallback to an equals constraint.
field
- the field to search inpublic static QueryField contains(Mapping field)
This will most probably disable any support for database indices and should only be used for reasonably sized datasets.
field
- the field to search inpublic Mapping getField()
public QueryField.Mode getMode()
Copyright © 2018. All rights reserved.