Class Overview
Some applications need to create criteria queries in "detached
mode", where the Hibernate session is not available. This class
may be instantiated anywhere, and then a Criteria
may be obtained by passing a session to
getExecutableCriteria(). All methods have the
same semantics and behavior as the corresponding methods of the
Criteria interface.
Summary
Public Methods |
DetachedCriteria
|
add(Criterion criterion)
|
DetachedCriteria
|
addOrder(Order order)
|
DetachedCriteria
|
createAlias(String associationPath, String alias)
|
DetachedCriteria
|
createAlias(String associationPath, String alias, int joinType)
|
DetachedCriteria
|
createAlias(String associationPath, String alias, int joinType, Criterion withClause)
|
DetachedCriteria
|
createCriteria(String associationPath)
|
DetachedCriteria
|
createCriteria(String associationPath, String alias, int joinType, Criterion withClause)
|
DetachedCriteria
|
createCriteria(String associationPath, String alias, int joinType)
|
DetachedCriteria
|
createCriteria(String associationPath, int joinType)
|
DetachedCriteria
|
createCriteria(String associationPath, String alias)
|
static
DetachedCriteria
|
forClass(Class clazz)
|
static
DetachedCriteria
|
forClass(Class clazz, String alias)
|
static
DetachedCriteria
|
forEntityName(String entityName, String alias)
|
static
DetachedCriteria
|
forEntityName(String entityName)
|
String
|
getAlias()
|
Criteria
|
getExecutableCriteria(Session session)
Get an executable instance of Criteria,
to actually run the query.
|
DetachedCriteria
|
setComment(String comment)
|
DetachedCriteria
|
setFetchMode(String associationPath, FetchMode mode)
|
DetachedCriteria
|
setLockMode(String alias, LockMode lockMode)
|
DetachedCriteria
|
setLockMode(LockMode lockMode)
|
DetachedCriteria
|
setProjection(Projection projection)
|
DetachedCriteria
|
setResultTransformer(ResultTransformer resultTransformer)
|
String
|
toString()
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Protected Constructors
protected
DetachedCriteria
(String entityName)
protected
DetachedCriteria
(String entityName, String alias)
Public Methods
public
Criteria
getExecutableCriteria
(Session session)
Get an executable instance of Criteria,
to actually run the query.