public class TableSpecification<T> extends TableOptionsSpecification<TableSpecification<T>> implements TableDescriptor
TableDescriptor, independent of CreateTableSpecification.| Modifier | Constructor and Description |
|---|---|
protected |
TableSpecification(CqlIdentifier name) |
| Modifier and Type | Method and Description |
|---|---|
T |
clusteredKeyColumn(CqlIdentifier name,
com.datastax.driver.core.DataType type)
Adds the given primary key column to the table with ascending ordering.
|
T |
clusteredKeyColumn(CqlIdentifier name,
com.datastax.driver.core.DataType type,
Optional<Ordering> ordering)
Adds the given primary key column to the table with ascending ordering.
|
T |
clusteredKeyColumn(CqlIdentifier name,
com.datastax.driver.core.DataType type,
Ordering ordering)
Adds the given primary key column to the table with ascending ordering.
|
T |
clusteredKeyColumn(String name,
com.datastax.driver.core.DataType type)
Adds the given primary key column to the table with ascending ordering.
|
T |
clusteredKeyColumn(String name,
com.datastax.driver.core.DataType type,
Ordering ordering)
Adds the given primary key column to the table with ascending ordering.
|
T |
column(CqlIdentifier name,
com.datastax.driver.core.DataType type)
Adds the given non-key column to the table.
|
protected T |
column(CqlIdentifier name,
com.datastax.driver.core.DataType type,
Optional<PrimaryKeyType> optionalKeyType,
Optional<Ordering> optionalOrdering) |
T |
column(String name,
com.datastax.driver.core.DataType type)
Adds the given non-key column to the table.
|
protected T |
column(String name,
com.datastax.driver.core.DataType type,
PrimaryKeyType keyType)
Adds the given info as a new column to the table.
|
protected T |
column(String name,
com.datastax.driver.core.DataType type,
PrimaryKeyType keyType,
Optional<Ordering> ordering)
Adds the given info as a new column to the table.
|
protected T |
column(String name,
com.datastax.driver.core.DataType type,
PrimaryKeyType keyType,
Ordering ordering)
Adds the given info as a new column to the table.
|
List<ColumnSpecification> |
getClusteredKeyColumns()
Returns an unmodifiable list of all primary key columns that are not also partition key columns.
|
List<ColumnSpecification> |
getColumns()
Returns an unmodifiable list of all columns.
|
List<ColumnSpecification> |
getNonKeyColumns()
Returns an unmodifiable list of all non-key columns.
|
List<ColumnSpecification> |
getPartitionKeyColumns()
Returns an unmodifiable list of all partition key columns.
|
List<ColumnSpecification> |
getPrimaryKeyColumns()
Returns an unmodifiable list of all primary key columns that are not also partition key columns.
|
T |
partitionKeyColumn(CqlIdentifier name,
com.datastax.driver.core.DataType type)
Adds the given partition key column to the table.
|
T |
partitionKeyColumn(String name,
com.datastax.driver.core.DataType type)
Adds the given partition key column to the table.
|
getOptions, with, with, withgetNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getOptionsprotected TableSpecification(CqlIdentifier name)
public T column(String name, com.datastax.driver.core.DataType type)
name - The column name; must be a valid unquoted or quoted identifier without the surrounding double quotes,
must not be null.type - The data type of the column, must not be null.public T column(CqlIdentifier name, com.datastax.driver.core.DataType type)
name - The column name; must be a valid unquoted or quoted identifier without the surrounding double quotes,
must not be null.type - The data type of the column, must not be null.public T partitionKeyColumn(String name, com.datastax.driver.core.DataType type)
name - The column name; must be a valid unquoted or quoted identifier without the surrounding double quotes,
must not be null.type - The data type of the column, must not be null.public T partitionKeyColumn(CqlIdentifier name, com.datastax.driver.core.DataType type)
name - The column name; must be a valid unquoted or quoted identifier without the surrounding double quotes,
must not be null.type - The data type of the column, must not be null.public T clusteredKeyColumn(String name, com.datastax.driver.core.DataType type)
name - The column name; must be a valid unquoted or quoted identifier without the surrounding double quotes,
must not be null.type - The data type of the column, must not be null.public T clusteredKeyColumn(String name, com.datastax.driver.core.DataType type, Ordering ordering)
name - The column name; must be a valid unquoted or quoted identifier without the surrounding double quotes,
must not be null.type - The data type of the column, must not be null.ordering - The data type of the column, must not be null.public T clusteredKeyColumn(CqlIdentifier name, com.datastax.driver.core.DataType type)
name - The column name; must be a valid unquoted or quoted identifier without the surrounding double quotes,
must not be null.type - The data type of the column, must not be null.public T clusteredKeyColumn(CqlIdentifier name, com.datastax.driver.core.DataType type, Ordering ordering)
name - The column name; must be a valid unquoted or quoted identifier without the surrounding double quotes,
must not be null.type - The data type of the column, must not be null.ordering - The data type of the column, must not be null.public T clusteredKeyColumn(CqlIdentifier name, com.datastax.driver.core.DataType type, Optional<Ordering> ordering)
name - The column name; must be a valid unquoted or quoted identifier without the surrounding double quotes,
must not be null.type - The data type of the column, must not be null.ordering - The data type of the column, must not be null.protected T column(String name, com.datastax.driver.core.DataType type, PrimaryKeyType keyType)
name - The column name; must be a valid unquoted or quoted identifier without the surrounding double quotes,
must not be null.type - The data type of the column, must not be null.keyType - Indicates key type. Null means that the column is not a key column, must not be null.protected T column(String name, com.datastax.driver.core.DataType type, PrimaryKeyType keyType, Ordering ordering)
name - The column name; must be a valid unquoted or quoted identifier without the surrounding double quotes,
must not be null.type - The data type of the column, must not be null.keyType - Indicates key type, must not be null.ordering - If the given PrimaryKeyType is PrimaryKeyType.CLUSTERED, then the given ordering is
used, else ignored, must not be null.protected T column(String name, com.datastax.driver.core.DataType type, PrimaryKeyType keyType, Optional<Ordering> ordering)
name - The column name; must be a valid unquoted or quoted identifier without the surrounding double quotes,
must not be null.type - The data type of the column, must not be null.keyType - Indicates key type, must not be null.ordering - If the given PrimaryKeyType is PrimaryKeyType.CLUSTERED, then the given ordering is
used, else ignored, must not be null.protected T column(CqlIdentifier name, com.datastax.driver.core.DataType type, Optional<PrimaryKeyType> optionalKeyType, Optional<Ordering> optionalOrdering)
public List<ColumnSpecification> getColumns()
getColumns in interface TableDescriptorpublic List<ColumnSpecification> getPartitionKeyColumns()
getPartitionKeyColumns in interface TableDescriptorpublic List<ColumnSpecification> getClusteredKeyColumns()
getClusteredKeyColumns in interface TableDescriptorpublic List<ColumnSpecification> getPrimaryKeyColumns()
getPrimaryKeyColumns in interface TableDescriptorpublic List<ColumnSpecification> getNonKeyColumns()
getNonKeyColumns in interface TableDescriptorCopyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.