|
||||||||||
| 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.ABaseOrmQuery
com.googlecode.jpattern.orm.query.OrmCustomQuery
public class OrmCustomQuery
| Constructor Summary | |
|---|---|
OrmCustomQuery(String selectClause,
IOrmClassToolMap ormClassToolMap,
ISessionSqlPerformer session,
Class<?> clazz,
Class<?>... joinClasses)
|
|
| Method Summary | ||
|---|---|---|
|
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. |
|
protected void |
renderFrom(StringBuilder StringBuilder)
|
|
protected void |
renderOrderBy(StringBuilder StringBuilder)
|
|
protected void |
renderSelect(StringBuilder StringBuilder)
|
|
protected void |
renderWhere(StringBuilder StringBuilder)
|
|
IOrmCustomQuery |
setMaxRows(int maxRows)
Set the maximum number of rows to return in the query. |
|
void |
setNameSolver(INameSolver nameSolver)
|
|
IOrmCustomQuery |
setQueryTimeout(int queryTimeout)
Set the query timeout for the query. |
|
| Methods inherited from class com.googlecode.jpattern.orm.query.ABaseOrmQuery |
|---|
appendValues, join, orderBy, renderSql, renderSql, setJoin, setOrderBy, setWhere, where |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.googlecode.jpattern.orm.query.IBaseOrmQuery |
|---|
join, orderBy, where |
| Methods inherited from interface com.googlecode.jpattern.orm.query.IQuery |
|---|
appendValues |
| Methods inherited from interface com.googlecode.jpattern.orm.query.IRenderableSqlObject |
|---|
renderSql, renderSql |
| Constructor Detail |
|---|
public OrmCustomQuery(String selectClause,
IOrmClassToolMap ormClassToolMap,
ISessionSqlPerformer session,
Class<?> clazz,
Class<?>... joinClasses)
| Method Detail |
|---|
public void setNameSolver(INameSolver nameSolver)
setNameSolver in interface INameSolverConsumerpublic List<Object[]> findList()
ICustomQuery
findList in interface ICustomQuery
public Object[] findUnique()
throws OrmNotUniqueResultException
ICustomQuery
findUnique in interface ICustomQueryOrmNotUniqueResultException - if more than one row is returned from the queryprotected void renderSelect(StringBuilder StringBuilder)
renderSelect in class ABaseOrmQueryprotected void renderFrom(StringBuilder StringBuilder)
renderFrom in class ABaseOrmQueryprotected void renderWhere(StringBuilder StringBuilder)
renderWhere in class ABaseOrmQueryprotected void renderOrderBy(StringBuilder StringBuilder)
renderOrderBy in class ABaseOrmQuery
public <T> T find(IResultSetReader<T> rse)
throws OrmException
ICustomQuery
find in interface ICustomQueryrse - object that will extract all rows of results
OrmException
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 ICustomQueryOrmException
public final int getMaxRows()
throws OrmException
IQuery
getMaxRows in interface IQueryOrmExceptionpublic final IOrmCustomQuery setQueryTimeout(int queryTimeout)
IOrmCustomQuery
setQueryTimeout in interface IOrmCustomQuerysetQueryTimeout in interface IQuerypublic final int getQueryTimeout()
IQuery
getQueryTimeout in interface IQuery
public final IOrmCustomQuery setMaxRows(int maxRows)
throws OrmException
IOrmCustomQuery
setMaxRows in interface IOrmCustomQuerysetMaxRows in interface IQueryOrmException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||