if (arguments.length > 0) {
// need to do the (Object) cast to force args to be a single object
logger.trace("query arguments: {}", (Object) arguments);
}
DatabaseConnection connection = connectionSource.getReadOnlyConnection();
CompiledStatement compiledStatement = null;
try {
compiledStatement = connection.compileStatement(query, StatementType.SELECT, noFieldTypes);
assignStatementArguments(compiledStatement, arguments);
String[] columnNames = extractColumnNames(compiledStatement);
RawResultsImpl<UO> rawResults =
new RawResultsImpl<UO>(connectionSource, connection, query, String[].class, compiledStatement,
columnNames, new UserObjectRowMapper<UO>(rowMapper, columnNames, this));
compiledStatement = null;
connection = null;
return rawResults;
} finally {
if (compiledStatement != null) {
compiledStatement.close();
}
if (connection != null) {
connectionSource.releaseConnection(connection);
}
}