DATACASS-699 - Polishing.

Javadoc tweaks.
This commit is contained in:
Mark Paluch
2020-01-15 14:14:18 +01:00
parent cce8d54898
commit 9dc4f17260
19 changed files with 43 additions and 43 deletions

View File

@@ -18,9 +18,9 @@ package org.springframework.data.cassandra;
/**
* Strategy interface to produce {@link ReactiveSession} instances.
* <p>
* Spring provides a {@link DefaultReactiveSessionFactory} implementation that just returns the same
* {@link ReactiveSession} instance. Implementations are free to return the same session or route calls to different
* sessions.
* Spring provides a {@link org.springframework.data.cassandra.core.cql.session.DefaultReactiveSessionFactory}
* implementation that just returns the same {@link ReactiveSession} instance. Implementations are free to return the
* same session or route calls to different sessions. DefaultSessionFactory
*
* @author Mark Paluch
* @see 2.0

View File

@@ -45,8 +45,8 @@ import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
/**
* Spring {@link @Configuration} class used to configure a Cassandra client application {@link CqlSession} connected to
* a Cassandra cluster. Enables a Cassandra Keyspace to be specified along with the ability to execute arbitrary CQL on
* Spring {@link Configuration} class used to configure a Cassandra client application {@link CqlSession} connected to a
* Cassandra cluster. Enables a Cassandra Keyspace to be specified along with the ability to execute arbitrary CQL on
* startup as well as shutdown.
*
* @author Matthew T. Adams
@@ -147,7 +147,7 @@ public abstract class AbstractSessionConfiguration implements BeanFactoryAware {
/**
* Returns the list of keyspace creations to be run right after initialization.
*
* @return the list of keyspace creations, may be empty but never {@link null}
* @return the list of keyspace creations, may be empty but never {@code null}.
*/
protected List<CreateKeyspaceSpecification> getKeyspaceCreations() {
return Collections.emptyList();
@@ -156,7 +156,7 @@ public abstract class AbstractSessionConfiguration implements BeanFactoryAware {
/**
* Returns the list of keyspace drops to be run before shutdown.
*
* @return the list of keyspace drops, may be empty but never {@link null}
* @return the list of keyspace drops, may be empty but never {@code null}.
*/
protected List<DropKeyspaceSpecification> getKeyspaceDrops() {
return Collections.emptyList();
@@ -176,7 +176,7 @@ public abstract class AbstractSessionConfiguration implements BeanFactoryAware {
* Returns the list of startup scripts to be run after {@link #getKeyspaceCreations() keyspace creations} and after
* initialization in the {@code system} keyspace.
*
* @return the list of startup scripts, may be empty but never {@link null}
* @return the list of startup scripts, may be empty but never {@code null}.
* @deprecated since 3.0, declare a
* {@link org.springframework.data.cassandra.core.cql.session.init.SessionFactoryInitializer} bean.
*/
@@ -189,7 +189,7 @@ public abstract class AbstractSessionConfiguration implements BeanFactoryAware {
* Returns the list of shutdown scripts to be run after {@link #getKeyspaceDrops() keyspace drops} and right before
* shutdown in the {@code system} keyspace.
*
* @return the list of shutdown scripts, may be empty but never {@link null}
* @return the list of shutdown scripts, may be empty but never {@code null}.
* @deprecated since 3.0, declare a
* {@link org.springframework.data.cassandra.core.cql.session.init.SessionFactoryInitializer} bean.
*/

View File

@@ -19,20 +19,14 @@ package org.springframework.data.cassandra.config;
import org.springframework.data.cassandra.core.cql.CassandraExceptionTranslator;
import org.springframework.data.cassandra.core.cql.CqlTemplate;
/**
* Factory for creating and configuring a Cassandra {@link CqlSession}, which is a thread-safe singleton. As such, it is
* sufficient to have one {@link CqlSession} per application and keyspace.
* Factory for creating and configuring a Cassandra {@link com.datastax.oss.driver.api.core.CqlSession}, which is a
* thread-safe singleton. As such, it is sufficient to have one {@link CqlSession} per application and keyspace.
*
* @author Alex Shvid
* @author Matthew T. Adams
* @author John Blum
* @author Mark Paluch
* @see org.springframework.beans.factory.DisposableBean
* @see org.springframework.beans.factory.FactoryBean
* @see org.springframework.beans.factory.InitializingBean
* @see org.springframework.dao.support.PersistenceExceptionTranslator
* @see CqlTemplate
* @see CassandraExceptionTranslator
* @deprecated since 3.0, use {@link CqlSessionFactoryBean} directly.

View File

@@ -57,10 +57,11 @@ import com.datastax.oss.driver.api.core.session.Session;
* {@link CassandraMappingContext} definition present, then it will be used in the {@link CassandraMappingContext} bean
* definition.
* <p/>
* It requires that a single {@link CqlSession} or {@link CassandraSessionFactoryBean} definition be present. As
* described above, multiple {@link CqlSession} definitions, multiple {@link CassandraSessionFactoryBean} definitions,
* or both a {@link CqlSession} and {@link CassandraSessionFactoryBean} will cause an {@link IllegalStateException} to
* be thrown.
* It requires that a single {@link com.datastax.oss.driver.api.core.CqlSession} or {@link CassandraSessionFactoryBean}
* definition be present. As described above, multiple {@link com.datastax.oss.driver.api.core.CqlSession} definitions,
* multiple {@link CassandraSessionFactoryBean} definitions, or both a
* {@link com.datastax.oss.driver.api.core.CqlSession} and {@link CassandraSessionFactoryBean} will cause an
* {@link IllegalStateException} to be thrown.
*
* @author Matthew T. Adams
* @author Mark Paluch

View File

@@ -16,15 +16,13 @@
package org.springframework.data.cassandra.config;
/**
* Factory to create and configure a Cassandra {@link com.datastax.driver.core.Session} with support for executing CQL
* and initializing the database schema (a.k.a. keyspace).
* Factory to create and configure a Cassandra {@link com.datastax.oss.driver.api.core.CqlSession} with support for
* executing CQL and initializing the database schema (a.k.a. keyspace).
*
* @author Mathew Adams
* @author David Webb
* @author John Blum
* @author Mark Paluch
* @see com.datastax.driver.core.KeyspaceMetadata
* @see com.datastax.driver.core.TableMetadata
* @deprecated since 3.0, use {@link CqlSessionFactoryBean} directly.
*/
@Deprecated

View File

@@ -144,7 +144,7 @@ public class CqlSessionFactoryBean
}
/**
* Set the username to use with {@link com.datastax.driver.core.PlainTextAuthProvider}.
* Set the username to use.
*
* @param username The username to set.
*/
@@ -153,7 +153,7 @@ public class CqlSessionFactoryBean
}
/**
* Set the username to use with {@link com.datastax.driver.core.PlainTextAuthProvider}.
* Set the password to use.
*
* @param password The password to set.
*/
@@ -162,8 +162,8 @@ public class CqlSessionFactoryBean
}
/**
* Sets the name of the Cassandra Keyspace to connect to. Passing {@literal null}, an empty String, or whitespace will
* cause the Cassandra System Keyspace to be used.
* Sets the name of the Cassandra Keyspace to connect to. Passing {@literal null} will cause the Cassandra System
* Keyspace to be used.
*
* @param keyspaceName a String indicating the name of the Keyspace in which to connect.
* @see #getKeyspaceName()
@@ -313,6 +313,7 @@ public class CqlSessionFactoryBean
* {@link SessionFactoryFactoryBean} with
* {@link org.springframework.data.cassandra.core.cql.session.init.KeyspacePopulator} instead.
*/
@Deprecated
public void setStartupScripts(@Nullable List<String> scripts) {
this.startupScripts = (scripts != null ? new ArrayList<>(scripts) : Collections.emptyList());
}

View File

@@ -34,7 +34,7 @@ public class ArgumentPreparedStatementBinder implements PreparedStatementBinder
/**
* Create a new {@link ArgumentPreparedStatementBinder} for the given arguments.
*
* @param args the arguments to set. May be empty or {@link null} if no arguments are provided.
* @param args the arguments to set. May be empty or {@code null} if no arguments are provided.
*/
public ArgumentPreparedStatementBinder(@Nullable Object... args) {
this.args = args;

View File

@@ -143,6 +143,7 @@ public final class CqlIdentifier implements Comparable<CqlIdentifier>, Serializa
* @see #CqlIdentifier(CharSequence, boolean)
* @deprecated since 2.0, use {@link #quoted(CharSequence)}.
*/
@Deprecated
public static CqlIdentifier quotedCqlId(CharSequence identifier) {
return new CqlIdentifier(identifier, true);
}

View File

@@ -62,6 +62,7 @@ public final class KeyspaceIdentifier implements Comparable<KeyspaceIdentifier>
*
* @deprecated since 2.0, use {@link #of(CharSequence)}.
*/
@Deprecated
public static KeyspaceIdentifier ksId(CharSequence identifier) {
return new KeyspaceIdentifier(identifier);
}

View File

@@ -19,10 +19,10 @@ import com.datastax.oss.driver.api.core.DriverException;
import com.datastax.oss.driver.api.core.cql.Row;
/**
* An interface used by {@link CqlTemplate} for processing rows of a {@link com.datastax.driver.core.ResultSet} on a
* per-row basis. Implementations of this interface perform the actual work of processing each row but don't need to
* worry about exception handling. {@link DriverException}s will be caught and handled by the calling
* {@link CqlTemplate}.
* An interface used by {@link CqlTemplate} for processing rows of a
* {@link com.datastax.oss.driver.api.core.cql.ResultSet} on a per-row basis. Implementations of this interface perform
* the actual work of processing each row but don't need to worry about exception handling. {@link DriverException}s
* will be caught and handled by the calling {@link CqlTemplate}.
* <p>
* In contrast to a {@link ResultSetExtractor}, a {@link RowCallbackHandler} object is typically stateful: It keeps the
* result state within the object, to be available for later inspection.

View File

@@ -37,7 +37,9 @@ import org.springframework.data.cassandra.core.cql.keyspace.TableOption;
public class AlterTableCqlGenerator extends TableOptionsCqlGenerator<AlterTableSpecification> {
/**
* Create a new {@literal {@link AlterTableCqlGenerator}. @param specification must not be {@literal null}.
* Create a new {@link AlterTableCqlGenerator}.
*
* @param specification must not be {@literal null}.
*/
public AlterTableCqlGenerator(AlterTableSpecification specification) {
super(specification);

View File

@@ -37,7 +37,7 @@ public class DropUserTypeSpecification extends UserTypeNameSpecification {
* Entry point into the {@link DropUserTypeSpecification}'s fluent API given {@code name} to drop a type. Convenient
* if imported statically.
*
* @param name must not be {@link null} or empty.
* @param name must not be {@code null} or empty.
* @return a new {@link DropUserTypeSpecification}.
*/
public static DropUserTypeSpecification dropType(String name) {
@@ -48,7 +48,7 @@ public class DropUserTypeSpecification extends UserTypeNameSpecification {
* Entry point into the {@link DropUserTypeSpecification}'s fluent API given {@code name} to drop a type. Convenient
* if imported statically.
*
* @param name must not be {@link null} or empty.
* @param name must not be {@code null} or empty.
* @return a new {@link DropUserTypeSpecification}.
*/
public static DropUserTypeSpecification dropType(CqlIdentifier name) {

View File

@@ -47,7 +47,7 @@ import com.datastax.oss.driver.api.core.cql.Statement;
* methods to reactive execution patterns.
* <p>
* Calls are deferred until a subscriber subscribes to the resulting {@link org.reactivestreams.Publisher}. The calls
* are executed by subscribing to {@link ListenableFuture} and returning the result as calls complete.
* are executed by subscribing to {@link CompletionStage} and returning the result as calls complete.
* <p>
* Elements are emitted on netty EventLoop threads. {@link AsyncResultSet} allows {@link AsyncResultSet#fetchNextPage()}
* asynchronous requesting} of subsequent pages. The next page is requested after emitting all elements of the previous

View File

@@ -28,7 +28,7 @@ import com.datastax.oss.driver.api.core.CqlSession;
* @author Mark Paluch
* @since 2.0
* @see #getSession()
* @see Session
* @see CqlSession
*/
public class DefaultSessionFactory implements SessionFactory {

View File

@@ -40,11 +40,11 @@ import com.datastax.oss.driver.internal.querybuilder.CqlHelper;
/**
* Functional builder for Cassandra {@link BuildableQuery statements}. Statements are built by applying
* {@link UnaryOperator builder functions} that get applied when {@link #build() building the actual
* {@link UnaryOperator builder functions} that get applied when {@link #build() building} the actual
* {@link SimpleStatement statement}. The {@code StatmentBuilder} provides a mutable container for statement creation
* allowing a functional declaration of actions that are necessary to build a statement. This class helps building CQL
* statements as a {@link BuildableQuery} classes are typically immutable and require return value tracking across
* methods that want to apply modifications to a statment.
* methods that want to apply modifications to a statement.
* <p>
* Building a statement consists of three phases:
* <ol>

View File

@@ -24,7 +24,7 @@ import com.datastax.oss.driver.api.querybuilder.term.Term;
* may return inline terms to render values as part of the query string, or bind markers to supply parameters on
* statement creation/parameter binding.
* <p>
* A {@ling TermFactory} is typically used with {@link StatementBuilder}.
* A {@link TermFactory} is typically used with {@link StatementBuilder}.
*
* @author Mark Paluch
* @since 3.0

View File

@@ -59,5 +59,6 @@ public @interface Column {
* hence it no longer requires an indication whether the name should be quoted.
* @see com.datastax.oss.driver.api.core.CqlIdentifier#fromInternal(String)
*/
@Deprecated
boolean forceQuote() default false;
}

View File

@@ -37,6 +37,7 @@ public class PropertyMapping {
* hence it no longer requires an indication whether the name should be quoted.
* @see com.datastax.oss.driver.api.core.CqlIdentifier#fromInternal(String)
*/
@Deprecated
private @Nullable String forceQuote;
private String propertyName;

View File

@@ -143,7 +143,7 @@ public class RowMockUtil {
/**
* Create a new {@link Column} to be used with {@link RowMockUtil#newRowMock(Column...)}.
*
* @param name must not be empty or {@link null}.
* @param name must not be empty or {@code null}.
* @param value can be {@literal null}.
* @param type must not be {@literal null}.
* @return