com.googlecode.jpattern.orm.query
Class OrmQuery<T>
java.lang.Object
com.googlecode.jpattern.orm.query.AQuery
com.googlecode.jpattern.orm.query.ABaseOrmQuery
com.googlecode.jpattern.orm.query.OrmQuery<T>
- All Implemented Interfaces:
- IBaseOrmQuery, INameSolverConsumer, IOrmQuery<T>, IQuery, IRenderableSqlObject
public class OrmQuery<T>
- extends ABaseOrmQuery
- implements IOrmQuery<T>, INameSolverConsumer
- Author:
- Francesco Cina
20/giu/2011
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OrmQuery
public OrmQuery(IOrmClassToolMap ormClassToolMap,
ISessionSqlPerformer session,
Class<T> clazz,
Class<?>... joinClasses)
setNameSolver
public void setNameSolver(INameSolver nameSolver)
- Specified by:
setNameSolver in interface INameSolverConsumer
findList
public List<T> findList()
- Description copied from interface:
IOrmQuery
- Execute the query returning the list of objects.
- Specified by:
findList in interface IOrmQuery<T>
- Returns:
findRowCount
public long findRowCount()
- Description copied from interface:
IOrmQuery
- Return the count of entities this query should return.
- Specified by:
findRowCount in interface IOrmQuery<T>
- Returns:
findUnique
public T findUnique()
throws OrmNotUniqueResultException
- Description copied from interface:
IOrmQuery
- Execute the query returning either a single bean or null (if no matching bean is found).
- Specified by:
findUnique in interface IOrmQuery<T>
- Returns:
-
- Throws:
OrmNotUniqueResultException - if not exactly one row is returned from the query execution
getGeneratedRowCountSql
public String getGeneratedRowCountSql()
- Description copied from interface:
IOrmQuery
- Return the sql that was generated for to return the row count of the execution of this query.
- Specified by:
getGeneratedRowCountSql in interface IOrmQuery<T>
- Returns:
setDistinct
public IOrmQuery<T> setDistinct()
- Description copied from interface:
IOrmQuery
- use Distinct in the select clause
- Specified by:
setDistinct in interface IOrmQuery<T>
- Returns:
renderSelect
protected void renderSelect(StringBuffer stringBuffer)
- Specified by:
renderSelect in class ABaseOrmQuery
renderFrom
protected void renderFrom(StringBuffer stringBuffer)
- Specified by:
renderFrom in class ABaseOrmQuery
renderWhere
protected void renderWhere(StringBuffer stringBuffer)
- Specified by:
renderWhere in class ABaseOrmQuery
renderOrderBy
protected void renderOrderBy(StringBuffer stringBuffer)
- Specified by:
renderOrderBy in class ABaseOrmQuery
isDistinct
public boolean isDistinct()
throws OrmException
- Description copied from interface:
IOrmQuery
- return if use Distinct in the select clause
- Specified by:
isDistinct in interface IOrmQuery<T>
- Returns:
-
- Throws:
OrmException
Copyright © 2011. All Rights Reserved.