List toReturn = new ArrayList();
List<String> values = biparam.getParameterValues();
List parameterValuesDescription = new ArrayList();
DataConnection dataConnection = null;
SQLCommand sqlCommand = null;
DataResult dataResult = null;
String statement = null;
SourceBean result = null;
try {
statement = getValidationQuery(profile, biparam, values);
//gets connection
DataSourceUtilities dsUtil = new DataSourceUtilities();
Connection conn = dsUtil.getConnection(profile,dataSource);
dataConnection = dsUtil.getDataConnection(conn);
sqlCommand = dataConnection.createSelectCommand(statement, false);
dataResult = sqlCommand.execute();
ScrollableDataResult scrollableDataResult = (ScrollableDataResult) dataResult.getDataObject();
result = scrollableDataResult.getSourceBean();
} finally {
Utils.releaseResources(dataConnection, sqlCommand, dataResult);
}