Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
*/
package com.datastax.driver.core;

import java.util.*;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

/**
* Describes a Column.
Expand All @@ -42,10 +44,6 @@ public class ColumnMetadata {
private final DataType type;
private final boolean isStatic;

// this is the "reverse" side of the many-to-many relationship
// between columns and indexes, and is updated only after the column is created
final Map<String, IndexMetadata> indexes = new LinkedHashMap<String, IndexMetadata>();

private ColumnMetadata(TableOrView parent, String name, DataType type, boolean isStatic) {
this.parent = parent;
this.name = name;
Expand Down Expand Up @@ -98,28 +96,6 @@ public boolean isStatic() {
return isStatic;
}

/**
* Returns metadata on a index on this column.
*
* @param name the name of the index to retrieve ({@code name} will be
* interpreted as a case-insensitive identifier unless enclosed in double-quotes,
* see {@link Metadata#quote}).
* @return the metadata for the {@code name} index if it exists, or
* {@code null} otherwise.
*/
public IndexMetadata getIndex(String name) {
return indexes.get(Metadata.handleId(name));
}

/**
* Returns a list containing all the indexes on this column.
*
* @return a list containing the metadata for the indexes on this column.
*/
public List<IndexMetadata> getIndexes() {
return new ArrayList<IndexMetadata>(indexes.values());
}

@Override
public String toString() {
String str = Metadata.escapeId(name) + ' ' + type;
Expand Down
Loading