|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.joseluismartin.dao.hibernate.HibernateExecutable
public class HibernateExecutable
Wrapper for common methods in Query and Criteria interfaces
| Field Summary | |
|---|---|
static String |
LIST
|
static String |
SET_FIRST_RESULT
|
static String |
SET_MAX_RESULTS
|
static String |
SET_RESULT_TRANSFORMER
|
static String |
UNIQUE_RESULT
|
| Constructor Summary | |
|---|---|
HibernateExecutable(Criteria criteria)
|
|
HibernateExecutable(Query query)
|
|
| Method Summary | |
|---|---|
HibernateExecutable |
HibersetResultTransformer(ResultTransformer transformer)
Set a strategy for handling the query results. |
List |
list()
Return the query results as a List. |
HibernateExecutable |
setFirstResult(int firstResult)
Set the first row to retrieve. |
HibernateExecutable |
setMaxResults(int maxResults)
Set the maximum number of rows to retrieve. |
Object |
uniqueResult()
Convenience method to return a single instance that matches the query, or null if the query returns no results. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String LIST
public static final String UNIQUE_RESULT
public static final String SET_MAX_RESULTS
public static final String SET_FIRST_RESULT
public static final String SET_RESULT_TRANSFORMER
| Constructor Detail |
|---|
public HibernateExecutable(Criteria criteria)
public HibernateExecutable(Query query)
| Method Detail |
|---|
public List list()
throws HibernateException
HibernateException
public Object uniqueResult()
throws HibernateException
NonUniqueResultException - if there is more than one matching result
HibernateExceptionpublic HibernateExecutable setMaxResults(int maxResults)
maxResults - the maximum number of rowspublic HibernateExecutable setFirstResult(int firstResult)
firstResult - a row number, numbered from 0public HibernateExecutable HibersetResultTransformer(ResultTransformer transformer)
transformer - The transformer to apply
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||