Package com.hazelcast.sql
Interface SqlRow
-
public interface SqlRow
SQL row.
-
-
Method Summary
All Methods Instance Methods Abstract Methods 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(java.lang.String columnName)
Gets the value of the column by column name.
-
-
-
Method Detail
-
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:
java.lang.IndexOutOfBoundsException
- if the column index is out of boundsjava.lang.ClassCastException
- if the type of the column type isn't assignable to the typeT
- See Also:
getMetadata()
,SqlColumnMetadata.getType()
-
getObject
<T> T getObject(@Nonnull java.lang.String columnName)
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:
java.lang.NullPointerException
- if column name is nulljava.lang.IllegalArgumentException
- if a column with the given name is not foundjava.lang.ClassCastException
- if the type of the column type isn't assignable to the typeT
- See Also:
getMetadata()
,SqlRowMetadata.findColumn(String)
,SqlColumnMetadata.getName()
,SqlColumnMetadata.getType()
-
getMetadata
@Nonnull SqlRowMetadata getMetadata()
Gets row metadata.- Returns:
- row metadata
- See Also:
SqlRowMetadata
-
-