Module spring.data.cassandra
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 enum
Column 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 CreateIndexSpecification
Entry point into theCreateIndexSpecification
's fluent API to create a index.static CreateIndexSpecification
createIndex
(com.datastax.oss.driver.api.core.CqlIdentifier indexName) Entry point into theCreateIndexSpecification
's fluent API givenindexName
to create a index.static CreateIndexSpecification
createIndex
(String indexName) Entry point into theCreateIndexSpecification
's fluent API givenindexName
to create a index.entries()
Causes the inclusion of anENTRIES
clause.full()
Causes the inclusion of anFULL
clause.com.datastax.oss.driver.api.core.CqlIdentifier
boolean
com.datastax.oss.driver.api.core.CqlIdentifier
Returns the table name for the indexgetUsing()
Causes the inclusion of anIF NOT EXISTS
clause.ifNotExists
(boolean ifNotExists) Toggles the inclusion of anIF NOT EXISTS
clause.boolean
isCustom()
keys()
Causes the inclusion of anKEYS
clause.tableName
(com.datastax.oss.driver.api.core.CqlIdentifier tableName) Sets the table name.Sets the table name.values()
Causes the inclusion of anVALUES
clause.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
getName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 givenindexName
to 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 givenindexName
to 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:IndexDescriptor
Returns the table name for the index- Specified by:
getTableName
in 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:
getColumnName
in interfaceIndexDescriptor
-
ifNotExists
Causes the inclusion of anIF NOT EXISTS
clause.- Returns:
- this
-
ifNotExists
Toggles the inclusion of anIF NOT EXISTS
clause.- Returns:
- this
-
getIfNotExists
public boolean getIfNotExists() -
isCustom
public boolean isCustom()- Specified by:
isCustom
in interfaceIndexDescriptor
-
using
-
getUsing
- Specified by:
getUsing
in interfaceIndexDescriptor
-
keys
Causes the inclusion of anKEYS
clause.- Returns:
- this
- Since:
- 2.0
-
values
Causes the inclusion of anVALUES
clause.- Returns:
- this
- Since:
- 2.0
-
entries
Causes the inclusion of anENTRIES
clause.- Returns:
- this
- Since:
- 2.0
-
full
Causes the inclusion of anFULL
clause.- 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.
-