| java.lang.Object org.netbeans.modules.jdbcwizard.builder.IndexColumn
IndexColumn | public class IndexColumn implements Comparable(Code) | | Captures database index metadata associated with a specific database table column.
|
Method Summary | |
public int | compareTo(Object o) Compares this instance against the given object with respect to some "natural" ordering.
Useful for sorting IndexColumn instances for UI display. | public static List | createIndexList(ResultSet rs) Creates a List of IndexColumn instances from the given ResultSet. | public int | getCardinality() Gets index cardinality. | public String | getColumnName() Gets column name. | public String | getIndexName() Gets index name. | public int | getOrdinalPosition() Gets ordinal position of this column within a (composite) index. | public String | getSortOrder() Gets sort order, if any, associated with this index. | public int | getType() Gets index type. | public boolean | isUnique() Indicates whether the index associated with this column is unique. |
IndexColumn | public IndexColumn(String colName, String indexName, short indexType, short colOrder, boolean isUnique, String sortOrder, int indexCardinality)(Code) | | Creates a new instance of IndexColumn using the given values.
Parameters: colName - name of column Parameters: indexName - name of index Parameters: indexType - index type, as defined in DatabaseMetaData; note that tableIndexStatistic isnot a valid type for IndexColumn Parameters: colOrder - sequence of this column within the (composite) index; should be 1 forsingle-column indexes Parameters: isUnique - true if index enforces unique values, false otherwise Parameters: sortOrder - "A" for ascending order, "D" for descending order, null for no defined sortorder Parameters: indexCardinality - count of unique values contained in the index |
compareTo | public int compareTo(Object o)(Code) | | Compares this instance against the given object with respect to some "natural" ordering.
Useful for sorting IndexColumn instances for UI display. Note: this class has a natural
ordering that is inconsistent with equals.
Parameters: o - Object against which this will be compared -1 if this is lesser than o; 0 if this is equal to o; 1 if this is greater than o |
createIndexList | public static List createIndexList(ResultSet rs) throws SQLException(Code) | | Creates a List of IndexColumn instances from the given ResultSet.
Parameters: rs - ResultSet containing index metadata as obtained from DatabaseMetaData List of IndexColumn instances based from metadata in rs' throws: SQLException - if SQL error occurs while reading in data from given ResultSet |
getCardinality | public int getCardinality()(Code) | | Gets index cardinality. It represents the number of unique values associated with the index
(for clustered, hashed, or other index types).
count of unique values in the associated index |
getColumnName | public String getColumnName()(Code) | | Gets column name.
name of column |
getIndexName | public String getIndexName()(Code) | | Gets index name.
index name |
getOrdinalPosition | public int getOrdinalPosition()(Code) | | Gets ordinal position of this column within a (composite) index. For an index associated with
a single column, this should be 1.
ordinal position of column within the composite index; 1 if |
getSortOrder | public String getSortOrder()(Code) | | Gets sort order, if any, associated with this index.
"A" for ascending, "D" for descending, or null if no sort order is defined |
getType | public int getType()(Code) | | Gets index type.
index type, one of DatabaseMetaData.tableIndexClustered,DatabaseMetaData.tableIndexHashed, or DatabaseMetaData.tableIndexOther See Also: java.sql.DatabaseMetaData.tableIndexClustered See Also: java.sql.DatabaseMetaData.tableIndexHashed See Also: java.sql.DatabaseMetaData.tableIndexOther |
isUnique | public boolean isUnique()(Code) | | Indicates whether the index associated with this column is unique.
true if index is unique, false otherwise |
|
|