Package com.hazelcast.sql
Interface SqlRow
public interface SqlRow
SQL row.
-
Method Summary
Modifier and Type Method Description SqlRowMetadata
getMetadata()
Gets row metadata.<T> T
getObject(int columnIndex)
Gets the value of the column by index.<T> T
getObject(String columnName)
Gets the value of the column by column name.
-
Method Details
-
getObject
<T> T getObject(int columnIndex)Gets the value of the column by index.The class of the returned value depends on the SQL type of the column. No implicit conversions are performed on the value.
- Parameters:
columnIndex
- column index, zero-based.- Returns:
- value of the column
- Throws:
IndexOutOfBoundsException
- if the column index is out of boundsClassCastException
- if the type of the column type isn't assignable to the typeT
- See Also:
getMetadata()
,SqlColumnMetadata.getType()
-
getObject
Gets the value of the column by column name.Column name should be one of those defined in
SqlRowMetadata
, case-sensitive. You may also useSqlRowMetadata.findColumn(String)
to test for column existence.The class of the returned value depends on the SQL type of the column. No implicit conversions are performed on the value.
- Parameters:
columnName
- column name- Returns:
- value of the column
- Throws:
NullPointerException
- if column name is nullIllegalArgumentException
- if a column with the given name is not foundClassCastException
- if the type of the column type isn't assignable to the typeT
- See Also:
getMetadata()
,SqlRowMetadata.findColumn(String)
,SqlColumnMetadata.getName()
,SqlColumnMetadata.getType()
-
getMetadata
Gets row metadata.- Returns:
- row metadata
- See Also:
SqlRowMetadata
-