java.lang.Object
org.springframework.data.cassandra.core.query.Update
Update object representing a set of update operations.
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);
- Since:
- 2.0
- Author:
- Mark Paluch, Chema Vinacua
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder to add a single element/multiple elements to a collection associated with aColumnName.static classAdd element(s) to Map operation.static classAdd element(s) to collection operation.static classAbstract class for an update assignment related to a specificColumnName.static classIncrement operation.static interfaceBuilder to remove a single element/multiple elements from a collection associated with aColumnName.static classRemove operation.static classSet at index operation.static classSet at map key operation.static interfaceBuilder to associate a single value with a collection at a given index atColumnName.static classSet operation.static interfaceBuilder to associate a single value with a collection at a given index atColumnName. -
Method Summary
Modifier and TypeMethodDescriptionCreate a newUpdate.AddToBuilderto add items to a collection forcolumnNamein a fluent style.Cleat the collection atcolumnName.Decrement the value atcolumnNameby 1.Decrement the value atcolumnNamebydelta.static Updateempty()Create an emptyUpdateobject.Increment the value atcolumnNameby 1.Increment the value atcolumnNamebydelta.static Updateof(Iterable<Update.AssignmentOp> assignmentOps) Create aUpdateobject given a list ofUpdate.AssignmentOps.Removevaluefrom the collection atcolumnName.removeFrom(String columnName) Create a newUpdate.RemoveFromBuilderto remove items from a collection forcolumnNamein a fluent style.Create a newUpdate.SetBuilderto set a collection item forcolumnNamein a fluent style.Set thecolumnNametovalue.toString()static UpdateSet thecolumnNametovalue.
-
Method Details
-
empty
Create an emptyUpdateobject.- Returns:
- a new, empty
Update.
-
of
Create aUpdateobject given a list ofUpdate.AssignmentOps.- Parameters:
assignmentOps- must not be null.
-
update
Set thecolumnNametovalue.- Returns:
- a new
Update.
-
set
Set thecolumnNametovalue.- Parameters:
columnName- must not be null.value- value to set on column with name, may be null.- Returns:
- a new
Updateobject containing the merge result of the existing assignments and the current assignment.
-
set
Create a newUpdate.SetBuilderto set a collection item forcolumnNamein a fluent style.- Parameters:
columnName- must not be null.- Returns:
- a new
Update.AddToBuilderto build an set assignment.
-
addTo
Create a newUpdate.AddToBuilderto add items to a collection forcolumnNamein a fluent style.- Parameters:
columnName- must not be null.- Returns:
- a new
Update.AddToBuilderto build an add-to assignment.
-
removeFrom
Create a newUpdate.RemoveFromBuilderto remove items from a collection forcolumnNamein a fluent style.- Parameters:
columnName- must not be null.- Returns:
- a new
Update.RemoveFromBuilderto build an remove-from assignment. - Since:
- 3.1.4
-
remove
Removevaluefrom the collection atcolumnName.- Parameters:
columnName- must not be null.value- must not be null.- Returns:
- a new
Updateobject containing the merge result of the existing assignments and the current assignment.
-
clear
Cleat the collection atcolumnName.- Parameters:
columnName- must not be null.- Returns:
- a new
Updateobject containing the merge result of the existing assignments and the current assignment.
-
increment
Increment the value atcolumnNameby 1.- Parameters:
columnName- must not be null.- Returns:
- a new
Updateobject containing the merge result of the existing assignments and the current assignment.
-
increment
Increment the value atcolumnNamebydelta.- Parameters:
columnName- must not be null.delta- increment value.- Returns:
- a new
Updateobject containing the merge result of the existing assignments and the current assignment.
-
decrement
Decrement the value atcolumnNameby 1.- Parameters:
columnName- must not be null.- Returns:
- a new
Updateobject containing the merge result of the existing assignments and the current assignment.
-
decrement
Decrement the value atcolumnNamebydelta.- Parameters:
columnName- must not be null.delta- decrement value.- Returns:
- a new
Updateobject containing the merge result of the existing assignments and the current assignment.
-
getUpdateOperations
- Returns:
Collectionof update operations.
-
toString
-