Class Update
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, Jeongjun Min
-
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.<T,P> Update.AddToBuilder addTo(TypedPropertyPath<T, P> property) Create a newUpdate.AddToBuilderto add items to a collection forpropertyin a fluent style.Cleat the collection atcolumnName.<T,P> Update clear(TypedPropertyPath<T, P> property) Cleat the collection atproperty.Decrement the value atcolumnNameby 1.Decrement the value atcolumnNamebydelta.<T,P> Update decrement(TypedPropertyPath<T, P> property) Decrement the value atpropertyby 1.<T,P> Update decrement(TypedPropertyPath<T, P> property, Number delta) Decrement the value atpropertybydelta.static Updateempty()Create an emptyUpdateobject.Increment the value atcolumnNameby 1.Increment the value atcolumnNamebydelta.<T,P> Update increment(TypedPropertyPath<T, P> property) Increment the value atpropertyby 1.<T,P> Update increment(TypedPropertyPath<T, P> property, Number delta) Increment the value atpropertybydelta.static Updateof(Iterable<Update.AssignmentOp> assignmentOps) Create aUpdateobject given a list ofUpdate.AssignmentOps.Removevaluefrom the collection atcolumnName.<T,P> Update remove(TypedPropertyPath<T, P> property, Object value) Removevaluefrom the collection atproperty.removeFrom(String columnName) Create a newUpdate.RemoveFromBuilderto remove items from a collection forcolumnNamein a fluent style.<T,P> Update.RemoveFromBuilder removeFrom(TypedPropertyPath<T, P> property) Create a newUpdate.RemoveFromBuilderto remove items from a collection forpropertyin a fluent style.Create a newUpdate.SetBuilderto set a collection item forcolumnNamein a fluent style.Set thecolumnNametovalue.<T,P> Update.SetBuilder set(TypedPropertyPath<T, P> property) Create a newUpdate.SetBuilderto set a collection item forpropertyin a fluent style.<T,P> Update set(TypedPropertyPath<T, P> property, @Nullable Object value) Set thepropertytovalue.toString()static UpdateSet thecolumnNametovalue.static <T,P> Update update(TypedPropertyPath<T, P> property, @Nullable Object value) Set thepropertytovalue.
-
Method Details
-
empty
-
of
Create aUpdateobject given a list ofUpdate.AssignmentOps.- Parameters:
assignmentOps- must not be null.
-
update
Set thepropertytovalue.- Returns:
- a new
Update.
-
update
-
set
Set thepropertytovalue.- Parameters:
property- 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
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 forpropertyin a fluent style.- Parameters:
property- must not be null.- Returns:
- a new
Update.AddToBuilderto build a set assignment. - Since:
- 5.1
-
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 a set assignment.
-
addTo
Create a newUpdate.AddToBuilderto add items to a collection forpropertyin a fluent style.- Parameters:
property- must not be null.- Returns:
- a new
Update.AddToBuilderto build an add-to 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 forpropertyin a fluent style.- Parameters:
property- must not be null.- Returns:
- a new
Update.RemoveFromBuilderto build a remove-from assignment. - Since:
- 5.1
-
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 a remove-from assignment. - Since:
- 3.1.4
-
remove
Removevaluefrom the collection atproperty.- Parameters:
property- 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. - Since:
- 5.1s
-
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 atproperty.- Parameters:
property- must not be null.- Returns:
- a new
Updateobject containing the merge result of the existing assignments and the current assignment. - Since:
- 5.1
-
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 atpropertyby 1.- Parameters:
property- must not be null.- Returns:
- a new
Updateobject containing the merge result of the existing assignments and the current assignment. - Since:
- 5.1
-
increment
Increment the value atpropertybydelta.- Parameters:
property- must not be null.delta- increment value.- Returns:
- a new
Updateobject containing the merge result of the existing assignments and the current assignment. - Since:
- 5.1
-
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 atpropertyby 1.- Parameters:
property- must not be null.- Returns:
- a new
Updateobject containing the merge result of the existing assignments and the current assignment. - Since:
- 5.1
-
decrement
Decrement the value atpropertybydelta.- Parameters:
property- must not be null.delta- decrement value.- Returns:
- a new
Updateobject containing the merge result of the existing assignments and the current assignment. - Since:
- 5.1
-
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
-