|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.hibernate.impl.CriteriaImpl
Implementation of the Criteria interface
Nested Class Summary | |
static class |
CriteriaImpl.CriterionEntry
|
class |
CriteriaImpl.Subcriteria
|
Field Summary |
Fields inherited from interface net.sf.hibernate.Criteria |
ROOT_ALIAS |
Constructor Summary | |
CriteriaImpl(Class persistentClass,
SessionImpl session)
|
Method Summary | |
Criteria |
add(Criterion expression)
Add an Criterion to constrain the result to be retrieved. |
Criteria |
add(String alias,
Criterion expression)
|
Criteria |
addOrder(Order ordering)
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 |
String |
getAlias(String associationPath)
|
Map |
getAliasClasses()
|
Class |
getClassForPath(String rootAlias,
String associationPath)
|
Class |
getCriteriaClass()
Get the persistent class that this Criteria applies to |
Class |
getCriteriaClass(String alias)
Get the persistent class that the alias refers to |
FetchMode |
getFetchMode(String path)
|
Integer |
getFirstResult()
|
Map |
getLockModes()
|
Integer |
getMaxResults()
|
Class |
getPersistentClass(String alias)
|
Integer |
getTimeout()
|
boolean |
isJoin(String path)
|
boolean |
isReturnMapEnabled()
|
Iterator |
iterateExpressionEntries()
|
Iterator |
iterateOrderings()
|
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 |
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 |
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 |
setTimeout(int timeout)
Set a timeout for the underlying JDBC query. |
String |
toString()
|
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, wait, wait, wait |
Constructor Detail |
public CriteriaImpl(Class persistentClass, SessionImpl session)
Method Detail |
public Criteria setMaxResults(int maxResults)
Criteria
setMaxResults
in interface Criteria
maxResults
-
public Criteria setFirstResult(int firstResult)
Criteria
setFirstResult
in interface Criteria
firstResult
-
public Criteria setTimeout(int timeout)
Criteria
setTimeout
in interface Criteria
timeout
-
public Criteria add(Criterion expression)
Criteria
add
in interface Criteria
expression
-
public Integer getMaxResults()
public Integer getFirstResult()
public Integer getTimeout()
public List list() throws HibernateException
Criteria
list
in interface Criteria
HibernateException
public Iterator iterateExpressionEntries()
public Iterator iterateOrderings()
public Class getPersistentClass(String alias)
public Map getAliasClasses()
public String toString()
public Criteria addOrder(Order ordering)
Criteria
addOrder
in interface Criteria
ordering
-
public FetchMode getFetchMode(String path)
public Criteria setFetchMode(String associationPath, FetchMode mode)
Criteria
setFetchMode
in interface Criteria
associationPath
- a dot seperated property pathmode
- the fetch mode
public Criteria createAlias(String associationPath, String alias) throws HibernateException
Criteria
createAlias
in interface Criteria
HibernateException
public boolean isJoin(String path)
public String getAlias(String associationPath)
public Criteria add(String alias, Criterion expression)
public Class getClassForPath(String rootAlias, String associationPath) throws HibernateException
HibernateException
public Criteria createCriteria(String associationPath) throws HibernateException
Criteria
createCriteria
in interface Criteria
HibernateException
public Object uniqueResult() throws HibernateException
Criteria
uniqueResult
in interface Criteria
HibernateException
- if there is more than one matching resultpublic 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 boolean isReturnMapEnabled()
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 Map getLockModes()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |