DATACASS-350 - Add since version to existing deprecations.

This commit is contained in:
Mark Paluch
2016-10-24 11:58:22 +02:00
parent b7bdd4cd7c
commit 6b683f4346
13 changed files with 40 additions and 83 deletions

View File

@@ -20,7 +20,7 @@ package org.springframework.cassandra.core;
*
* @author David Webb
* @author Antoine Toulme
* @deprecated Use the driver's {@link com.datastax.driver.core.ConsistencyLevel}.
* @deprecated as of 1.5, use the driver's {@link com.datastax.driver.core.ConsistencyLevel}.
*/
@Deprecated
public enum ConsistencyLevel {
@@ -28,17 +28,17 @@ public enum ConsistencyLevel {
ANY, ONE, TWO, THREE,
/**
* @deprecated Use {@link #QUORUM}
* @deprecated as of 1.5, use {@link #QUORUM}
*/
@Deprecated QUOROM,
/**
* @deprecated Use {@link #LOCAL_QUORUM}
* @deprecated as of 1.5, use {@link #LOCAL_QUORUM}
*/
@Deprecated LOCAL_QUOROM,
/**
* @deprecated Use {@link #EACH_QUORUM}
* @deprecated as of 1.5, use {@link #EACH_QUORUM}
*/
@Deprecated EACH_QUOROM,

View File

@@ -22,7 +22,7 @@ import org.springframework.util.Assert;
*
* @author David Webb
* @author Antoine Toulme
* @deprecated Use the driver's {@link com.datastax.driver.core.ConsistencyLevel}.
* @deprecated as of 1.5, use the driver's {@link com.datastax.driver.core.ConsistencyLevel}.
*/
@Deprecated
public final class ConsistencyLevelResolver {

View File

@@ -72,7 +72,7 @@ public class QueryOptions {
* Returns the {@link ConsistencyLevel}.
*
* @return the consistencyLevel.
* @deprecated Use {@link #setConsistencyLevel(com.datastax.driver.core.ConsistencyLevel)}
* @deprecated as of 1.5, use {@link #setConsistencyLevel(com.datastax.driver.core.ConsistencyLevel)}
*/
@Deprecated
public ConsistencyLevel getConsistencyLevel() {

View File

@@ -21,7 +21,7 @@ package org.springframework.cassandra.core;
*
* @author David Webb
* @author Mark Paluch
* @deprecated Use the driver's {@link com.datastax.driver.core.policies.RetryPolicy}.
* @deprecated as of 1.5, use the driver's {@link com.datastax.driver.core.policies.RetryPolicy}.
*/
@Deprecated
public enum RetryPolicy {

View File

@@ -247,7 +247,7 @@ public interface CassandraOperations extends CqlOperations {
* @param entity The entity to insert
* @return The entity given
* @see #insertAsynchronously(Object, WriteListener)
* @deprecated This method does not allow for query cancellation or notification of completion. Favor
* @deprecated as of 1.2, this method does not allow for query cancellation or notification of completion. Favor
* {@link #insertAsynchronously(Object, WriteListener)}.
*/
@Deprecated
@@ -259,7 +259,7 @@ public interface CassandraOperations extends CqlOperations {
* @param entity The entity to insert
* @return The entity given
* @see #insertAsynchronously(Object, WriteOptions)
* @deprecated This method does not allow for query cancellation or notification of completion. Favor
* @deprecated as of 1.2, this method does not allow for query cancellation or notification of completion. Favor
* {@link #insertAsynchronously(Object, WriteListener, WriteOptions)}.
*/
@Deprecated
@@ -290,7 +290,7 @@ public interface CassandraOperations extends CqlOperations {
* @param entities The entities to insert
* @return The entities given
* @see #insertAsynchronously(List, WriteListener)
* @deprecated This method does not allow for query cancellation or notification of completion. Favor
* @deprecated as of 1.2, this method does not allow for query cancellation or notification of completion. Favor
* {@link #insertAsynchronously(List, WriteListener)}.
*/
@Deprecated
@@ -302,7 +302,7 @@ public interface CassandraOperations extends CqlOperations {
* @param entities The entities to insert
* @return The entities given
* @see #insertAsynchronously(List, WriteListener, WriteOptions)
* @deprecated This method does not allow for query cancellation or notification of completion. Favor
* @deprecated as of 1.2, this method does not allow for query cancellation or notification of completion. Favor
* {@link #insertAsynchronously(List, WriteListener, WriteOptions)}.
*/
@Deprecated
@@ -386,7 +386,7 @@ public interface CassandraOperations extends CqlOperations {
* @param entity The entity to update
* @return The entity given
* @see #updateAsynchronously(Object, WriteListener)
* @deprecated This method does not allow for query cancellation or notification of completion. Favor
* @deprecated as of 1.2, this method does not allow for query cancellation or notification of completion. Favor
* {@link #updateAsynchronously(Object, WriteListener)}.
*/
@Deprecated
@@ -398,7 +398,7 @@ public interface CassandraOperations extends CqlOperations {
* @param entity The entity to update
* @return The entity given
* @see #updateAsynchronously(Object, WriteOptions)
* @deprecated This method does not allow for query cancellation or notification of completion. Favor
* @deprecated as of 1.2, this method does not allow for query cancellation or notification of completion. Favor
* {@link #updateAsynchronously(Object, WriteListener, WriteOptions)}.
*/
@Deprecated
@@ -429,7 +429,7 @@ public interface CassandraOperations extends CqlOperations {
* @param entities The entities to update
* @return The entities given
* @see #updateAsynchronously(List, WriteListener)
* @deprecated This method does not allow for query cancellation or notification of completion. Favor
* @deprecated as of 1.2, this method does not allow for query cancellation or notification of completion. Favor
* {@link #updateAsynchronously(List, WriteListener)}.
*/
@Deprecated
@@ -441,7 +441,7 @@ public interface CassandraOperations extends CqlOperations {
* @param entities The entities to update
* @return The entities given
* @see #updateAsynchronously(List, WriteListener, WriteOptions)
* @deprecated This method does not allow for query cancellation or notification of completion. Favor
* @deprecated as of 1.2, this method does not allow for query cancellation or notification of completion. Favor
* {@link #updateAsynchronously(List, WriteListener, WriteOptions)}.
*/
@Deprecated

View File

@@ -142,7 +142,7 @@ public class CassandraTemplate extends CqlTemplate implements CassandraOperation
}
/**
* @deprecated see {@link #getMappingContext()}.
* @deprecated as of 1.5, see {@link #getMappingContext()}.
*/
@Deprecated
public CassandraMappingContext getCassandraMappingContext() {
@@ -291,7 +291,7 @@ public class CassandraTemplate extends CqlTemplate implements CassandraOperation
}
/**
* @deprecated See {@link #insertAsynchronously(Object, WriteListener)}
* @deprecated as of 1.2, see {@link #insertAsynchronously(Object, WriteListener)}
*/
@Deprecated
@Override
@@ -301,7 +301,7 @@ public class CassandraTemplate extends CqlTemplate implements CassandraOperation
}
/**
* @deprecated See {@link #insertAsynchronously(List, WriteListener, WriteOptions)}
* @deprecated as of 1.2, see {@link #insertAsynchronously(List, WriteListener, WriteOptions)}
*/
@Deprecated
@Override
@@ -330,7 +330,7 @@ public class CassandraTemplate extends CqlTemplate implements CassandraOperation
}
/**
* @deprecated See {@link #insertAsynchronously(List, WriteListener, WriteOptions)}.
* @deprecated as of 1.2, see {@link #insertAsynchronously(List, WriteListener, WriteOptions)}.
*/
@Deprecated
@Override
@@ -340,7 +340,7 @@ public class CassandraTemplate extends CqlTemplate implements CassandraOperation
}
/**
* @deprecated See {@link #insertAsynchronously(List, WriteListener, WriteOptions)}.
* @deprecated as of 1.2, see {@link #insertAsynchronously(List, WriteListener, WriteOptions)}.
*/
@Deprecated
@Override
@@ -1028,7 +1028,7 @@ public class CassandraTemplate extends CqlTemplate implements CassandraOperation
}
/**
* @deprecated Method renamed. Use {@link #createUpdateBatchQuery(String, List, WriteOptions, EntityWriter)}
* @deprecated as of 1.2, method renamed. Use {@link #createUpdateBatchQuery(String, List, WriteOptions, EntityWriter)}
* @see #createUpdateBatchQuery(String, List, WriteOptions, EntityWriter)
*/
@Deprecated
@@ -1039,7 +1039,7 @@ public class CassandraTemplate extends CqlTemplate implements CassandraOperation
}
/**
* @deprecated Method renamed. Use {@link #createUpdateQuery(String, Object, WriteOptions, EntityWriter)}
* @deprecated as of 1.2, method renamed. Use {@link #createUpdateQuery(String, Object, WriteOptions, EntityWriter)}
* @see #createUpdateQuery(String, Object, WriteOptions, EntityWriter)
*/
@Deprecated

View File

@@ -98,13 +98,12 @@ public abstract class AbstractCassandraQuery implements RepositoryQuery {
ResultProcessor resultProcessor = queryMethod.getResultProcessor().withDynamicProjection(parameterAccessor);
CassandraQueryExecution queryExecution = getExecution(query, parameterAccessor,
new ResultProcessingConverter(resultProcessor));
new ResultProcessingConverter(resultProcessor));
CassandraReturnedType returnedType = new CassandraReturnedType(resultProcessor.getReturnedType(),
template.getConverter().getCustomConversions());
template.getConverter().getCustomConversions());
Class<?> resultType = (returnedType.isProjecting() ? returnedType.getDomainType()
: returnedType.getReturnedType());
Class<?> resultType = (returnedType.isProjecting() ? returnedType.getDomainType() : returnedType.getReturnedType());
return queryExecution.execute(query, resultType);
}
@@ -141,7 +140,8 @@ public abstract class AbstractCassandraQuery implements RepositoryQuery {
* @param declaredReturnType
* @param returnedUnwrappedObjectType
* @return
* @deprecated {@link org.springframework.data.cassandra.mapping.CassandraMappingContext} handles type conversion.
* @deprecated as of 1.5, {@link org.springframework.data.cassandra.mapping.CassandraMappingContext} handles type
* conversion.
*/
@Deprecated
public Object getCollectionOfEntity(ResultSet resultSet, Class<?> declaredReturnType,
@@ -170,7 +170,8 @@ public abstract class AbstractCassandraQuery implements RepositoryQuery {
* @param resultSet
* @param type
* @return
* @deprecated {@link org.springframework.data.cassandra.mapping.CassandraMappingContext} handles type conversion.
* @deprecated as of 1.5, {@link org.springframework.data.cassandra.mapping.CassandraMappingContext} handles type
* conversion.
*/
@Deprecated
public Object getSingleEntity(ResultSet resultSet, Class<?> type) {
@@ -183,6 +184,7 @@ public abstract class AbstractCassandraQuery implements RepositoryQuery {
}
private void warnIfMoreResults(ResultSet resultSet) {
if (log.isWarnEnabled() && !resultSet.isExhausted()) {
int count = 0;
@@ -196,11 +198,13 @@ public abstract class AbstractCassandraQuery implements RepositoryQuery {
@Deprecated
protected void warnIfMoreResults(Iterator<Row> iterator) {
if (log.isWarnEnabled() && iterator.hasNext()) {
int count = 0;
for ( ; iterator.hasNext(); iterator.next()) {
while (iterator.hasNext()) {
count++;
iterator.next();
}
log.warn("ignoring extra {} row{}", count, count == 1 ? "" : "s");
@@ -208,14 +212,19 @@ public abstract class AbstractCassandraQuery implements RepositoryQuery {
}
/**
* @deprecated {@link org.springframework.data.cassandra.mapping.CassandraMappingContext} handles type conversion.
* @deprecated as of 1.5, {@link org.springframework.data.cassandra.mapping.CassandraMappingContext} handles type
* conversion.
*/
@Deprecated
public void setConversionService(ConversionService conversionService) {
throw new UnsupportedOperationException("setConversionService(ConversionService) is not supported anymore. "
+ "Please use CassandraMappingContext instead");
+ "Please use CassandraMappingContext instead");
}
/**
* @deprecated as of 1.5, {@link org.springframework.data.cassandra.mapping.CassandraMappingContext} handles type
* conversion.
*/
@Deprecated
public ConversionService getConversionService() {
return template.getConverter().getConversionService();

View File

@@ -33,10 +33,6 @@ public class Comment {
private String text;
/**
* @deprecated Only for use by persistence infrastructure
*/
@Deprecated
protected Comment() {}
public Comment(String author, String company) {

View File

@@ -36,12 +36,6 @@ public class CommentKey implements Serializable {
@PrimaryKeyColumn(ordinal = 1) private String company;
/**
* @deprecated Only for use by persistence infrastructure
*/
@Deprecated
protected CommentKey() {}
public CommentKey(String author, String company) {
setAuthor(author);
setCompany(company);

View File

@@ -95,13 +95,6 @@ public class CassandraTemplateMapIdProxyDelegateIntegrationTests extends Abstrac
@Column String value;
/**
* @deprecated for persistence use only
*/
@Deprecated
@SuppressWarnings("unused")
private SinglePkc() {}
public SinglePkc(String key) {
setKey(key);
}
@@ -173,13 +166,6 @@ public class CassandraTemplateMapIdProxyDelegateIntegrationTests extends Abstrac
@Column String value;
/**
* @deprecated for persistence use only
*/
@Deprecated
@SuppressWarnings("unused")
private MultiPkc() {}
public MultiPkc(String key0, String key1) {
setKey0(key0);
setKey1(key1);

View File

@@ -32,13 +32,6 @@ public class MultiPrimaryKeyColumns {
@Column String value;
/**
* @deprecated for persistence use only
*/
@Deprecated
@SuppressWarnings("unused")
private MultiPrimaryKeyColumns() {}
public MultiPrimaryKeyColumns(String key0, String key1) {
setKey0(key0);
setKey1(key1);

View File

@@ -30,13 +30,6 @@ public class SinglePrimaryKeyColumn {
@Column String value;
/**
* @deprecated for persistence use only
*/
@Deprecated
@SuppressWarnings("unused")
private SinglePrimaryKeyColumn() {}
public SinglePrimaryKeyColumn(String key) {
setKey(key);
}

View File

@@ -89,13 +89,6 @@ public class CassandraTemplateMapIdIntegrationTest extends AbstractKeyspaceCreat
@Column String value;
/**
* @deprecated for persistence use only
*/
@Deprecated
@SuppressWarnings("unused")
private SinglePkc() {}
public SinglePkc(String key) {
setKey(key);
}
@@ -157,13 +150,6 @@ public class CassandraTemplateMapIdIntegrationTest extends AbstractKeyspaceCreat
@Column String value;
/**
* @deprecated for persistence use only
*/
@Deprecated
@SuppressWarnings("unused")
private MultiPkc() {}
public MultiPkc(String key0, String key1) {
setKey0(key0);
setKey1(key1);