com.googlecode.jpattern.orm.query
Interface ICustomQuery

All Known Subinterfaces:
IOrmCustomQuery, ISqlQuery
All Known Implementing Classes:
OrmCustomQuery, SqlQuery

public interface ICustomQuery

Author:
Francesco Cina 09/lug/2011

Method Summary
<T> T
find(IResultSetReader<T> rse)
          Execute the query reading the ResultSet with a IResultSetReader.
 BigDecimal findBigDecimal()
          Execute the query and read the result as a BigDecimal value
 boolean findBoolean()
          Execute the query and read the result as a boolean value
 double findDouble()
          Execute the query and read the result as a double value
 float findFloat()
          Execute the query and read the result as a float value
 int findInt()
          Execute the query and read the result as an int value
 List<Object[]> findList()
          Execute the query and read the result creating a List of all the ordered arrays with the extracted column values for every row.
 long findLong()
          Execute the query and read the result as an long value
 String findString()
          Execute the wuery and read the result as a String value
 Object[] findUnique()
          Execute the query and read the result creating an ordered array with the extracted column values or null (if no matching bean is found).
 

Method Detail

find

<T> T find(IResultSetReader<T> rse)
       throws OrmException
Execute the query reading the ResultSet with a IResultSetReader.

Parameters:
rse - object that will extract all rows of results
Returns:
an arbitrary result object, as returned by the IResultSetExtractor
Throws:
OrmException

findList

List<Object[]> findList()
                        throws OrmException
Execute the query and read the result creating a List of all the ordered arrays with the extracted column values for every row.

Returns:
Throws:
OrmException

findUnique

Object[] findUnique()
                    throws OrmNotUniqueResultException
Execute the query and read the result creating an ordered array with the extracted column values or null (if no matching bean is found).

Returns:
Throws:
OrmNotUniqueResultException - if more than one row is returned from the query

findInt

int findInt()
            throws OrmException
Execute the query and read the result as an int value

Parameters:
sql - SQL query to execute
args - arguments to bind to the query
Returns:
Throws:
OrmException

findLong

long findLong()
              throws OrmException
Execute the query and read the result as an long value

Parameters:
sql - SQL query to execute
args - arguments to bind to the query
Returns:
Throws:
OrmException

findDouble

double findDouble()
                  throws OrmException
Execute the query and read the result as a double value

Parameters:
sql - SQL query to execute
args - arguments to bind to the query
Returns:
Throws:
OrmException

findFloat

float findFloat()
                throws OrmException
Execute the query and read the result as a float value

Parameters:
sql - SQL query to execute
args - arguments to bind to the query
Returns:
Throws:
OrmException

findString

String findString()
                  throws OrmException
Execute the wuery and read the result as a String value

Parameters:
sql - SQL query to execute
args - arguments to bind to the query
Returns:
Throws:
OrmException

findBoolean

boolean findBoolean()
                    throws OrmException
Execute the query and read the result as a boolean value

Parameters:
sql - SQL query to execute
args - arguments to bind to the query
Returns:
Throws:
OrmException

findBigDecimal

BigDecimal findBigDecimal()
                          throws OrmException
Execute the query and read the result as a BigDecimal value

Parameters:
sql - SQL query to execute
args - arguments to bind to the query
Returns:
Throws:
OrmException


Copyright © 2011. All Rights Reserved.