Package com.hazelcast.sql
Interface SqlRow
public interface SqlRow
SQL row.
-
Method Summary
Modifier and TypeMethodDescriptionGets row metadata.<T> T
getObject
(int columnIndex) Gets the value of the column by index.<T> T
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:
-
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
Gets row metadata.- Returns:
- row metadata
- See Also:
-