public class Result extends Object
| Constructor and Description |
|---|
Result(ResultSet resultSet,
Db obtainedFrom) |
| Modifier and Type | Method and Description |
|---|---|
int |
countRows() |
Set<Object> |
getColumnNonNullValues(String columnName) |
Set<Object> |
getColumnValues(String columnName) |
String |
getColumnValuesAsSQLSet(String columnName)
convenient method to return the sql set obtained from the DB connection where this result
was obtained from (cf.
|
List<Map<String,Object>> |
getRowsAsMap()
get a list of maps, where each map represents a row of the result set, where key is the
property name, and value is the value
|
Object |
getSingleRowPropertyValue(String propertyName)
if you know there is one single row in the result, gets the value of a property
|
static List<Map<String,Object>> |
merge(Result r1,
Result r2) |
Set<Object> |
singleColumnValues() |
String |
singleColumnValuesAsSQLSet()
return values of first column suitable for use in SQL IN clause
|
int |
size() |
Object |
vLookUp(String searchProperty,
Object valueToMatchWith,
String targetProperty) |
public List<Map<String,Object>> getRowsAsMap() throws SQLException
SQLExceptionpublic Object getSingleRowPropertyValue(String propertyName) throws MoreThanOneRowPresentException, SQLException
propertyName - SQLExceptionMoreThanOneRowPresentException - if there are more than 1 or less than 1 resultspublic Set<Object> singleColumnValues() throws MoreThanOneColumnPresentException, SQLException
SQLExceptionMoreThanOneColumnPresentExceptionpublic Set<Object> getColumnValues(String columnName) throws SQLException
columnName - SQLExceptionpublic Set<Object> getColumnNonNullValues(String columnName) throws SQLException
columnName - SQLExceptionpublic String getColumnValuesAsSQLSet(String columnName) throws SQLException
Db.toSQLSet(Set) toSQLSet}columnName - SQLExceptionpublic String singleColumnValuesAsSQLSet() throws SQLException, MoreThanOneColumnPresentException
SQLExceptionMoreThanOneColumnPresentExceptionpublic int countRows()
throws SQLException
SQLExceptionpublic Object vLookUp(String searchProperty, Object valueToMatchWith, String targetProperty) throws SQLException
SQLExceptionpublic int size()
throws SQLException
SQLExceptionpublic static List<Map<String,Object>> merge(Result r1, Result r2) throws SQLException
SQLExceptionCopyright © 2021. All rights reserved.