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 void
close()
byte[]
getBlob(int columnIndex)
int
getColumnCount()
int
getColumnIndex(String columnName)
double
getDouble(int columnIndex)
float
getFloat(int columnIndex)
int
getInt(int columnIndex)
long
getLong(int columnIndex)
int
getPosition()
ResultSet
getResultSet()
Get the Result Setshort
getShort(int columnIndex)
String
getString(int columnIndex)
int
getType(int columnIndex)
Object
getValue(int index)
Object
getValue(int index, GeoPackageDataType dataType)
boolean
moveToFirst()
boolean
moveToNext()
boolean
moveToPosition(int position)
protected int
resultIndexToResultSetIndex(int resultIndex)
Get the ResultSet index for the provided core Result indexprotected int
resultSetIndexToResultIndex(int resultSetIndex)
Get the core Result index for the provided ResultSet indexstatic int
resultSetTypeToSqlLite(int columnType)
Get the SQLite type from the ResultSetMetaData column typeboolean
wasNull()
-
-
-
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:
moveToNext
in interfaceResult
-
moveToFirst
public boolean moveToFirst()
- Specified by:
moveToFirst
in interfaceResult
-
getPosition
public int getPosition()
- Specified by:
getPosition
in interfaceResult
-
moveToPosition
public boolean moveToPosition(int position)
- Specified by:
moveToPosition
in interfaceResult
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfaceResult
-
getColumnIndex
public int getColumnIndex(String columnName)
- Specified by:
getColumnIndex
in 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
-
-