Class CreateIndexSpecification
java.lang.Object
org.springframework.data.cassandra.core.cql.keyspace.IndexNameSpecification<CreateIndexSpecification>
org.springframework.data.cassandra.core.cql.keyspace.CreateIndexSpecification
- All Implemented Interfaces:
IndexDescriptor
public class CreateIndexSpecification
extends IndexNameSpecification<CreateIndexSpecification>
implements IndexDescriptor
Object to configure a
CREATE INDEX specification.- Author:
- Matthew T. Adams, David Webb, Mark Paluch
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumColumn functions to specify indexing behavior. -
Method Summary
Modifier and TypeMethodDescriptioncolumnFunction(CreateIndexSpecification.ColumnFunction columnFunction) columnName(com.datastax.oss.driver.api.core.CqlIdentifier columnName) Sets the column name.columnName(String columnName) Sets the column name.static CreateIndexSpecificationEntry point into theCreateIndexSpecification's fluent API to create a index.static CreateIndexSpecificationcreateIndex(com.datastax.oss.driver.api.core.CqlIdentifier indexName) Entry point into theCreateIndexSpecification's fluent API givenindexNameto create a index.static CreateIndexSpecificationcreateIndex(String indexName) Entry point into theCreateIndexSpecification's fluent API givenindexNameto create a index.entries()Causes the inclusion of anENTRIESclause.full()Causes the inclusion of anFULLclause.com.datastax.oss.driver.api.core.CqlIdentifierbooleancom.datastax.oss.driver.api.core.CqlIdentifierReturns the table name for the indexgetUsing()Causes the inclusion of anIF NOT EXISTSclause.ifNotExists(boolean ifNotExists) Toggles the inclusion of anIF NOT EXISTSclause.booleanisCustom()keys()Causes the inclusion of anKEYSclause.tableName(com.datastax.oss.driver.api.core.CqlIdentifier tableName) Sets the table name.Sets the table name.values()Causes the inclusion of anVALUESclause.withOption(String name, String value) Configure a Index-creation options using key-value pairs.Methods inherited from class org.springframework.data.cassandra.core.cql.keyspace.IndexNameSpecification
getNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.cassandra.core.cql.keyspace.IndexDescriptor
getName
-
Method Details
-
createIndex
Entry point into theCreateIndexSpecification's fluent API to create a index. Convenient if imported statically. -
createIndex
Entry point into theCreateIndexSpecification's fluent API givenindexNameto create a index. Convenient if imported statically.- Parameters:
indexName- must not be null or empty.- Returns:
- a new
CreateIndexSpecification.
-
createIndex
public static CreateIndexSpecification createIndex(com.datastax.oss.driver.api.core.CqlIdentifier indexName) Entry point into theCreateIndexSpecification's fluent API givenindexNameto create a index. Convenient if imported statically.- Parameters:
indexName- must not be null.- Returns:
- a new
CreateIndexSpecification.
-
tableName
Sets the table name.- Parameters:
tableName- must not be null or empty.- Returns:
- this
-
tableName
Sets the table name.- Parameters:
tableName- must not be null.- Returns:
- this
-
getTableName
public com.datastax.oss.driver.api.core.CqlIdentifier getTableName()Description copied from interface:IndexDescriptorReturns the table name for the index- Specified by:
getTableNamein interfaceIndexDescriptor
-
columnName
Sets the column name.- Parameters:
columnName- must not be null or empty.- Returns:
- this
-
columnName
public CreateIndexSpecification columnName(com.datastax.oss.driver.api.core.CqlIdentifier columnName) Sets the column name.- Parameters:
columnName- must not be null.- Returns:
- this
-
getColumnName
public com.datastax.oss.driver.api.core.CqlIdentifier getColumnName()- Specified by:
getColumnNamein interfaceIndexDescriptor
-
ifNotExists
Causes the inclusion of anIF NOT EXISTSclause.- Returns:
- this
-
ifNotExists
Toggles the inclusion of anIF NOT EXISTSclause.- Returns:
- this
-
getIfNotExists
public boolean getIfNotExists() -
isCustom
public boolean isCustom()- Specified by:
isCustomin interfaceIndexDescriptor
-
using
-
getUsing
- Specified by:
getUsingin interfaceIndexDescriptor
-
keys
Causes the inclusion of anKEYSclause.- Returns:
- this
- Since:
- 2.0
-
values
Causes the inclusion of anVALUESclause.- Returns:
- this
- Since:
- 2.0
-
entries
Causes the inclusion of anENTRIESclause.- Returns:
- this
- Since:
- 2.0
-
full
Causes the inclusion of anFULLclause.- Returns:
- this
- Since:
- 2.0
-
columnFunction
public CreateIndexSpecification columnFunction(CreateIndexSpecification.ColumnFunction columnFunction) - Parameters:
columnFunction- column function to apply, must not be null.- Returns:
- this
- Since:
- 2.0
-
getColumnFunction
-
withOption
Configure a Index-creation options using key-value pairs.- Parameters:
name- option name.value- option value.- Returns:
- this
- Since:
- 2.0
-
getOptions
- Returns:
- index options map.
-