Package com.sap.cds.ql
Interface FilterableStatement<T,S extends FilterableStatement<T,?>>
- All Superinterfaces:
CqnFilterableStatement
,CqnStatement
,JSONizable
,Statement<S>
- All Known Implementing Classes:
Select
public interface FilterableStatement<T,S extends FilterableStatement<T,?>>
extends Statement<S>, CqnFilterableStatement
-
Method Summary
Modifier and TypeMethodDescriptionSets the where condition of the filterable statement, requiring that the value of the single key element of the target entity set is equal to the given idValue.Sets the where condition of the filterable statement.byParams
(Collection<String> elementRefs) Sets the where condition of the filterable statement.Sets the where condition of the filterable statement.where
(CqnPredicate predicate) Sets the where condition of this filterable statement to a given predicate.where
(Function<T, CqnPredicate> predicate) Sets the where condition of this filterable statement.Methods inherited from interface com.sap.cds.ql.cqn.CqnFilterableStatement
where
Methods inherited from interface com.sap.cds.ql.cqn.CqnStatement
asDelete, asInsert, asSelect, asUpdate, asUpsert, hints, isDelete, isInsert, isSelect, isUpdate, isUpsert, ref
Methods inherited from interface com.sap.cds.JSONizable
toJson
-
Method Details
-
where
Sets the where condition of this filterable statement to a given predicate. If this filterable statement already has a where condition it is replaced with the given.- Parameters:
predicate
- aCqnPredicate
- Returns:
- the filterable statement
-
where
Sets the where condition of this filterable statement. The where condition is provided as a function that accepts a model object representing the entity targeted by the filterable and returning the where condition.- Parameters:
predicate
- aFunction
providing the where condition- Returns:
- the filterable statement
-
matching
Sets the where condition of the filterable statement. The where condition is computed from a map of element names of the target entity set to their values, or aCqnParameter
. The map entries are transformed into comparison predicates and joined via and.- Parameters:
values
- the element name to value map defining the where condition- Returns:
- the filterable statement
-
byParams
Sets the where condition of the filterable statement. The where condition is computed from the given vararg of element references of the target entity. For each element reference a predicate is created comparing the element ref with aCqnParameter
that has the name of the ref. The predicates are joined via and.- Parameters:
elementRefs
- the element references defining the where condition- Returns:
- this filterable statement
-
byParams
Sets the where condition of the filterable statement. The where condition is computed from the given collection of element references of the target entity. For each element ref a predicate is created comparing the ref with aCqnParameter
that has the name of the ref. The predicates are joined via and.- Parameters:
elementRefs
- the element references defining the where condition- Returns:
- this filterable statement
-
byId
Sets the where condition of the filterable statement, requiring that the value of the single key element of the target entity set is equal to the given idValue.- Parameters:
idValue
- the value of the target entity's key element- Returns:
- the filterable statement
-