public class ResultUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
FIELD_TYPE_BLOB
Blob field type
|
static int |
FIELD_TYPE_FLOAT
Float field type
|
static int |
FIELD_TYPE_INTEGER
Integer field type
|
static int |
FIELD_TYPE_NULL
Null field type
|
static int |
FIELD_TYPE_STRING
String field type
|
| Constructor and Description |
|---|
ResultUtils() |
| Modifier and Type | Method and Description |
|---|---|
static List<List<Object>> |
buildResults(Result result,
GeoPackageDataType[] dataTypes,
Integer limit)
Build the result rows from the result and the optional limit
|
static List<Object> |
buildSingleColumnResults(Result result,
int column,
GeoPackageDataType dataType,
Integer limit)
Build single column result rows from the result and the optional limit
|
static Object |
buildSingleResult(Result result,
int column,
GeoPackageDataType dataType)
Build single result value from the column
|
static Object |
getFloatValue(Result result,
int index,
GeoPackageDataType dataType)
Get the float value from the cursor of the column
|
static Object |
getIntegerValue(Result result,
int index,
GeoPackageDataType dataType)
Get the integer value from the cursor of the column
|
static Object |
getValue(Object value,
GeoPackageDataType dataType)
Get the converted value from the value and data type
|
static Object |
getValue(Result result,
int index)
Get the value from the result from the provided column
Assumes
Result.getType(int) returns one of:
FIELD_TYPE_INTEGER, FIELD_TYPE_FLOAT,
FIELD_TYPE_STRING, FIELD_TYPE_BLOB, or
FIELD_TYPE_NULL |
static Object |
getValue(Result result,
int index,
GeoPackageDataType dataType)
Get the value from the result from the provided column
Assumes
Result.getType(int) returns one of:
FIELD_TYPE_INTEGER, FIELD_TYPE_FLOAT,
FIELD_TYPE_STRING, FIELD_TYPE_BLOB, or
FIELD_TYPE_NULL |
static Object |
getValue(Result result,
int index,
int type)
Get the value from the cursor from the provided column
|
static Object |
getValue(Result result,
int index,
int type,
GeoPackageDataType dataType)
Get the value from the cursor from the provided column
|
public static final int FIELD_TYPE_INTEGER
public static final int FIELD_TYPE_FLOAT
public static final int FIELD_TYPE_STRING
public static final int FIELD_TYPE_BLOB
public static final int FIELD_TYPE_NULL
public static Object getValue(Result result, int index)
Result.getType(int) returns one of:
FIELD_TYPE_INTEGER, FIELD_TYPE_FLOAT,
FIELD_TYPE_STRING, FIELD_TYPE_BLOB, or
FIELD_TYPE_NULLresult - resultindex - indexpublic static Object getValue(Result result, int index, GeoPackageDataType dataType)
Result.getType(int) returns one of:
FIELD_TYPE_INTEGER, FIELD_TYPE_FLOAT,
FIELD_TYPE_STRING, FIELD_TYPE_BLOB, or
FIELD_TYPE_NULLresult - resultindex - indexdataType - data typepublic static Object getValue(Result result, int index, int type)
result - resultindex - indextype - column type: FIELD_TYPE_INTEGER,
FIELD_TYPE_FLOAT, FIELD_TYPE_STRING,
FIELD_TYPE_BLOB, or FIELD_TYPE_NULLpublic static Object getValue(Result result, int index, int type, GeoPackageDataType dataType)
result - resultindex - indextype - column type: FIELD_TYPE_INTEGER,
FIELD_TYPE_FLOAT, FIELD_TYPE_STRING,
FIELD_TYPE_BLOB, or FIELD_TYPE_NULLdataType - data typepublic static Object getIntegerValue(Result result, int index, GeoPackageDataType dataType)
result - resultindex - indexdataType - data typepublic static Object getFloatValue(Result result, int index, GeoPackageDataType dataType)
result - resultindex - indexdataType - data typepublic static Object getValue(Object value, GeoPackageDataType dataType)
value - object valuedataType - data typepublic static Object buildSingleResult(Result result, int column, GeoPackageDataType dataType)
result - resultcolumn - column indexdataType - GeoPackage data typepublic static List<Object> buildSingleColumnResults(Result result, int column, GeoPackageDataType dataType, Integer limit)
result - resultcolumn - column indexdataType - GeoPackage data typelimit - result row limitCopyright © 2019 National Geospatial-Intelligence Agency. All rights reserved.