public interface CQL
| Modifier and Type | Method and Description |
|---|---|
static Predicate |
and(CqnPredicate p1,
CqnPredicate p2)
Creates a conjunction of two given predicates
|
static Predicate |
and(Iterable<? extends CqnPredicate> predicates)
Creates a conjunction of given predicates
|
static BooleanFunction |
booleanFunc(String name,
List<? extends CqnValue> args)
Creates a CDS QL function call that is send to the underlying data store.
|
static Predicate |
comparison(CqnValue lhs,
CqnComparisonPredicate.Operator op,
CqnValue rhs)
Creates a comparison predicate.
|
static Predicate |
connect(CqnConnectivePredicate.Operator operator,
Iterable<? extends CqnPredicate> predicates)
Creates a logical connection of given predicates
CqnPredicate. |
static Predicate |
copy(CqnPredicate pred)
Creates a copy of the given predicate.
|
static Predicate |
copy(CqnPredicate pred,
CqnModifier modifier)
Creates a modified copy of the given predicate.
|
static <S extends CqnStatement> |
copy(S statement)
Creates a copy of the given CQN statement.
|
static <S extends CqnStatement> |
copy(S statement,
CqnModifier modifier)
Creates a modified copy of the given CQN statement.
|
static Value<Long> |
count()
Creates a count all function call.
|
static Value<Long> |
count(CqnElementRef element)
Creates a count function call on the given element.
|
static StructuredType<?> |
entity(String qualifiedName)
Creates a
StructuredType representing a CDS entity. |
static Predicate |
exists(CqnSelect subQuery)
Creates an exists predicate that tests if a given subquery returns any row
|
static <T> FunctionCall<T> |
func(String name,
CqnValue... args)
Creates a CDS QL function call that is send to the underlying data store.
|
static <T> FunctionCall<T> |
func(String name,
List<? extends CqnValue> args)
Creates a CDS QL function call that is send to the underlying data store.
|
static <T> ElementRef<T> |
get(List<? extends CqnReference.Segment> segments)
Creates an
ElementRef representing a path from a CDS entity to an
element of this or another entity. |
static <T> ElementRef<T> |
get(String path)
Creates an
ElementRef representing a path from a CDS entity to an
element of this or another entity. |
static Predicate |
in(CqnValue lhs,
Collection<? extends CqnValue> values)
Creates an in predicate.
|
static <T> Literal<T> |
literal(T value)
Creates a CDS QL
Literal to be used in queries. |
static Predicate |
not(CqnPredicate predicate)
Negates a given
CqnPredicate. |
static Value<Instant> |
now()
Creates an
ElementRef to be used in queries to represent $now. |
static Predicate |
or(CqnPredicate p1,
CqnPredicate p2)
Creates a disjunction of two given predicates
|
static Predicate |
or(Iterable<? extends CqnPredicate> predicates)
Creates a disjunction of given predicates
|
static <T> Parameter<T> |
param()
Creates a CDS QL positional
Parameter to be used in queries. |
static <T> Parameter<T> |
param(String name)
Creates a CDS QL named
Parameter to be used in queries. |
static Value<?> |
plain(String value)
Creates a CQN plain value, which is directly send to the underlying data
store.
|
static RefSegment |
refSegment(String id)
Creates a segment of a structured type or element reference.
|
static List<RefSegment> |
refSegments(List<String> segmentIds)
Creates a list of reference segments.
|
static Predicate |
search(String term)
Creates a search predicate.
|
static CqnStar |
star() |
static StructuredType<?> |
to(List<? extends CqnReference.Segment> segments)
Creates a
StructuredType representing a path from a CDS entity to
another entity. |
static StructuredType<?> |
to(String path)
Creates a
StructuredType representing a path from a CDS entity to
another entity. |
static Value<String> |
toLower(String val)
Creates a CDS QL expression for converting the given string value to lower
case using the rules of the underlying data store.
|
static Value<String> |
toLower(Value<String> val)
Creates a CDS QL expression for converting the given string value to lower
case using the rules of the underlying data store.
|
static Value<String> |
toUpper(String val)
Creates a CDS QL expression for converting the given string value to upper
case using the rules of the underlying data store.
|
static Value<String> |
toUpper(Value<String> val)
Creates a CDS QL expression for converting the given string value to upper
case using the rules of the underlying data store.
|
static Value<String> |
userId()
Creates an
ElementRef on the available $user.id value. |
static Value<String> |
userLocale()
Creates an
ElementRef on the available $user.locale value. |
static Value<Instant> |
validFrom()
Creates an
ElementRef on the available $validFrom value. |
static Value<Instant> |
validTo()
Creates an
ElementRef on the available $validTo value. |
static Predicate copy(CqnPredicate pred)
pred - the predicate to be copiedstatic Predicate copy(CqnPredicate pred, CqnModifier modifier)
pred - the predicate to be copiedmodifier - the modifier for altering the copystatic <S extends CqnStatement> S copy(S statement)
S - the type of CqnStatementstatement - the CQN statement to be copiedstatic <S extends CqnStatement> S copy(S statement, CqnModifier modifier)
S - the type of CqnStatementstatement - the CQN statement to be copiedmodifier - the modifier for altering the copystatic <T> FunctionCall<T> func(String name, CqnValue... args)
T - the return type of the function callname - the name of the function to be calledargs - the arguments of the functionstatic <T> FunctionCall<T> func(String name, List<? extends CqnValue> args)
T - the return type of the function callname - the name of the function to be calledargs - the arguments of the functionstatic BooleanFunction booleanFunc(String name, List<? extends CqnValue> args)
name - the name of the function to be calledargs - the arguments of the functionstatic <T> Literal<T> literal(T value)
Literal to be used in queries.T - the type of the literalvalue - the value of the literalstatic Predicate not(CqnPredicate predicate)
CqnPredicate.predicate - the CqnPredicate to be negatedstatic Predicate and(CqnPredicate p1, CqnPredicate p2)
p1 - 1st operand of the conjunctionp2 - 2nd operand of the conjunctionstatic Predicate or(CqnPredicate p1, CqnPredicate p2)
p1 - 1st operand of the disjunctionp2 - 2nd operand of the disjunctionstatic Predicate and(Iterable<? extends CqnPredicate> predicates)
predicates - the predicates to connectstatic Predicate or(Iterable<? extends CqnPredicate> predicates)
predicates - the predicates to connectstatic Predicate connect(CqnConnectivePredicate.Operator operator, Iterable<? extends CqnPredicate> predicates)
CqnPredicate.operator - operator to connect the predicates withpredicates - the predicates to connectstatic <T> Parameter<T> param()
Parameter to be used in queries.T - the type of the parameterstatic <T> Parameter<T> param(String name)
Parameter to be used in queries.T - the type of the parametername - the parameter namestatic Value<?> plain(String value)
value - the value contentstatic Value<Long> count(CqnElementRef element)
element - the ref to the element to be countedstatic Value<String> toLower(Value<String> val)
val - the String value to be convertedstatic Value<String> toLower(String val)
val - the String value to be convertedstatic Value<String> toUpper(Value<String> val)
val - the String value to be convertedstatic Value<String> toUpper(String val)
val - the String value to be convertedstatic StructuredType<?> entity(String qualifiedName)
StructuredType representing a CDS entity.qualifiedName - the qualified name of the CDS entityStructuredType representing the CDS entitystatic StructuredType<?> to(String path)
StructuredType representing a path from a CDS entity to
another entity.path - a String of association element names separated by '.'StructuredType representing the path to a CDS entitystatic StructuredType<?> to(List<? extends CqnReference.Segment> segments)
StructuredType representing a path from a CDS entity to
another entity.segments - the segments of the pathStructuredType representing the path to a CDS entitystatic <T> ElementRef<T> get(String path)
ElementRef representing a path from a CDS entity to an
element of this or another entity.T - the type of the elementpath - a String of element names separated by '.', where all except the
last segment represent association elements.ElementRef representing the path to the CDS elementstatic <T> ElementRef<T> get(List<? extends CqnReference.Segment> segments)
ElementRef representing a path from a CDS entity to an
element of this or another entity.T - the type of the elementsegments - the segments of the pathElementRef representing the path to the CDS elementstatic RefSegment refSegment(String id)
id - the id of the segmentstatic List<RefSegment> refSegments(List<String> segmentIds)
segmentIds - the ids of the segmentsstatic Predicate comparison(CqnValue lhs, CqnComparisonPredicate.Operator op, CqnValue rhs)
lhs - the left-hand side of the comparisonop - the comparison operatorrhs - the right-hand side of the comparisonstatic Predicate in(CqnValue lhs, Collection<? extends CqnValue> values)
lhs - the value to be checked if it's contained in the collectionvalues - the collection of valuesstatic Predicate search(String term)
term - the search termstatic Predicate exists(CqnSelect subQuery)
subQuery - the subquery that performs the existence teststatic Value<Instant> now()
ElementRef to be used in queries to represent $now.static Value<Instant> validFrom()
ElementRef on the available $validFrom value.static Value<Instant> validTo()
ElementRef on the available $validTo value.static Value<String> userLocale()
ElementRef on the available $user.locale value.static Value<String> userId()
ElementRef on the available $user.id value.static CqnStar star()
Copyright © 2020 SAP. All rights reserved.