public class SQLFilterFactory extends FilterFactory<SQLConstraint>
SmartQuery.OMA.FILTERS| Constructor and Description |
|---|
SQLFilterFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
customTransform(Object value)
Permits to provive database dependent transformations.
|
protected SQLConstraint |
effectiveAnd(List<SQLConstraint> effectiveConstraints)
Combines the list of constraints using AND
|
protected SQLConstraint |
effectiveOr(List<SQLConstraint> effectiveConstraints)
Combines the list of constraints using OR
|
protected SQLConstraint |
eqValue(Mapping field,
Object value)
Represents field = value as constraint
|
Exists |
existsIn(Mapping outerColumn,
Class<? extends SQLEntity> other,
Mapping innerColumn)
Generates an EXISTS clause: EXISTS(SELECT * FROM other WHERE e.outerColumn = other.innerColumn.
|
SQLConstraint |
filled(Mapping field)
Generates a constraint which ensures that the given field is filled (not null)
|
protected SQLConstraint |
gtValue(Mapping field,
Object value,
boolean orEqual)
Represents field > value as constraint
|
protected SQLConstraint |
invert(SQLConstraint constraint)
Effectively inverts the given constraint
|
Like |
like(Mapping fields)
Creates a LIKE constraint for the given field.
|
protected SQLConstraint |
ltValue(Mapping field,
Object value,
boolean orEqual)
Represents field < value as constraint
|
protected SQLConstraint |
neValue(Mapping field,
Object value)
Represents field !
|
SQLConstraint |
notFilled(Mapping field)
Generates a constraint which ensures that the given field is not filled (null)
|
SQLConstraint |
queryString(EntityDescriptor descriptor,
String query,
List<QueryField> fields)
Compiles the given query for the given entity while searching in the given fields.
|
and, and, containsAll, containsAny, containsNone, containsOne, eq, eqIgnoreEmpty, eqOrEmpty, gt, gte, gteOrEmpty, gtOrEmpty, lt, lte, lteOrEmpty, ltOrEmpty, ne, noneInField, not, oneInField, or, or, queryString, transformprotected Object customTransform(Object value)
FilterFactorycustomTransform in class FilterFactory<SQLConstraint>value - the value to tranformprotected SQLConstraint eqValue(Mapping field, Object value)
FilterFactoryeqValue in class FilterFactory<SQLConstraint>field - the field to filtervalue - the value to filter withprotected SQLConstraint neValue(Mapping field, Object value)
FilterFactoryneValue in class FilterFactory<SQLConstraint>field - the field to filtervalue - the value to filter withprotected SQLConstraint gtValue(Mapping field, Object value, boolean orEqual)
FilterFactorygtValue in class FilterFactory<SQLConstraint>field - the field to filtervalue - the value to filter withorEqual - if true, field >= value is used as comparatorprotected SQLConstraint ltValue(Mapping field, Object value, boolean orEqual)
FilterFactoryltValue in class FilterFactory<SQLConstraint>field - the field to filtervalue - the value to filter withorEqual - if true, field <= value is used as comparatorpublic SQLConstraint filled(Mapping field)
FilterFactoryfilled in class FilterFactory<SQLConstraint>field - the field to checkpublic SQLConstraint notFilled(Mapping field)
FilterFactorynotFilled in class FilterFactory<SQLConstraint>field - the field to checkprotected SQLConstraint invert(SQLConstraint constraint)
FilterFactoryinvert in class FilterFactory<SQLConstraint>constraint - the constraint to invertprotected SQLConstraint effectiveAnd(List<SQLConstraint> effectiveConstraints)
FilterFactoryeffectiveAnd in class FilterFactory<SQLConstraint>effectiveConstraints - the constraints to combine (where each value will be non-null)protected SQLConstraint effectiveOr(List<SQLConstraint> effectiveConstraints)
FilterFactoryeffectiveOr in class FilterFactory<SQLConstraint>effectiveConstraints - the constraints to combine (where each value will be non-null)public SQLConstraint queryString(EntityDescriptor descriptor, String query, List<QueryField> fields)
FilterFactoryqueryString in class FilterFactory<SQLConstraint>descriptor - the descriptor of the entity being searchedquery - the query to compilefields - the default fields to search inpublic Exists existsIn(Mapping outerColumn, Class<? extends SQLEntity> other, Mapping innerColumn)
outerColumn - the column of the entities being queried to matchother - the entity type to search in (which must exist)innerColumn - the column within that inner entity type which must match the outer columnCopyright © 2018. All rights reserved.