Package com.hazelcast.sql
Class SqlRowMetadata
java.lang.Object
com.hazelcast.sql.SqlRowMetadata
public final class SqlRowMetadata extends Object
SQL row metadata.
-
Field Summary
Fields Modifier and Type Field Description static int
COLUMN_NOT_FOUND
Constant indicating that the column is not found. -
Constructor Summary
Constructors Constructor Description SqlRowMetadata(List<SqlColumnMetadata> columns)
-
Method Summary
Modifier and Type Method Description boolean
equals(Object o)
int
findColumn(String columnName)
Find index of the column with the given name.SqlColumnMetadata
getColumn(int index)
Gets column metadata.int
getColumnCount()
Gets the number of columns in the row.List<SqlColumnMetadata>
getColumns()
Gets columns metadata.int
hashCode()
String
toString()
-
Field Details
-
COLUMN_NOT_FOUND
public static final int COLUMN_NOT_FOUNDConstant indicating that the column is not found.- See Also:
- Constant Field Values
-
-
Constructor Details
-
SqlRowMetadata
-
-
Method Details
-
getColumnCount
public int getColumnCount()Gets the number of columns in the row.- Returns:
- the number of columns in the row
-
getColumn
Gets column metadata.- Parameters:
index
- column index, zero-based- Returns:
- column metadata
- Throws:
IndexOutOfBoundsException
- If the column index is out of bounds
-
getColumns
Gets columns metadata.- Returns:
- columns metadata
-
findColumn
Find index of the column with the given name. Returned index can be used to get column value fromSqlRow
.- Parameters:
columnName
- column name (case sensitive)- Returns:
- column index or
COLUMN_NOT_FOUND
if a column with the given name is not found - Throws:
NullPointerException
- if column name is null- See Also:
SqlRow
-
equals
-
hashCode
public int hashCode() -
toString
-