public class TableMetadata extends AbstractTableMetadata
cassandraVersion, clusteringColumns, clusteringOrder, columns, id, keyspace, name, options, partitionKey
Modifier and Type | Method and Description |
---|---|
protected String |
asCQLQuery(boolean formatted) |
boolean |
equals(Object other) |
String |
exportAsString()
Returns a
String containing CQL queries representing this
table and the index on it. |
IndexMetadata |
getIndex(String name)
Returns metadata on a index of this table.
|
Collection<IndexMetadata> |
getIndexes()
Returns all indexes based on this table.
|
MaterializedViewMetadata |
getView(String name)
Returns metadata on a view of this table.
|
Collection<MaterializedViewMetadata> |
getViews()
Returns all views based on this table.
|
int |
hashCode() |
appendOptions, asCQLQuery, getClusteringColumns, getClusteringOrder, getColumn, getColumns, getId, getKeyspace, getName, getOptions, getPartitionKey, getPrimaryKey, toString
public IndexMetadata getIndex(String name)
name
- the name of the index to retrieve (name
will be
interpreted as a case-insensitive identifier unless enclosed in double-quotes,
see Metadata.quote(java.lang.String)
).name
index if it exists, or
null
otherwise.public Collection<IndexMetadata> getIndexes()
public MaterializedViewMetadata getView(String name)
name
- the name of the view to retrieve (name
will be
interpreted as a case-insensitive identifier unless enclosed in double-quotes,
see Metadata.quote(java.lang.String)
).name
view if it exists, or
null
otherwise.public Collection<MaterializedViewMetadata> getViews()
public String exportAsString()
String
containing CQL queries representing this
table and the index on it.
In other words, this method returns the queries that would allow you to
recreate the schema of this table, along with the indexes and views defined on
this table, if any.
Note that the returned String is formatted to be human readable (for
some definition of human readable at least).exportAsString
in class AbstractTableMetadata
protected String asCQLQuery(boolean formatted)
asCQLQuery
in class AbstractTableMetadata