public class Update extends Object
Update objects can be created in a fluent
style. Each construction operation creates a new immutable Update object.
Update update = Update.empty().set("foo", "bar").addTo("baz").prependAll(listOfValues);
| Modifier and Type | Class and Description |
|---|---|
static interface |
Update.AddToBuilder
Builder to add a single element/multiple elements to a collection associated with a
ColumnName. |
static class |
Update.AddToMapOp
Add element(s) to Map operation.
|
static class |
Update.AddToOp
Add element(s) to collection operation.
|
static class |
Update.AssignmentOp
Abstract class for an update assignment related to a specific
ColumnName. |
static class |
Update.IncrOp
Increment operation.
|
static interface |
Update.RemoveFromBuilder
Builder to remove a single element/multiple elements from a collection associated with a
ColumnName. |
static class |
Update.RemoveOp
Remove operation.
|
static class |
Update.SetAtIndexOp
Set at index operation.
|
static class |
Update.SetAtKeyOp
Set at map key operation.
|
static interface |
Update.SetBuilder
Builder to associate a single value with a collection at a given index at
ColumnName. |
static class |
Update.SetOp
Set operation.
|
static interface |
Update.SetValueBuilder
Builder to associate a single value with a collection at a given index at
ColumnName. |
| Modifier and Type | Method and Description |
|---|---|
Update.AddToBuilder |
addTo(String columnName)
Create a new
Update.AddToBuilder to add items to a collection for columnName in a fluent style. |
Update |
clear(String columnName)
Cleat the collection at
columnName. |
Update |
decrement(String columnName)
Decrement the value at
columnName by 1. |
Update |
decrement(String columnName,
Number delta)
Decrement the value at
columnName by delta. |
static Update |
empty()
Create an empty
Update object. |
Collection<Update.AssignmentOp> |
getUpdateOperations() |
Update |
increment(String columnName)
Increment the value at
columnName by 1. |
Update |
increment(String columnName,
Number delta)
Increment the value at
columnName by delta. |
static Update |
of(Iterable<Update.AssignmentOp> assignmentOps)
Create a
Update object given a list of Update.AssignmentOps. |
Update |
remove(String columnName,
Object value)
Remove
value from the collection at columnName. |
Update.RemoveFromBuilder |
removeFrom(String columnName)
Create a new
Update.RemoveFromBuilder to remove items from a collection for columnName in a fluent style. |
Update.SetBuilder |
set(String columnName)
Create a new
Update.SetBuilder to set a collection item for columnName in a fluent style. |
Update |
set(String columnName,
Object value)
Set the
columnName to value. |
String |
toString() |
static Update |
update(String columnName,
Object value)
Set the
columnName to value. |
public static Update of(Iterable<Update.AssignmentOp> assignmentOps)
Update object given a list of Update.AssignmentOps.assignmentOps - must not be null.public static Update update(String columnName, @Nullable Object value)
columnName to value.Update.public Update set(String columnName, @Nullable Object value)
columnName to value.columnName - must not be null.value - value to set on column with name, may be null.Update object containing the merge result of the existing assignments and the current
assignment.public Update.SetBuilder set(String columnName)
Update.SetBuilder to set a collection item for columnName in a fluent style.columnName - must not be null.Update.AddToBuilder to build an set assignment.public Update.AddToBuilder addTo(String columnName)
Update.AddToBuilder to add items to a collection for columnName in a fluent style.columnName - must not be null.Update.AddToBuilder to build an add-to assignment.public Update.RemoveFromBuilder removeFrom(String columnName)
Update.RemoveFromBuilder to remove items from a collection for columnName in a fluent style.columnName - must not be null.Update.RemoveFromBuilder to build an remove-from assignment.public Update remove(String columnName, Object value)
value from the collection at columnName.columnName - must not be null.value - must not be null.Update object containing the merge result of the existing assignments and the current
assignment.public Update clear(String columnName)
columnName.columnName - must not be null.Update object containing the merge result of the existing assignments and the current
assignment.public Update increment(String columnName)
columnName by 1.columnName - must not be null.Update object containing the merge result of the existing assignments and the current
assignment.public Update increment(String columnName, Number delta)
columnName by delta.columnName - must not be null.delta - increment value.Update object containing the merge result of the existing assignments and the current
assignment.public Update decrement(String columnName)
columnName by 1.columnName - must not be null.Update object containing the merge result of the existing assignments and the current
assignment.public Update decrement(String columnName, Number delta)
columnName by delta.columnName - must not be null.delta - decrement value.Update object containing the merge result of the existing assignments and the current
assignment.public Collection<Update.AssignmentOp> getUpdateOperations()
Collection of update operations.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.