Class EntityField<EntityT,FieldT>
java.lang.Object
com.sap.cloud.sdk.datamodel.odata.helper.EntityField<EntityT,FieldT>
- Type Parameters:
EntityT
- VdmObject that the field belongs toFieldT
- Field type
- All Implemented Interfaces:
EntitySelectable<EntityT>
Template class to represent entity fields. Instances of this object are used in query modifier methods of the entity
fluent helpers. Contains methods to compare a field's value with a provided value.
Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData
field names, so use the constructor with caution.
-
Constructor Summary
ConstructorDescriptionEntityField
(String fieldName) Use the constants declared in each entity inner class.EntityField
(String fieldName, TypeConverter<FieldT, ?> typeConverter) Use the constants declared in each entity inner class. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Expression fluent helper supporting the filter function "endswith".Equals expression fluent helper.eqNull()
Equals-null expression fluent helper.boolean
Greater than or equals expression fluent helper.Get the field name of OData entity property.Greater than expression fluent helper.int
hashCode()
Less than or equals expression fluent helper.Less than expression fluent helper.Not equals expression fluent helper.neNull()
Not equals-null expression fluent helper.startsWith
(String value) Expression fluent helper supporting the filter function "startswith".substringOf
(String value) Expression fluent helper supporting the filter function "substringof".Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sap.cloud.sdk.datamodel.odata.helper.EntitySelectable
getSelections
-
Constructor Details
-
EntityField
Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution.- Parameters:
fieldName
- OData field name. Must match the field returned by the underlying OData service.
-
EntityField
Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. When creating instances for custom fields, this constructor can be used to add a type converter that will be automatically used by the respective entity when getting or setting custom fields.- Parameters:
fieldName
- OData field name. Must match the field returned by the underlying OData service.typeConverter
- An implementation of a TypeConverter. The first type must match FieldT, the second type must match the type Olingo returns.
-
-
Method Details
-
eqNull
Equals-null expression fluent helper.- Returns:
- Fluent helper that represents a field == null expression.
-
eq
Equals expression fluent helper.- Parameters:
value
- Field value to compare with.- Returns:
- Fluent helper that represents a field == value expression.
-
neNull
Not equals-null expression fluent helper.- Returns:
- Fluent helper that represents a field != null expression.
-
ne
Not equals expression fluent helper.- Parameters:
value
- Field value to compare with.- Returns:
- Fluent helper that represents a field != value expression.
-
gt
Greater than expression fluent helper.- Parameters:
value
- Field value to compare with.- Returns:
- Fluent helper that represents a field > value expression.
-
ge
Greater than or equals expression fluent helper.- Parameters:
value
- Field value to compare with.- Returns:
- Fluent helper that represents a field >= value expression.
-
lt
Less than expression fluent helper.- Parameters:
value
- Field value to compare with.- Returns:
- Fluent helper that represents a field < value expression.
-
le
Less than or equals expression fluent helper.- Parameters:
value
- Field value to compare with.- Returns:
- Fluent helper that represents a field <= value expression.
-
substringOf
Expression fluent helper supporting the filter function "substringof".- Parameters:
value
- value String value to apply the function on- Returns:
- Fluent helper that represents a
substringof(value,field)
expression
-
endsWith
Expression fluent helper supporting the filter function "endswith".- Parameters:
value
- String value to apply the function on- Returns:
- Fluent helper that represents a
endswith(field,value)
expression
-
startsWith
Expression fluent helper supporting the filter function "startswith".- Parameters:
value
- String value to apply the function on- Returns:
- Fluent helper that represents a
startswith(field,value)
expression
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getFieldName
Description copied from interface:EntitySelectable
Get the field name of OData entity property.- Specified by:
getFieldName
in interfaceEntitySelectable<EntityT>
- Returns:
- The field name
-
getTypeConverter
-