public class HibernateExecutable extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
LIST |
static String |
SET_FIRST_RESULT |
static String |
SET_MAX_RESULTS |
static String |
SET_RESULT_TRANSFORMER |
static String |
UNIQUE_RESULT |
| Constructor and Description |
|---|
HibernateExecutable(Criteria criteria) |
HibernateExecutable(Query query) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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
public HibernateExecutable(Criteria criteria)
public HibernateExecutable(Query query)
public List list() throws HibernateException
HibernateExceptionpublic Object uniqueResult() throws HibernateException
NonUniqueResultException - if there is more than one matching resultHibernateExceptionpublic 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 applyCopyright © 2014 JDAL. All Rights Reserved.