@Beta public static interface Expressions.FieldReference extends Expressions.OperandSingle, FilterableComparisonAbsolute, FilterableComparisonRelative
Modifier and Type | Method and Description |
---|---|
default Expressions.ValueBoolean |
asBoolean()
Cast the field reference to a boolean value, enabling type-safe expressions.
|
default Expressions.ValueCollection |
asCollection()
Cast the field reference to a collection value, enabling type-safe expressions.
|
default Expressions.ValueDate |
asDate()
Cast the field reference to a date value, enabling type-safe expressions.
|
default Expressions.ValueDateTimeOffset |
asDateTimeOffset()
Cast the field reference to an offset-date-time value, enabling type-safe expressions.
|
default Expressions.ValueDuration |
asDuration()
Cast the field reference to a duration value, enabling type-safe expressions.
|
default Expressions.ValueNumeric |
asNumber()
Cast the field reference to a numeric value, enabling type-safe expressions.
|
default Expressions.ValueString |
asString()
Cast the field reference to a string value, enabling type-safe expressions.
|
default Expressions.ValueTimeOfDay |
asTimeOfDay()
Cast the field reference to a time-of-day value, enabling type-safe expressions.
|
default String |
getExpression(ODataProtocol protocol,
Map<String,Predicate<Expressions.FieldReference>> prefixes)
Create the String representation of the expression.
|
String |
getFieldName()
javadoc
|
static Expressions.FieldReference |
of(String fieldName)
Static factory method to easily instantiate a generic field reference.
|
equalTo, equalTo, notEqualTo, notEqualTo
greaterThan, greaterThan, greaterThanEqual, greaterThanEqual, lessThan, lessThan, lessThanEqual, lessThanEqual
getExpression
@Nonnull static Expressions.FieldReference of(String fieldName)
fieldName
- The field name.@Nonnull String getFieldName()
@Nonnull default String getExpression(@Nonnull ODataProtocol protocol, @Nonnull Map<String,Predicate<Expressions.FieldReference>> prefixes)
Expressions.Operand
getExpression
in interface Expressions.Operand
prefixes
- Additional field prefixes, e.g. when using lambda expressions.@Nonnull default Expressions.ValueString asString()
@Nonnull default Expressions.ValueNumeric asNumber()
@Nonnull default Expressions.ValueBoolean asBoolean()
@Nonnull default Expressions.ValueDuration asDuration()
@Nonnull default Expressions.ValueTimeOfDay asTimeOfDay()
@Nonnull default Expressions.ValueDateTimeOffset asDateTimeOffset()
@Nonnull default Expressions.ValueDate asDate()
@Nonnull default Expressions.ValueCollection asCollection()
Copyright © 2020 SAP SE. All rights reserved.