|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.jpattern.orm.query.AQuery
com.googlecode.jpattern.orm.query.sql.SqlQuery
public class SqlQuery
| Constructor Summary | |
|---|---|
SqlQuery(ISessionSqlPerformer session,
String sql,
Object[] args)
|
|
| Method Summary | ||
|---|---|---|
void |
appendValues(List<Object> values)
Append to the list all the values of the expression's elements |
|
|
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). |
|
int |
getMaxRows()
Return the max rows for this query. |
|
int |
getQueryTimeout()
Return the query timeout for the query. |
|
String |
renderSql()
Return the sql query generated by this IQuery Object |
|
void |
renderSql(StringBuilder StringBuilder)
Append to the string buffer the sql query generated by this IQuery Object |
|
ISqlQuery |
setMaxRows(int maxRows)
Set the maximum number of rows to return in the query. |
|
ISqlQuery |
setQueryTimeout(int queryTimeout)
Set the query timeout for the query. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SqlQuery(ISessionSqlPerformer session,
String sql,
Object[] args)
| Method Detail |
|---|
public final int getMaxRows()
throws OrmException
IQuery
getMaxRows in interface IQueryOrmExceptionpublic final ISqlQuery setQueryTimeout(int queryTimeout)
ISqlQuery
setQueryTimeout in interface IQuerysetQueryTimeout in interface ISqlQuerypublic final int getQueryTimeout()
IQuery
getQueryTimeout in interface IQuery
public final ISqlQuery setMaxRows(int maxRows)
throws OrmException
ISqlQuery
setMaxRows in interface IQuerysetMaxRows in interface ISqlQueryOrmException
public <T> T find(IResultSetReader<T> rse)
throws OrmException
ICustomQuery
find in interface ICustomQueryrse - object that will extract all rows of results
OrmException
public List<Object[]> findList()
throws OrmException
ICustomQuery
findList in interface ICustomQueryOrmException
public Object[] findUnique()
throws OrmNotUniqueResultException
ICustomQuery
findUnique in interface ICustomQueryOrmNotUniqueResultException - if more than one row is returned from the query
public int findInt()
throws OrmException
ICustomQuery
findInt in interface ICustomQueryOrmException
public long findLong()
throws OrmException
ICustomQuery
findLong in interface ICustomQueryOrmException
public double findDouble()
throws OrmException
ICustomQuery
findDouble in interface ICustomQueryOrmException
public float findFloat()
throws OrmException
ICustomQuery
findFloat in interface ICustomQueryOrmException
public String findString()
throws OrmException
ICustomQuery
findString in interface ICustomQueryOrmException
public boolean findBoolean()
throws OrmException
ICustomQuery
findBoolean in interface ICustomQueryOrmException
public BigDecimal findBigDecimal()
throws OrmException
ICustomQuery
findBigDecimal in interface ICustomQueryOrmExceptionpublic void appendValues(List<Object> values)
IQuery
appendValues in interface IQuerypublic String renderSql()
IRenderableSqlObject
renderSql in interface IRenderableSqlObjectpublic void renderSql(StringBuilder StringBuilder)
IRenderableSqlObject
renderSql in interface IRenderableSqlObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||