updated/added javadocs

This commit is contained in:
Matthew Adams
2013-12-12 11:30:25 -06:00
parent 4a1b5fa543
commit 9811cadb56
4 changed files with 21 additions and 6 deletions

View File

@@ -18,6 +18,11 @@ package org.springframework.cassandra.core.keyspace;
import static org.springframework.cassandra.core.cql.CqlStringUtils.checkIdentifier;
import static org.springframework.cassandra.core.cql.CqlStringUtils.identifize;
/**
* Base class for column change specifications.
*
* @author Matthew T. Adams
*/
public abstract class ColumnChangeSpecification {
private String name;

View File

@@ -28,11 +28,11 @@ import org.springframework.cassandra.core.Ordering;
import com.datastax.driver.core.DataType;
/**
* Builder class to help construct CQL statements that involve column manipulation. Not threadsafe.
* Builder class to specify columns.
* <p/>
* Use {@link #name(String)} and {@link #type(String)} to set the name and type of the column, respectively. To specify
* a <code>PRIMARY KEY</code> column, use {@link #clustered()} or {@link #clustered(Ordering)}. To specify that the
* <code>PRIMARY KEY</code> column is or is part of the partition key, use {@link #partitioned()} instead of
* a clustered <code>PRIMARY KEY</code> column, use {@link #clustered()} or {@link #clustered(Ordering)}. To specify
* that the <code>PRIMARY KEY</code> column is or is part of the partition key, use {@link #partitioned()} instead of
* {@link #clustered()} or {@link #clustered(Ordering)}.
*
* @author Matthew T. Adams
@@ -105,7 +105,7 @@ public class ColumnSpecification {
}
/**
* Identifies this column as a primary key column with the given ordering. Sets the column's {@link #keyType} to
* Identifies this column as a clustered key column with the given ordering. Sets the column's {@link #keyType} to
* {@link PrimaryKeyType#CLUSTERED} and its {@link #ordering} to the given {@link Ordering}.
*
* @return this
@@ -115,8 +115,8 @@ public class ColumnSpecification {
}
/**
* Toggles the identification of this column as a primary key column. If the given boolean is <code>true</code>, then
* sets the column's {@link #keyType} to {@link PrimaryKeyType#PARTITIONED} and {@link #ordering} to the given
* Toggles the identification of this column as a clustered key column. If the given boolean is <code>true</code>,
* then sets the column's {@link #keyType} to {@link PrimaryKeyType#PARTITIONED} and {@link #ordering} to the given
* {@link Ordering} , else sets both {@link #keyType} and {@link #ordering} to <code>null</code>.
*
* @return this

View File

@@ -19,6 +19,11 @@ import org.springframework.util.Assert;
import com.datastax.driver.core.DataType;
/**
* Base class for column changes that include {@link DataType} information.
*
* @author Matthew T. Adams
*/
public abstract class ColumnTypeChangeSpecification extends ColumnChangeSpecification {
private DataType type;

View File

@@ -15,6 +15,11 @@
*/
package org.springframework.cassandra.core.keyspace;
/**
* A specification to drop a column.
*
* @author Matthew T. Adams
*/
public class DropColumnSpecification extends ColumnChangeSpecification {
public DropColumnSpecification(String name) {