public class CqnUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Function<com.sap.cds.ql.Predicate,com.sap.cds.ql.Predicate> |
andPredicate(com.sap.cds.ql.cqn.CqnPredicate pred)
Creates a function which combines an additional
Predicate to the original predicate with a logical AND. |
static Map<String,Object> |
convertToIndexMap(Object... paramValues)
Converts the object array to an indexed map.
|
static <S extends com.sap.cds.ql.cqn.CqnStatement> |
modifiedWhere(S cqn,
Function<com.sap.cds.ql.Predicate,com.sap.cds.ql.Predicate> modifyWhere)
Creates a
CqnStatement with a modified where clause according to the passed function. |
public static Map<String,Object> convertToIndexMap(Object... paramValues)
0, the second 1, etc.paramValues - the objectspublic static <S extends com.sap.cds.ql.cqn.CqnStatement> S modifiedWhere(S cqn,
Function<com.sap.cds.ql.Predicate,com.sap.cds.ql.Predicate> modifyWhere)
CqnStatement with a modified where clause according to the passed function.S - The type of the statementcqn - The original CqnStatement.modifyWhere - A function that maps an existing Predicate to the predicate in the modified statement.CqnStatement.public static Function<com.sap.cds.ql.Predicate,com.sap.cds.ql.Predicate> andPredicate(com.sap.cds.ql.cqn.CqnPredicate pred)
Predicate to the original predicate with a logical AND.pred - The Predicate to combine with AND.Copyright © 2021. All rights reserved.