|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jpattern.orm.query.SmartRenderableSqlQuery
com.jpattern.orm.query.find.CustomFindQueryOrm
public class CustomFindQueryOrm
| Constructor Summary | |
|---|---|
CustomFindQueryOrm(String selectClause,
IOrmClassToolMap ormClassToolMap,
SessionSqlPerformer session,
Class<?> clazz,
Integer nameSolverClassId,
TypeFactory typeFactory)
|
|
| Method Summary | ||
|---|---|---|
void |
appendElementValues(List<Object> values)
|
|
void |
appendValues(List<Object> values)
Append to the list all the values of the expression's elements |
|
void |
doElementRender(StringBuilder stringBuilder)
|
|
void |
doRender(StringBuilder stringBuilder)
|
|
|
find(ResultSetReader<T> rse)
Execute the query reading the ResultSet with a ResultSetReader. |
|
|
find(ResultSetRowReader<T> rsrr)
Execute the query reading the ResultSet with a ResultSetRowReader. |
|
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 query 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). |
|
|
findUnique(ResultSetRowReader<T> rsrr)
Execute the query reading the ResultSet with a ResultSetRowReader. |
|
CustomFindQuery |
fullOuterJoin(Class<?> joinClass)
Perform a natural full outer Join. |
|
CustomFindQuery |
fullOuterJoin(Class<?> joinClass,
String joinClassAlias)
Perform a natural full outer Join. |
|
CustomFindQuery |
fullOuterJoin(Class<?> joinClass,
String onLeftProperty,
String onRigthProperty)
Perform a full outer Join. |
|
CustomFindQuery |
fullOuterJoin(Class<?> joinClass,
String joinClassAlias,
String onLeftProperty,
String onRigthProperty)
Perform full outer Join. |
|
int |
getElementStatusVersion()
|
|
LockMode |
getLockMode()
Return the current lock mode |
|
int |
getMaxRows()
Return the max rows for this query. |
|
int |
getQueryTimeout()
Return the query timeout for the query. |
|
int |
getStatusVersion()
|
|
CustomFindQuery |
innerJoin(Class<?> joinClass)
Perform a inner Join. |
|
CustomFindQuery |
innerJoin(Class<?> joinClass,
String joinClassAlias)
Perform a inner Join. |
|
CustomFindQuery |
innerJoin(Class<?> joinClass,
String onLeftProperty,
String onRigthProperty)
Perform a inner Join. |
|
CustomFindQuery |
innerJoin(Class<?> joinClass,
String joinClassAlias,
String onLeftProperty,
String onRigthProperty)
Perform a inner Join. |
|
boolean |
isDistinct()
return if use Distinct in the select clause |
|
boolean |
isElementStatusChanged()
|
|
CustomFindQuery |
join(Class<?> joinClass)
Perform a simple (cross) Join. |
|
CustomFindQuery |
join(Class<?> joinClass,
String joinClassAlias)
Perform a simple (cross) Join. |
|
CustomFindQuery |
leftOuterJoin(Class<?> joinClass)
Perform a natural left outer Join. |
|
CustomFindQuery |
leftOuterJoin(Class<?> joinClass,
String joinClassAlias)
Perform a natural left outer Join. |
|
CustomFindQuery |
leftOuterJoin(Class<?> joinClass,
String onLeftProperty,
String onRigthProperty)
Perform a left outer Join. |
|
CustomFindQuery |
leftOuterJoin(Class<?> joinClass,
String joinClassAlias,
String onLeftProperty,
String onRigthProperty)
Perform left outer Join. |
|
CustomFindQuery |
naturalJoin(Class<?> joinClass)
Perform a natural Join. |
|
CustomFindQuery |
naturalJoin(Class<?> joinClass,
String joinClassAlias)
Perform a natural Join. |
|
CustomFindOrderBy |
orderBy()
Set the order by clause. |
|
String |
renderSqlElement()
|
|
void |
renderSqlElement(StringBuilder stringBuilder)
|
|
CustomFindQuery |
rightOuterJoin(Class<?> joinClass)
Perform a natural right outer Join. |
|
CustomFindQuery |
rightOuterJoin(Class<?> joinClass,
String joinClassAlias)
Perform a natural right outer Join. |
|
CustomFindQuery |
rightOuterJoin(Class<?> joinClass,
String onLeftProperty,
String onRigthProperty)
Perform a right outer Join. |
|
CustomFindQuery |
rightOuterJoin(Class<?> joinClass,
String joinClassAlias,
String onLeftProperty,
String onRigthProperty)
Perform right outer Join. |
|
CustomFindQuery |
setDistinct(boolean distinct)
Whether to use Distinct in the select clause |
|
CustomFindQuery |
setLockMode(LockMode lockMode)
|
|
CustomFindQuery |
setMaxRows(int maxRows)
Set the maximum number of rows to return in the query. |
|
void |
setNameSolver(NameSolver nameSolver)
|
|
CustomFindQuery |
setQueryTimeout(int queryTimeout)
Set the query timeout for the query. |
|
String |
toString()
|
|
CustomFindWhere |
where()
Set the where clause. |
|
| Methods inherited from class com.jpattern.orm.query.SmartRenderableSqlQuery |
|---|
isStatusChanged, renderSql, renderSql |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.jpattern.orm.query.RenderableSqlQuery |
|---|
renderSql, renderSql |
| Constructor Detail |
|---|
public CustomFindQueryOrm(String selectClause,
IOrmClassToolMap ormClassToolMap,
SessionSqlPerformer session,
Class<?> clazz,
Integer nameSolverClassId,
TypeFactory typeFactory)
| Method Detail |
|---|
public void setNameSolver(NameSolver nameSolver)
setNameSolver in interface NameSolverConsumerpublic List<Object[]> findList()
CustomQuery
findList in interface CustomQuery
public Object[] findUnique()
throws OrmNotUniqueResultException
CustomQuery
findUnique in interface CustomQueryOrmNotUniqueResultException - if not exactly one row is returned from the querypublic final int getStatusVersion()
getStatusVersion in class SmartRenderableSqlQuerypublic final void doRender(StringBuilder stringBuilder)
doRender in class SmartRenderableSqlQuery
public <T> T find(ResultSetReader<T> rse)
throws OrmException
CustomQueryResultSetReader.
find in interface CustomQueryResultSetReader
OrmException
public <T> List<T> find(ResultSetRowReader<T> rsrr)
throws OrmException
CustomQueryResultSetRowReader.
find in interface CustomQueryrsrr - object that will extract all rows of results
ResultSetRowReader
OrmException
public <T> T findUnique(ResultSetRowReader<T> rsrr)
throws OrmException,
OrmNotUniqueResultException
CustomQueryResultSetRowReader.
findUnique in interface CustomQueryrsrr - object that will extract the row of result
OrmException
OrmNotUniqueResultException - if the results of the query executions are not exactly 1
public int findInt()
throws OrmException
CustomQuery
findInt in interface CustomQueryOrmException
public long findLong()
throws OrmException
CustomQuery
findLong in interface CustomQueryOrmException
public double findDouble()
throws OrmException
CustomQuery
findDouble in interface CustomQueryOrmException
public float findFloat()
throws OrmException
CustomQuery
findFloat in interface CustomQueryOrmException
public String findString()
throws OrmException
CustomQuery
findString in interface CustomQueryOrmException
public boolean findBoolean()
throws OrmException
CustomQuery
findBoolean in interface CustomQueryOrmException
public BigDecimal findBigDecimal()
throws OrmException
CustomQuery
findBigDecimal in interface CustomQueryOrmException
public final int getMaxRows()
throws OrmException
CustomFindQueryCommon
getMaxRows in interface CustomFindQueryCommonOrmExceptionpublic final CustomFindQuery setQueryTimeout(int queryTimeout)
CustomFindQueryCommon
setQueryTimeout in interface CustomFindQueryCommonpublic final int getQueryTimeout()
CustomFindQueryCommon
getQueryTimeout in interface CustomFindQueryCommon
public final CustomFindQuery setMaxRows(int maxRows)
throws OrmException
CustomFindQueryCommon
setMaxRows in interface CustomFindQueryCommonOrmExceptionpublic CustomFindQuery setLockMode(LockMode lockMode)
setLockMode in interface CustomFindQueryCommonpublic LockMode getLockMode()
CustomFindQueryCommon
getLockMode in interface CustomFindQueryCommon
public final CustomFindWhere where()
throws OrmException
CustomFindQuery
where in interface CustomFindQueryOrmException
public final CustomFindOrderBy orderBy()
throws OrmException
CustomFindQuery
orderBy in interface CustomFindQueryOrmExceptionpublic final void appendValues(List<Object> values)
RenderableSqlQuery
appendValues in interface RenderableSqlQuerypublic final String renderSqlElement()
public final void renderSqlElement(StringBuilder stringBuilder)
public final boolean isElementStatusChanged()
public CustomFindQuery join(Class<?> joinClass)
From
join in interface From<CustomFindQuery>
public CustomFindQuery join(Class<?> joinClass,
String joinClassAlias)
From
join in interface From<CustomFindQuery>public CustomFindQuery naturalJoin(Class<?> joinClass)
From
naturalJoin in interface From<CustomFindQuery>
public CustomFindQuery naturalJoin(Class<?> joinClass,
String joinClassAlias)
From
naturalJoin in interface From<CustomFindQuery>public CustomFindQuery innerJoin(Class<?> joinClass)
From
innerJoin in interface From<CustomFindQuery>
public CustomFindQuery innerJoin(Class<?> joinClass,
String joinClassAlias)
From
innerJoin in interface From<CustomFindQuery>
public CustomFindQuery innerJoin(Class<?> joinClass,
String onLeftProperty,
String onRigthProperty)
From
innerJoin in interface From<CustomFindQuery>
public CustomFindQuery innerJoin(Class<?> joinClass,
String joinClassAlias,
String onLeftProperty,
String onRigthProperty)
From
innerJoin in interface From<CustomFindQuery>public CustomFindQuery leftOuterJoin(Class<?> joinClass)
From
leftOuterJoin in interface From<CustomFindQuery>
public CustomFindQuery leftOuterJoin(Class<?> joinClass,
String joinClassAlias)
From
leftOuterJoin in interface From<CustomFindQuery>
public CustomFindQuery leftOuterJoin(Class<?> joinClass,
String onLeftProperty,
String onRigthProperty)
From
leftOuterJoin in interface From<CustomFindQuery>
public CustomFindQuery leftOuterJoin(Class<?> joinClass,
String joinClassAlias,
String onLeftProperty,
String onRigthProperty)
From
leftOuterJoin in interface From<CustomFindQuery>public CustomFindQuery rightOuterJoin(Class<?> joinClass)
From
rightOuterJoin in interface From<CustomFindQuery>
public CustomFindQuery rightOuterJoin(Class<?> joinClass,
String joinClassAlias)
From
rightOuterJoin in interface From<CustomFindQuery>
public CustomFindQuery rightOuterJoin(Class<?> joinClass,
String onLeftProperty,
String onRigthProperty)
From
rightOuterJoin in interface From<CustomFindQuery>
public CustomFindQuery rightOuterJoin(Class<?> joinClass,
String joinClassAlias,
String onLeftProperty,
String onRigthProperty)
From
rightOuterJoin in interface From<CustomFindQuery>public CustomFindQuery fullOuterJoin(Class<?> joinClass)
From
fullOuterJoin in interface From<CustomFindQuery>
public CustomFindQuery fullOuterJoin(Class<?> joinClass,
String joinClassAlias)
From
fullOuterJoin in interface From<CustomFindQuery>
public CustomFindQuery fullOuterJoin(Class<?> joinClass,
String onLeftProperty,
String onRigthProperty)
From
fullOuterJoin in interface From<CustomFindQuery>
public CustomFindQuery fullOuterJoin(Class<?> joinClass,
String joinClassAlias,
String onLeftProperty,
String onRigthProperty)
From
fullOuterJoin in interface From<CustomFindQuery>public final int getElementStatusVersion()
public final void doElementRender(StringBuilder stringBuilder)
public final void appendElementValues(List<Object> values)
public String toString()
toString in class Objectpublic CustomFindQuery setDistinct(boolean distinct)
CustomFindQueryCommon
setDistinct in interface CustomFindQueryCommon
public boolean isDistinct()
throws OrmException
CustomFindQueryCommon
isDistinct in interface CustomFindQueryCommonOrmException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||