|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.hibernate.impl.CriteriaImpl.Subcriteria
Field Summary |
Fields inherited from interface net.sf.hibernate.Criteria |
ALIAS_TO_ENTITY_MAP, DISTINCT_ROOT_ENTITY, ROOT_ALIAS, ROOT_ENTITY |
Method Summary | |
Criteria |
add(Criterion expression)
Add a Criterion to constrain the results to be retrieved. |
Criteria |
addOrder(Order order)
Add an Order to the result set. |
Criteria |
createAlias(String associationPath,
String alias)
Join an association, assigning an alias to the joined entity |
Criteria |
createCriteria(String associationPath)
Create a new Criteria, "rooted" at the associated entity |
Criteria |
createCriteria(String associationPath,
String alias)
Create a new Criteria, "rooted" at the associated entity, assigning the given alias |
Class |
getCriteriaClass()
Get the persistent class that this Criteria applies to |
Class |
getCriteriaClass(String alias)
Get the persistent class that the alias refers to |
List |
list()
Get the results. |
Criteria |
returnMaps()
Return each row of results as a Map from alias to an instance of the aliased entity |
Criteria |
returnRootEntities()
Return each row of results as a single instance of the "root" entity (this is the default mode) |
Criteria |
setCacheable(boolean cacheable)
Enable caching of this query result set |
Criteria |
setCacheRegion(String cacheRegion)
Set the name of the cache region. |
Criteria |
setFetchMode(String associationPath,
FetchMode mode)
Specify an association fetching strategy for a one-to-many, many-to-one or one-to-one association, or for a collection of values. |
Criteria |
setFetchSize(int fetchSize)
Set a fetch size for the underlying JDBC query. |
Criteria |
setFirstResult(int firstResult)
Set the first result to be retrieved. |
Criteria |
setLockMode(LockMode lockMode)
Set the lock mode of the current entity |
Criteria |
setLockMode(String alias,
LockMode lockMode)
Set the lock mode of the aliased entity |
Criteria |
setMaxResults(int maxResults)
Set a limit upon the number of objects to be retrieved. |
Criteria |
setResultTransformer(ResultTransformer resultProcessor)
Set a strategy for handling the query results. |
Criteria |
setTimeout(int timeout)
Set a timeout for the underlying JDBC query. |
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 |
Method Detail |
public Criteria add(Criterion expression)
Criteria
expression
-
public Criteria createAlias(String associationPath, String alias) throws HibernateException
Criteria
createAlias
in interface Criteria
HibernateException
public Criteria addOrder(Order order)
Criteria
order
-
public Criteria createCriteria(String associationPath) throws HibernateException
Criteria
createCriteria
in interface Criteria
HibernateException
public List list() throws HibernateException
Criteria
HibernateException
public Object uniqueResult() throws HibernateException
Criteria
uniqueResult
in interface Criteria
HibernateException
- if there is more than one matching resultpublic Criteria setFetchMode(String associationPath, FetchMode mode) throws HibernateException
Criteria
setFetchMode
in interface Criteria
associationPath
- a dot seperated property pathmode
- the fetch mode
HibernateException
public Criteria setFirstResult(int firstResult)
Criteria
setFirstResult
in interface Criteria
firstResult
- the first result, numbered from 0
public Criteria setMaxResults(int maxResults)
Criteria
setMaxResults
in interface Criteria
maxResults
- the maximum number of results
public Criteria setTimeout(int timeout)
Criteria
setTimeout
in interface Criteria
timeout
-
public Criteria setFetchSize(int fetchSize)
Criteria
setFetchSize
in interface Criteria
fetchSize
- the fetch sizepublic Class getCriteriaClass()
Criteria
getCriteriaClass
in interface Criteria
public Class getCriteriaClass(String alias)
Criteria
getCriteriaClass
in interface Criteria
public Criteria createCriteria(String associationPath, String alias) throws HibernateException
Criteria
createCriteria
in interface Criteria
HibernateException
public Criteria returnMaps()
Criteria
returnMaps
in interface Criteria
Criteria.returnRootEntities()
public Criteria returnRootEntities()
Criteria
returnRootEntities
in interface Criteria
Criteria.returnMaps()
public Criteria setLockMode(LockMode lockMode)
Criteria
setLockMode
in interface Criteria
lockMode
- the lock modepublic Criteria setLockMode(String alias, LockMode lockMode)
Criteria
setLockMode
in interface Criteria
alias
- an aliaslockMode
- the lock modepublic Criteria setResultTransformer(ResultTransformer resultProcessor)
Criteria
setResultTransformer
in interface Criteria
Criteria.ROOT_ENTITY
,
Criteria.DISTINCT_ROOT_ENTITY
,
Criteria.ALIAS_TO_ENTITY_MAP
public Criteria setCacheable(boolean cacheable)
Criteria
setCacheable
in interface Criteria
public Criteria setCacheRegion(String cacheRegion)
Criteria
setCacheRegion
in interface Criteria
cacheRegion
- the name of a query cache region, or null
for the default query cache
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |