com.googlecode.jpattern.orm.query
Interface IOrmQuery<T>

All Superinterfaces:
IBaseOrmQuery, IQuery, IRenderableSqlObject
All Known Implementing Classes:
OrmQuery

public interface IOrmQuery<T>
extends IBaseOrmQuery

Author:
Francesco Cina 18/giu/2011

Method Summary
 List<T> findList()
          Execute the query returning the list of objects.
 long findRowCount()
          Return the count of entities this query should return.
 T findUnique()
          Execute the query returning either a single bean or null (if no matching bean is found).
 String getGeneratedRowCountSql()
          Return the sql that was generated for to return the row count of the execution of this query.
 boolean isDistinct()
          return if use Distinct in the select clause
 IOrmQuery<T> setDistinct()
          use Distinct in the select clause
 
Methods inherited from interface com.googlecode.jpattern.orm.query.IBaseOrmQuery
join, orderBy, where
 
Methods inherited from interface com.googlecode.jpattern.orm.query.IQuery
appendValues, getMaxRows, getQueryTimeout, setMaxRows, setQueryTimeout
 
Methods inherited from interface com.googlecode.jpattern.orm.query.IRenderableSqlObject
renderSql, renderSql
 

Method Detail

findList

List<T> findList()
                 throws OrmException
Execute the query returning the list of objects.

Returns:
Throws:
OrmException

findRowCount

long findRowCount()
                  throws OrmException
Return the count of entities this query should return.

Returns:
Throws:
OrmException

findUnique

T findUnique()
             throws OrmNotUniqueResultException
Execute the query returning either a single bean or null (if no matching bean is found).

Returns:
Throws:
OrmNotUniqueResultException - if not exactly one row is returned from the query execution

getGeneratedRowCountSql

String getGeneratedRowCountSql()
                               throws OrmException
Return the sql that was generated for to return the row count of the execution of this query.

Returns:
Throws:
OrmException

setDistinct

IOrmQuery<T> setDistinct()
                         throws OrmException
use Distinct in the select clause

Returns:
Throws:
OrmException

isDistinct

boolean isDistinct()
                   throws OrmException
return if use Distinct in the select clause

Returns:
Throws:
OrmException


Copyright © 2011. All Rights Reserved.