diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/AsyncCqlOperations.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/AsyncCqlOperations.java index 69235e58a..7eef7f6d1 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/AsyncCqlOperations.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/AsyncCqlOperations.java @@ -15,8 +15,6 @@ */ package org.springframework.data.cassandra.core.cql; -import reactor.core.publisher.Mono; - import java.util.List; import java.util.Map; @@ -82,7 +80,7 @@ public interface AsyncCqlOperations { * @param args arguments to bind to the query (leaving it to the {@link PreparedStatement} to guess the corresponding * CQL type). * @return boolean value whether the statement was applied. - * @throws DataAccessException if there is any problem issuing the execution. + * @throws DataAccessException if there is any problem executing the query. */ ListenableFuture execute(String cql, Object... args) throws DataAccessException; @@ -96,7 +94,7 @@ public interface AsyncCqlOperations { * be assumed to contain no bind parameters. Even if there are no bind parameters, this object may be used to * set fetch size and other performance options. * @return boolean value whether the statement was applied. - * @throws DataAccessException if there is any problem issuing the execution. + * @throws DataAccessException if there is any problem executing the query. */ ListenableFuture execute(String cql, @Nullable PreparedStatementBinder psb) throws DataAccessException; @@ -112,8 +110,8 @@ public interface AsyncCqlOperations { * @param cql static CQL to execute, must not be {@literal null} or empty. * @param action callback object that specifies the action, must not be {@literal null}. * @return a result object returned by the action, or {@literal null} - * @throws DataAccessException if there is any problem TODO: Lambda-usage clashes with execute(cql, - * PreparedStatementBinder) + * @throws DataAccessException if there is any problem executing the query. TODO: Lambda-usage clashes with + * execute(cql, PreparedStatementBinder) */ ListenableFuture execute(String cql, PreparedStatementCallback action) throws DataAccessException; @@ -140,7 +138,7 @@ public interface AsyncCqlOperations { * * @param cql static CQL to execute, must not be {@literal null} or empty. * @param rowCallbackHandler object that will extract results, one row at a time, must not be {@literal null}. - * @throws DataAccessException if there is any problem executing the query + * @throws DataAccessException if there is any problem executing the query. * @see #query(String, RowCallbackHandler, Object[]) */ ListenableFuture query(String cql, RowCallbackHandler rowCallbackHandler) throws DataAccessException; @@ -154,7 +152,7 @@ public interface AsyncCqlOperations { * @param cql static CQL to execute, must not be {@literal null} or empty. * @param rowMapper object that will map one object per row, must not be {@literal null}. * @return the result {@link List}, containing mapped objects. - * @throws DataAccessException if there is any problem executing the query + * @throws DataAccessException if there is any problem executing the query. * @see #query(String, RowMapper, Object[]) */ ListenableFuture> query(String cql, RowMapper rowMapper) throws DataAccessException; @@ -208,7 +206,7 @@ public interface AsyncCqlOperations { * set fetch size and other performance options. * @param resultSetExtractor object that will extract results, must not be {@literal null}. * @return an arbitrary result object, as returned by the {@link ResultSetExtractor}. - * @throws DataAccessException if there is any problem + * @throws DataAccessException if there is any problem executing the query. */ ListenableFuture query(String cql, @Nullable PreparedStatementBinder psb, ResultSetExtractor resultSetExtractor) throws DataAccessException; @@ -366,7 +364,7 @@ public interface AsyncCqlOperations { * * @param cql static CQL to execute, must not be {@literal null} or empty. * @param requiredType the type that the result object is expected to match, must not be {@literal null}. - * @return the result object of the required type, or {@link Mono#empty()} in case of CQL NULL. + * @return the result object of the required type, or {@literal null} in case of CQL NULL. * @throws IncorrectResultSizeDataAccessException if the query does not return exactly one row, or does not return * exactly one column in that row. * @throws DataAccessException if there is any problem executing the query. @@ -385,7 +383,7 @@ public interface AsyncCqlOperations { * @param requiredType the type that the result object is expected to match, must not be {@literal null}. * @param args arguments to bind to the query (leaving it to the PreparedStatement to guess the corresponding CQL * type) - * @return the result object of the required type, or {@link Mono#empty()} in case of CQL NULL. + * @return the result object of the required type, or {@literal null} in case of CQL NULL. * @throws IncorrectResultSizeDataAccessException if the query does not return exactly one row, or does not return * exactly one column in that row. * @throws DataAccessException if there is any problem executing the query. @@ -491,7 +489,7 @@ public interface AsyncCqlOperations { * * @param statement static CQL {@link Statement}, must not be {@literal null}. * @param rowCallbackHandler object that will extract results, one row at a time, must not be {@literal null}. - * @throws DataAccessException if there is any problem executing the query + * @throws DataAccessException if there is any problem executing the query. * @see #query(String, RowCallbackHandler, Object[]) */ ListenableFuture query(Statement statement, RowCallbackHandler rowCallbackHandler) throws DataAccessException; @@ -505,7 +503,7 @@ public interface AsyncCqlOperations { * @param statement static CQL {@link Statement}, must not be {@literal null}. * @param rowMapper object that will map one object per row, must not be {@literal null}. * @return the result {@link List}, containing mapped objects. - * @throws DataAccessException if there is any problem executing the query + * @throws DataAccessException if there is any problem executing the query. * @see #query(String, RowMapper, Object[]) */ ListenableFuture> query(Statement statement, RowMapper rowMapper) throws DataAccessException; @@ -577,7 +575,7 @@ public interface AsyncCqlOperations { * * @param statement static CQL {@link Statement}, must not be {@literal null}. * @param requiredType the type that the result object is expected to match, must not be {@literal null}. - * @return the result object of the required type, or {@link Mono#empty()} in case of CQL NULL. + * @return the result object of the required type, or {@literal null} in case of CQL NULL. * @throws IncorrectResultSizeDataAccessException if the query does not return exactly one row, or does not return * exactly one column in that row. * @throws DataAccessException if there is any problem executing the query. @@ -627,7 +625,7 @@ public interface AsyncCqlOperations { * * @param preparedStatementCreator object that provides CQL and any necessary parameters, must not be {@literal null}. * @return boolean value whether the statement was applied. - * @throws DataAccessException if there is any problem issuing the execution. + * @throws DataAccessException if there is any problem executing the query. */ // TODO: Interferes with execute(session callback lambda) ListenableFuture execute(AsyncPreparedStatementCreator preparedStatementCreator) throws DataAccessException; @@ -644,7 +642,7 @@ public interface AsyncCqlOperations { * {@link com.datastax.driver.core.Session}, must not be {@literal null}. * @param action callback object that specifies the action, must not be {@literal null}. * @return a result object returned by the action, or {@literal null}. - * @throws DataAccessException if there is any problem + * @throws DataAccessException if there is any problem executing the query. */ ListenableFuture execute(AsyncPreparedStatementCreator preparedStatementCreator, PreparedStatementCallback action) throws DataAccessException; @@ -656,7 +654,7 @@ public interface AsyncCqlOperations { * {@link com.datastax.driver.core.Session}, must not be {@literal null}. * @param resultSetExtractor object that will extract results, must not be {@literal null}. * @return an arbitrary result object, as returned by the {@link ResultSetExtractor} - * @throws DataAccessException if there is any problem + * @throws DataAccessException if there is any problem executing the query. */ ListenableFuture query(AsyncPreparedStatementCreator preparedStatementCreator, ResultSetExtractor resultSetExtractor) throws DataAccessException; @@ -696,7 +694,7 @@ public interface AsyncCqlOperations { * set fetch size and other performance options. * @param resultSetExtractor object that will extract results, must not be {@literal null}. * @return an arbitrary result object, as returned by the {@link ResultSetExtractor}. - * @throws DataAccessException if there is any problem + * @throws DataAccessException if there is any problem executing the query. */ ListenableFuture query(AsyncPreparedStatementCreator preparedStatementCreator, @Nullable PreparedStatementBinder psb, ResultSetExtractor resultSetExtractor) diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/CqlOperations.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/CqlOperations.java index 15545a45e..82a9a04b7 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/CqlOperations.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/CqlOperations.java @@ -15,8 +15,6 @@ */ package org.springframework.data.cassandra.core.cql; -import reactor.core.publisher.Mono; - import java.util.Collection; import java.util.List; import java.util.Map; @@ -81,7 +79,7 @@ public interface CqlOperations { * @param args arguments to bind to the query (leaving it to the {@link PreparedStatement} to guess the corresponding * CQL type). * @return boolean value whether the statement was applied. - * @throws DataAccessException if there is any problem issuing the execution. + * @throws DataAccessException if there is any problem executing the query. */ boolean execute(String cql, Object... args) throws DataAccessException; @@ -95,7 +93,7 @@ public interface CqlOperations { * be assumed to contain no bind parameters. Even if there are no bind parameters, this object may be used to * set fetch size and other performance options. * @return boolean value whether the statement was applied. - * @throws DataAccessException if there is any problem issuing the execution. + * @throws DataAccessException if there is any problem executing the query. */ boolean execute(String cql, @Nullable PreparedStatementBinder psb) throws DataAccessException; @@ -110,7 +108,7 @@ public interface CqlOperations { * @param cql static CQL to execute, must not be empty or {@literal null}. * @param action callback object that specifies the action, must not be {@literal null}. * @return a result object returned by the action, or {@literal null} - * @throws DataAccessException if there is any problem + * @throws DataAccessException if there is any problem executing the query. */ @Nullable T execute(String cql, PreparedStatementCallback action) throws DataAccessException; @@ -139,7 +137,7 @@ public interface CqlOperations { * * @param cql static CQL to execute, must not be empty or {@literal null}. * @param rowCallbackHandler object that will extract results, one row at a time, must not be {@literal null}. - * @throws DataAccessException if there is any problem executing the query + * @throws DataAccessException if there is any problem executing the query. * @see #query(String, RowCallbackHandler, Object[]) */ void query(String cql, RowCallbackHandler rowCallbackHandler) throws DataAccessException; @@ -153,7 +151,7 @@ public interface CqlOperations { * @param cql static CQL to execute, must not be empty or {@literal null}. * @param rowMapper object that will map one object per row, must not be {@literal null}. * @return the result {@link List}, containing mapped objects. - * @throws DataAccessException if there is any problem executing the query + * @throws DataAccessException if there is any problem executing the query. * @see #query(String, RowMapper, Object[]) */ List query(String cql, RowMapper rowMapper) throws DataAccessException; @@ -206,7 +204,7 @@ public interface CqlOperations { * set fetch size and other performance options. * @param resultSetExtractor object that will extract results, must not be {@literal null}. * @return an arbitrary result object, as returned by the {@link ResultSetExtractor}. - * @throws DataAccessException if there is any problem + * @throws DataAccessException if there is any problem executing the query. */ @Nullable T query(String cql, @Nullable PreparedStatementBinder psb, ResultSetExtractor resultSetExtractor) @@ -364,7 +362,7 @@ public interface CqlOperations { * * @param cql static CQL to execute, must not be empty or {@literal null}. * @param requiredType the type that the result object is expected to match, must not be {@literal null}. - * @return the result object of the required type, or {@link Mono#empty()} in case of CQL NULL. + * @return the result object of the required type, or {@literal null} in case of CQL NULL. * @throws IncorrectResultSizeDataAccessException if the query does not return exactly one row, or does not return * exactly one column in that row. * @throws DataAccessException if there is any problem executing the query. @@ -383,7 +381,7 @@ public interface CqlOperations { * @param requiredType the type that the result object is expected to match, must not be {@literal null}. * @param args arguments to bind to the query (leaving it to the PreparedStatement to guess the corresponding CQL * type) - * @return the result object of the required type, or {@link Mono#empty()} in case of CQL NULL. + * @return the result object of the required type, or {@literal null} in case of CQL NULL. * @throws IncorrectResultSizeDataAccessException if the query does not return exactly one row, or does not return * exactly one column in that row. * @throws DataAccessException if there is any problem executing the query. @@ -520,7 +518,7 @@ public interface CqlOperations { * * @param statement static CQL {@link Statement}, must not be {@literal null}. * @param rowCallbackHandler object that will extract results, one row at a time, must not be {@literal null}. - * @throws DataAccessException if there is any problem executing the query + * @throws DataAccessException if there is any problem executing the query. * @see #query(String, RowCallbackHandler, Object[]) */ void query(Statement statement, RowCallbackHandler rowCallbackHandler) throws DataAccessException; @@ -534,7 +532,7 @@ public interface CqlOperations { * @param statement static CQL {@link Statement}, must not be {@literal null}. * @param rowMapper object that will map one object per row, must not be {@literal null}. * @return the result {@link List}, containing mapped objects. - * @throws DataAccessException if there is any problem executing the query + * @throws DataAccessException if there is any problem executing the query. * @see #query(String, RowMapper, Object[]) */ List query(Statement statement, RowMapper rowMapper) throws DataAccessException; @@ -606,7 +604,7 @@ public interface CqlOperations { * * @param statement static CQL {@link Statement}, must not be {@literal null}. * @param requiredType the type that the result object is expected to match, must not be {@literal null}. - * @return the result object of the required type, or {@link Mono#empty()} in case of CQL NULL. + * @return the result object of the required type, or {@literal null} in case of CQL NULL. * @throws IncorrectResultSizeDataAccessException if the query does not return exactly one row, or does not return * exactly one column in that row. * @throws DataAccessException if there is any problem executing the query. @@ -672,7 +670,7 @@ public interface CqlOperations { * * @param psc object that provides CQL and any necessary parameters, must not be {@literal null}. * @return boolean value whether the statement was applied. - * @throws DataAccessException if there is any problem issuing the execution. + * @throws DataAccessException if there is any problem executing the query. */ // TODO: Interferes with execute(session callback lambda) boolean execute(PreparedStatementCreator psc) throws DataAccessException; @@ -689,7 +687,7 @@ public interface CqlOperations { * {@link com.datastax.driver.core.Session}, must not be {@literal null}. * @param action callback object that specifies the action, must not be {@literal null}. * @return a result object returned by the action, or {@literal null}. - * @throws DataAccessException if there is any problem + * @throws DataAccessException if there is any problem executing the query. */ @Nullable T execute(PreparedStatementCreator preparedStatementCreator, PreparedStatementCallback action) @@ -702,7 +700,7 @@ public interface CqlOperations { * {@link com.datastax.driver.core.Session}, must not be {@literal null}. * @param resultSetExtractor object that will extract results, must not be {@literal null}. * @return an arbitrary result object, as returned by the {@link ResultSetExtractor} - * @throws DataAccessException if there is any problem + * @throws DataAccessException if there is any problem executing the query. */ @Nullable T query(PreparedStatementCreator preparedStatementCreator, ResultSetExtractor resultSetExtractor) @@ -743,7 +741,7 @@ public interface CqlOperations { * set fetch size and other performance options. * @param resultSetExtractor object that will extract results, must not be {@literal null}. * @return an arbitrary result object, as returned by the {@link ResultSetExtractor}. - * @throws DataAccessException if there is any problem + * @throws DataAccessException if there is any problem executing the query. */ @Nullable T query(PreparedStatementCreator preparedStatementCreator, @Nullable PreparedStatementBinder psb, @@ -789,6 +787,7 @@ public interface CqlOperations { * Cassandra Ring topology. * * @return The list of ring tokens that are active in the cluster + * @throws DataAccessException if there is any problem executing the query. */ List describeRing() throws DataAccessException; diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/ReactiveCqlOperations.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/ReactiveCqlOperations.java index 7034fe642..2c99329da 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/ReactiveCqlOperations.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/ReactiveCqlOperations.java @@ -97,7 +97,7 @@ public interface ReactiveCqlOperations { * @param cql static CQL to execute, must not be empty or {@literal null}. * @param rowMapper object that will map one object per row, must not be {@literal null}. * @return the result {@link Flux}, containing mapped objects. - * @throws DataAccessException if there is any problem executing the query + * @throws DataAccessException if there is any problem executing the query. * @see #query(String, RowMapper, Object[]) */ Flux query(String cql, RowMapper rowMapper) throws DataAccessException; @@ -230,7 +230,7 @@ public interface ReactiveCqlOperations { * * @param statementPublisher defining a {@link Publisher} of CQL statements that will be executed. * @return an array of the number of rows affected by each statement - * @throws DataAccessException if there is any problem executing the batch + * @throws DataAccessException if there is any problem executing the batch. */ Flux execute(Publisher statementPublisher) throws DataAccessException; @@ -270,7 +270,7 @@ public interface ReactiveCqlOperations { * @param statement static CQL {@link Statement}, must not be {@literal null}. * @param rowMapper object that will map one object per row, must not be {@literal null}. * @return the result {@link Flux}, containing mapped objects. - * @throws DataAccessException if there is any problem executing the query + * @throws DataAccessException if there is any problem executing the query. * @see #query(String, RowMapper, Object[]) */ Flux query(Statement statement, RowMapper rowMapper) throws DataAccessException; @@ -414,7 +414,7 @@ public interface ReactiveCqlOperations { * {@link org.springframework.data.cassandra.ReactiveSession}, must not be {@literal null}. * @param action callback object that specifies the action, must not be {@literal null}. * @return a result object returned by the action, or {@literal null}. - * @throws DataAccessException if there is any problem + * @throws DataAccessException if there is any problem executing the query. */ Flux execute(ReactivePreparedStatementCreator psc, ReactivePreparedStatementCallback action) throws DataAccessException; @@ -430,7 +430,7 @@ public interface ReactiveCqlOperations { * @param cql static CQL to execute, must not be empty or {@literal null}. * @param action callback object that specifies the action, must not be {@literal null}. * @return a result object returned by the action, or {@literal null} - * @throws DataAccessException if there is any problem + * @throws DataAccessException if there is any problem executing the query. */ Flux execute(String cql, ReactivePreparedStatementCallback action) throws DataAccessException; @@ -441,7 +441,7 @@ public interface ReactiveCqlOperations { * {@link org.springframework.data.cassandra.ReactiveSession}, must not be {@literal null}. * @param rse object that will extract results, must not be {@literal null}. * @return an arbitrary result object, as returned by the {@link ReactiveResultSetExtractor} - * @throws DataAccessException if there is any problem + * @throws DataAccessException if there is any problem executing the query. */ Flux query(ReactivePreparedStatementCreator psc, ReactiveResultSetExtractor rse) throws DataAccessException; @@ -454,7 +454,7 @@ public interface ReactiveCqlOperations { * set fetch size and other performance options. * @param rse object that will extract results, must not be {@literal null}. * @return an arbitrary result object, as returned by the {@link ReactiveResultSetExtractor}. - * @throws DataAccessException if there is any problem + * @throws DataAccessException if there is any problem executing the query. */ Flux query(String cql, @Nullable PreparedStatementBinder psb, ReactiveResultSetExtractor rse) throws DataAccessException; @@ -470,7 +470,7 @@ public interface ReactiveCqlOperations { * set fetch size and other performance options. * @param rse object that will extract results, must not be {@literal null}. * @return an arbitrary result object, as returned by the {@link ResultSetExtractor}. - * @throws DataAccessException if there is any problem + * @throws DataAccessException if there is any problem executing the query. */ Flux query(ReactivePreparedStatementCreator psc, @Nullable PreparedStatementBinder psb, ReactiveResultSetExtractor rse) throws DataAccessException; @@ -682,7 +682,7 @@ public interface ReactiveCqlOperations { * be assumed to contain no bind parameters. Even if there are no bind parameters, this object may be used to * set fetch size and other performance options. * @return boolean value whether the statement was applied. - * @throws DataAccessException if there is any problem issuing the execution. + * @throws DataAccessException if there is any problem executing the query. */ Mono execute(String cql, @Nullable PreparedStatementBinder psb) throws DataAccessException; @@ -694,7 +694,7 @@ public interface ReactiveCqlOperations { * @param args arguments to bind to the query (leaving it to the {@link PreparedStatement} to guess the corresponding * CQL type). * @return boolean value whether the statement was applied. - * @throws DataAccessException if there is any problem issuing the execution. + * @throws DataAccessException if there is any problem executing the query. */ Mono execute(String cql, Object... args) throws DataAccessException; @@ -706,7 +706,7 @@ public interface ReactiveCqlOperations { * @param args arguments to bind to the query (leaving it to the {@link PreparedStatement} to guess the corresponding * CQL type). * @return boolean value whether the statement was applied. - * @throws DataAccessException if there is any problem issuing the execution. + * @throws DataAccessException if there is any problem executing the query. */ Flux execute(String cql, Publisher args) throws DataAccessException; }