Package mil.nga.geopackage.db
Class ResultSetResult
- java.lang.Object
-
- mil.nga.geopackage.db.ResultSetResult
-
- All Implemented Interfaces:
Result
- Direct Known Subclasses:
UserResultSet
public class ResultSetResult extends Object implements Result
Result Set result implementation. The column index of the GeoPackage core is 0 indexed based and ResultSets are 1 indexed based.- Since:
- 3.1.0
- Author:
- osbornb
-
-
Constructor Summary
Constructors Constructor Description ResultSetResult(ResultSet resultSet)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()byte[]getBlob(int columnIndex)intgetColumnCount()intgetColumnIndex(String columnName)doublegetDouble(int columnIndex)floatgetFloat(int columnIndex)intgetInt(int columnIndex)longgetLong(int columnIndex)intgetPosition()ResultSetgetResultSet()Get the Result SetshortgetShort(int columnIndex)StringgetString(int columnIndex)intgetType(int columnIndex)ObjectgetValue(int index)ObjectgetValue(int index, GeoPackageDataType dataType)booleanmoveToFirst()booleanmoveToNext()booleanmoveToPosition(int position)protected intresultIndexToResultSetIndex(int resultIndex)Get the ResultSet index for the provided core Result indexprotected intresultSetIndexToResultIndex(int resultSetIndex)Get the core Result index for the provided ResultSet indexstatic intresultSetTypeToSqlLite(int columnType)Get the SQLite type from the ResultSetMetaData column typebooleanwasNull()
-
-
-
Field Detail
-
resultSet
protected ResultSet resultSet
Result Set
-
-
Constructor Detail
-
ResultSetResult
public ResultSetResult(ResultSet resultSet)
Constructor- Parameters:
resultSet- result set
-
-
Method Detail
-
getResultSet
public ResultSet getResultSet()
Get the Result Set- Returns:
- result set
-
getValue
public Object getValue(int index, GeoPackageDataType dataType)
-
moveToNext
public boolean moveToNext()
- Specified by:
moveToNextin interfaceResult
-
moveToFirst
public boolean moveToFirst()
- Specified by:
moveToFirstin interfaceResult
-
getPosition
public int getPosition()
- Specified by:
getPositionin interfaceResult
-
moveToPosition
public boolean moveToPosition(int position)
- Specified by:
moveToPositionin interfaceResult
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCountin interfaceResult
-
getColumnIndex
public int getColumnIndex(String columnName)
- Specified by:
getColumnIndexin interfaceResult
-
resultIndexToResultSetIndex
protected int resultIndexToResultSetIndex(int resultIndex)
Get the ResultSet index for the provided core Result index- Parameters:
resultIndex- result index- Returns:
- result set index
-
resultSetIndexToResultIndex
protected int resultSetIndexToResultIndex(int resultSetIndex)
Get the core Result index for the provided ResultSet index- Parameters:
resultSetIndex- result set index- Returns:
- result index
-
resultSetTypeToSqlLite
public static int resultSetTypeToSqlLite(int columnType)
Get the SQLite type from the ResultSetMetaData column type- Parameters:
columnType- column type- Returns:
- SQLite type
-
-