public interface Update<T extends StructuredType<?>> extends CqnUpdate
CdsDataStore
.Modifier and Type | Method and Description |
---|---|
Update<T> |
byId(Object idValue)
Sets the where condition of the update statement, requiring that the value of
the single key element of the target entity set is equal to the given
idValue.
|
static Update<StructuredType<?>> |
cqn(String cqnUpdate)
Creates an update statement to update data for a specified entity set.
|
Update<T> |
data(Map<String,?> data)
Sets the values to be updated by the update statement.
|
Update<T> |
data(String elementName,
Object value)
Adds an element to be updated to the update statement.
|
static Update<StructuredType<?>> |
entity(CdsEntity entity)
Creates an update statement to update data for a specified entity set.
|
static <E extends StructuredType<E>> |
entity(Class<E> entity)
Creates an update statement to update data for a specified entity set.
|
static <E extends StructuredType<E>,R extends StructuredType<R>> |
entity(Class<E> entity,
Function<E,R> path)
Creates an update statement to update data for a specified entity set.
|
static Update<StructuredType<?>> |
entity(String qualifiedName)
Creates an update statement to update entries of a specified entity set.
|
static Update<StructuredType<?>> |
entity(String qualifiedName,
UnaryOperator<StructuredType<?>> path)
Creates an update statement to update entries of a specified entity set.
|
Update<T> |
matching(Map<String,?> values)
Sets the where condition of the update statement.
|
Update<T> |
where(CqnPredicate predicate)
Sets the where condition of the update statement.
|
Update<T> |
where(Function<T,CqnPredicate> predicate)
Sets the where condition of the update statement.
|
accept
toJson
static Update<StructuredType<?>> entity(String qualifiedName)
qualifiedName
- the fully qualified name of the CDS entity setstatic Update<StructuredType<?>> entity(String qualifiedName, UnaryOperator<StructuredType<?>> path)
qualifiedName
- the fully qualified name of the CDS entity setpath
- a path expression navigating from the root entity to the
target entity of the update statementstatic <E extends StructuredType<E>> Update<E> entity(Class<E> entity)
entity
- the static model representation of the entity setstatic <E extends StructuredType<E>,R extends StructuredType<R>> Update<R> entity(Class<E> entity, Function<E,R> path)
entity
- the static model representation of the entity setpath
- a path expression navigating from the root entity to the target
entity of the update statementstatic Update<StructuredType<?>> entity(CdsEntity entity)
entity
- the model representation of the entity set obtained by
reflectionCdsModel.findEntity(String)
,
CdsModel.entities()
static Update<StructuredType<?>> cqn(String cqnUpdate)
cqnUpdate
- the CQN representation of the update statementUpdate<T> data(Map<String,?> data)
data
- the data to be updated as a map from element name to new valueUpdate<T> data(String elementName, Object value)
elementName
- the element name of the target entityvalue
- the new value of the elementUpdate<T> where(CqnPredicate predicate)
predicate
- a CqnPredicate
Update<T> where(Function<T,CqnPredicate> predicate)
predicate
- a Function
providing the where conditionUpdate<T> matching(Map<String,?> values)
CqnParameter
. The map entries are transformed into
comparison predicates and joined via and.values
- the element name to value map defining the where conditionCopyright © 2019 SAP. All rights reserved.