Package org.apache.cassandra.schema
Class IndexMetadata
java.lang.Object
org.apache.cassandra.schema.IndexMetadata
An immutable representation of secondary index metadata.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal UUIDfinal IndexMetadata.Kindfinal Stringstatic final IndexMetadata.Serializer -
Method Summary
Modifier and TypeMethodDescriptionvoidappendCqlTo(CqlBuilder builder, TableMetadata table, boolean ifNotExists) Appends to the specified builder the CQL used to create this index.booleanbooleanequalsWithoutName(IndexMetadata other) static IndexMetadatafromIndexTargets(List<IndexTarget> targets, String name, IndexMetadata.Kind kind, Map<String, String> options) static IndexMetadatafromSchemaMetadata(String name, IndexMetadata.Kind kind, Map<String, String> options) static StringgenerateDefaultIndexName(String table) static StringgenerateDefaultIndexName(String table, ColumnIdentifier column) inthashCode()booleanbooleanisCustom()booleanisKeys()toCqlString(TableMetadata table, boolean ifNotExists) toString()voidvalidate(TableMetadata table)
-
Field Details
-
serializer
-
id
-
name
-
kind
-
options
-
-
Method Details
-
fromSchemaMetadata
public static IndexMetadata fromSchemaMetadata(String name, IndexMetadata.Kind kind, Map<String, String> options) -
fromIndexTargets
public static IndexMetadata fromIndexTargets(List<IndexTarget> targets, String name, IndexMetadata.Kind kind, Map<String, String> options) -
generateDefaultIndexName
-
generateDefaultIndexName
-
validate
-
getIndexClassName
-
isCustom
public boolean isCustom() -
isKeys
public boolean isKeys() -
isComposites
public boolean isComposites() -
hashCode
public int hashCode() -
equalsWithoutName
-
equals
-
toString
-
toCqlString
-
appendCqlTo
Appends to the specified builder the CQL used to create this index.- Parameters:
builder- the builder to which the CQL myst be appendedtable- the parent tableifNotExists- includes "IF NOT EXISTS" into statement
-