- java.lang.Object
-
- org.tentackle.sql.metadata.IndexColumnMetaData
-
- All Implemented Interfaces:
java.lang.Comparable<IndexColumnMetaData>
public class IndexColumnMetaData extends java.lang.Object implements java.lang.Comparable<IndexColumnMetaData>
Meta data for a column of an index.- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description IndexColumnMetaData(IndexMetaData indexMetaData)Creates an index column.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(IndexColumnMetaData o)java.lang.StringgetColumnName()Gets the column columnName.IndexMetaDatagetIndexMetaData()Gets the index.intgetPosition()Gets the ordinal position within the index.booleanisDescending()Returns ascending or descending order.voidsetupIndexColumnFromMetaData(java.sql.ResultSet resultSet)Sets up the index column from the database meta data result.java.lang.StringtoString()voidvalidate()Validates and postprocesses the index column data.
-
-
-
Constructor Detail
-
IndexColumnMetaData
public IndexColumnMetaData(IndexMetaData indexMetaData)
Creates an index column.- Parameters:
indexMetaData- the index column belongs to
-
-
Method Detail
-
setupIndexColumnFromMetaData
public void setupIndexColumnFromMetaData(java.sql.ResultSet resultSet) throws java.sql.SQLExceptionSets up the index column from the database meta data result.- Parameters:
resultSet- the column result set- Throws:
java.sql.SQLException- the processing the result set failed
-
getIndexMetaData
public IndexMetaData getIndexMetaData()
Gets the index.- Returns:
- index column belongs to
-
isDescending
public boolean isDescending()
Returns ascending or descending order.- Returns:
- true if descending
-
getColumnName
public java.lang.String getColumnName()
Gets the column columnName.- Returns:
- the index column's columnName in lowercase
-
getPosition
public int getPosition()
Gets the ordinal position within the index.- Returns:
- the position
-
compareTo
public int compareTo(IndexColumnMetaData o)
- Specified by:
compareToin interfacejava.lang.Comparable<IndexColumnMetaData>
-
validate
public void validate()
Validates and postprocesses the index column data.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-