@@ -15,12 +15,13 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.core;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
import lombok.Value;
|
||||
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.reactivestreams.Publisher;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
|
||||
@@ -132,6 +132,7 @@ public interface ReactiveUpdateOperation {
|
||||
* @see reactor.core.publisher.Mono
|
||||
*/
|
||||
Mono<WriteResult> apply(Update update);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,8 +15,9 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.core.query;
|
||||
|
||||
import static java.util.stream.StreamSupport.*;
|
||||
import static org.springframework.util.ObjectUtils.*;
|
||||
import static java.util.stream.StreamSupport.stream;
|
||||
import static org.springframework.util.ObjectUtils.nullSafeEquals;
|
||||
import static org.springframework.util.ObjectUtils.nullSafeHashCode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -76,9 +77,9 @@ public class Query implements Filter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Static factory method to create an empty {@link Query}
|
||||
* Static factory method to create an empty {@link Query}.
|
||||
*
|
||||
* @return the new {@link Query}.
|
||||
* @return a new, empty {@link Query}.
|
||||
*/
|
||||
public static Query empty() {
|
||||
return EMPTY;
|
||||
@@ -110,8 +111,8 @@ public class Query implements Filter {
|
||||
List<CriteriaDefinition> collect = stream(criteriaDefinitions.spliterator(), false)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
return new Query(collect, Columns.empty(), Sort.unsorted(), Optional.empty(), Optional.empty(), Optional.empty(),
|
||||
false);
|
||||
return new Query(collect, Columns.empty(), Sort.unsorted(), Optional.empty(), Optional.empty(),
|
||||
Optional.empty(), false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -332,8 +333,8 @@ public class Query implements Filter {
|
||||
boolean limitEqual = this.limit == that.limit;
|
||||
boolean allowFilteringEqual = this.allowFiltering == that.allowFiltering;
|
||||
|
||||
return (criteriaEqual && columnsEqual && sortEqual && pagingStateEqual && queryOptionsEqual && limitEqual
|
||||
&& allowFilteringEqual);
|
||||
return criteriaEqual && columnsEqual && sortEqual && pagingStateEqual && queryOptionsEqual && limitEqual
|
||||
&& allowFilteringEqual;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.core.query;
|
||||
|
||||
import static org.springframework.data.cassandra.core.query.SerializationUtils.*;
|
||||
import static org.springframework.data.cassandra.core.query.SerializationUtils.serializeToCqlSafely;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
@@ -52,7 +52,7 @@ public class Update {
|
||||
/**
|
||||
* Create an empty {@link Update} object.
|
||||
*
|
||||
* @return a new {@link Update}.
|
||||
* @return a new, empty {@link Update}.
|
||||
*/
|
||||
public static Update empty() {
|
||||
return EMPTY;
|
||||
@@ -221,6 +221,7 @@ public class Update {
|
||||
*
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public interface AddToBuilder {
|
||||
|
||||
/**
|
||||
@@ -531,7 +532,6 @@ public class Update {
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public AddToMapOp(ColumnName columnName, Map<? extends Object, ? extends Object> value) {
|
||||
|
||||
super(columnName);
|
||||
this.value = (Map) value;
|
||||
}
|
||||
@@ -557,7 +557,6 @@ public class Update {
|
||||
private final @Nullable Object value;
|
||||
|
||||
public SetOp(ColumnName columnName, @Nullable Object value) {
|
||||
|
||||
super(columnName);
|
||||
this.value = value;
|
||||
}
|
||||
@@ -649,7 +648,6 @@ public class Update {
|
||||
private final Number value;
|
||||
|
||||
public IncrOp(ColumnName columnName, Number value) {
|
||||
|
||||
super(columnName);
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user