DetachedCriteria detached = new DetachedCriteria();
...
Criteria criteria = detached.getExecutableCriteria( session );
...
criteria.list();
All methods have the same semantics and behavior as the corresponding methods of the Criteria interface.
org.hibernate.Criteria
| Modifier and Type | Field and Description |
|---|---|
| private final Criteria | |
| private final CriteriaImpl |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public DetachedCriteria | |
| public DetachedCriteria | |
| public DetachedCriteria | Returns: this, for method chainingThe association path associationPath, String The alias to apply to that association path alias)Creates an association path alias within this DetachedCriteria. |
| public DetachedCriteria | Returns: this, for method chainingThe association path associationPath, String The alias to apply to that association path alias, JoinType The type of join to use joinType)Creates an association path alias within this DetachedCriteria specifying the type of join. |
| public DetachedCriteria | Returns: this, for method chainingThe association path associationPath, String The alias to apply to that association path alias, JoinType The type of join to use joinType, Criterion An additional restriction on the join withClause)Creates an association path alias within this DetachedCriteria specifying the type of join. |
| public DetachedCriteria | Returns: this, for method chainingThe association path associationPath, String The alias to apply to that association path alias, int The type of join to use joinType)
Deprecated
use
Deprecated!
createAlias(String, String, JoinType)
|
| public DetachedCriteria | Returns: this, for method chainingThe association path associationPath, String The alias to apply to that association path alias, int The type of join to use joinType, Criterion An additional restriction on the join withClause)
Deprecated
use
Deprecated!
createAlias(String, String, JoinType, Criterion)
|
| public DetachedCriteria | Returns: the newly created, nested DetachedCriteriaThe association path associationPath, String The alias to apply to that association path alias)Creates a nested DetachedCriteria representing the association path. |
| public DetachedCriteria | Returns: the newly created, nested DetachedCriteriaThe association path associationPath)Creates a nested DetachedCriteria representing the association path. |
| public DetachedCriteria | Returns: the newly created, nested DetachedCriteriaThe association path associationPath, JoinType The type of join to use joinType)Creates a nested DetachedCriteria representing the association path, specifying the type of join to use. |
| public DetachedCriteria | Returns: the newly created, nested DetachedCriteriaThe association path associationPath, String The alias to associate with this "join". alias, JoinType The type of join to use joinType)Creates a nested DetachedCriteria representing the association path, specifying the type of join to use. |
| public DetachedCriteria | Returns: the newly created, nested DetachedCriteriaThe association path associationPath, String The alias to associate with this "join". alias, JoinType The type of join to use joinType, Criterion The additional join restriction withClause)Creates a nested DetachedCriteria representing the association path, specifying the type of join to use and an additional join restriction. |
| public DetachedCriteria | Returns: the newly created, nested DetachedCriteriaThe association path associationPath, int The type of join to use joinType)
Deprecated
use
Deprecated!
createCriteria(String, JoinType)
|
| public DetachedCriteria | Returns: the newly created, nested DetachedCriteriaThe association path associationPath, String The alias alias, int The type of join to use joinType)
Deprecated
use
Deprecated!
createCriteria(String, String, JoinType)
|
| public DetachedCriteria | Returns: the newly created, nested DetachedCriteriaThe association path associationPath, String The alias to associate with this "join". alias, int The type of join to use joinType, Criterion The additional join restriction withClause)
Deprecated
use
Deprecated!
createCriteria(String, String, JoinType, Criterion)
|
| public static DetachedCriteria | |
| public static DetachedCriteria | |
| public static DetachedCriteria | Returns: The DetachedCriteriaThe name of the entity to create a DetachedCriteria for entityName)Static builder to create a DetachedCriteria for the given entity. |
| public static DetachedCriteria | Returns: The DetachedCriteriaThe name of the entity to create a DetachedCriteria for entityName, String The alias to apply to the entity alias)Static builder to create a DetachedCriteria for the given entity. |
| public String | |
| pack-priv CriteriaImpl | Returns: The internally maintained CriteriaImplRetrieve the CriteriaImpl used internally to hold the DetachedCriteria state |
| public Criteria | Returns: The "executable" CriteriaThe session to associate the built Criteria with session)
Deprecated
as a consequence of
Get an executable instance of Criteria to actually run the query.
Session being deprecated.
|
| public DetachedCriteria | Returns: this, for method chainingThe SQL comment to use comment)Set the SQL comment to use. |
| public DetachedCriteria | Returns: this, for method chainingThe association path associationPath, FetchMode The fetch mode to apply mode)Set the fetch mode for a given association |
| public DetachedCriteria | Returns: this, for method chainingThe lock mode to use lockMode)Set the lock mode to use. |
| public DetachedCriteria | Returns: this, for method chainingThe alias to apply the lock to alias, LockMode The lock mode to use. lockMode)Set an alias-specific lock mode. |
| public DetachedCriteria | Returns: this, for method chainingThe projection to use projection)Set the projection to use. |
| public DetachedCriteria | Returns: this, for method chainingThe result transformer to use resultTransformer)Set the result transformer to use. |
| public DetachedCriteria | Returns: this (for method chaining)The timeout value to apply. timeout)Set a timeout for the underlying JDBC query. |
| public String |
| criteria | back to summary |
|---|---|
| private final Criteria criteria | |
| impl | back to summary |
|---|---|
| private final CriteriaImpl impl | |
| DetachedCriteria | back to summary |
|---|---|
| protected DetachedCriteria(String entityName) | |
| DetachedCriteria | back to summary |
|---|---|
| protected DetachedCriteria(String entityName, String alias) | |
| DetachedCriteria | back to summary |
|---|---|
| protected DetachedCriteria(CriteriaImpl impl, Criteria criteria) | |
| add | back to summary |
|---|---|
| public DetachedCriteria add(Criterion criterion) Add a restriction
| |
| addOrder | back to summary |
|---|---|
| public DetachedCriteria addOrder(Order order) Adds an ordering
| |
| createAlias | back to summary |
|---|---|
| public DetachedCriteria createAlias(String associationPath, String alias) Creates an association path alias within this DetachedCriteria. The alias can then be used in further alias creations or restrictions, etc.
| |
| createAlias | back to summary |
|---|---|
| public DetachedCriteria createAlias(String associationPath, String alias, JoinType joinType) Creates an association path alias within this DetachedCriteria specifying the type of join. The alias can then be used in further alias creations or restrictions, etc.
| |
| createAlias | back to summary |
|---|---|
| public DetachedCriteria createAlias(String associationPath, String alias, JoinType joinType, Criterion withClause) Creates an association path alias within this DetachedCriteria specifying the type of join. The alias can then be used in further alias creations or restrictions, etc.
| |
| createAlias | back to summary |
|---|---|
| public DetachedCriteria createAlias(String associationPath, String alias, int joinType)
Deprecated Deprecated!
| |
| createAlias | back to summary |
|---|---|
| public DetachedCriteria createAlias(String associationPath, String alias, int joinType, Criterion withClause)
Deprecated Deprecated!
| |
| createCriteria | back to summary |
|---|---|
| public DetachedCriteria createCriteria(String associationPath, String alias) Creates a nested DetachedCriteria representing the association path.
| |
| createCriteria | back to summary |
|---|---|
| public DetachedCriteria createCriteria(String associationPath) Creates a nested DetachedCriteria representing the association path.
| |
| createCriteria | back to summary |
|---|---|
| public DetachedCriteria createCriteria(String associationPath, JoinType joinType) Creates a nested DetachedCriteria representing the association path, specifying the type of join to use.
| |
| createCriteria | back to summary |
|---|---|
| public DetachedCriteria createCriteria(String associationPath, String alias, JoinType joinType) Creates a nested DetachedCriteria representing the association path, specifying the type of join to use.
| |
| createCriteria | back to summary |
|---|---|
| public DetachedCriteria createCriteria(String associationPath, String alias, JoinType joinType, Criterion withClause) Creates a nested DetachedCriteria representing the association path, specifying the type of join to use and an additional join restriction.
| |
| createCriteria | back to summary |
|---|---|
| public DetachedCriteria createCriteria(String associationPath, int joinType)
Deprecated Deprecated!
| |
| createCriteria | back to summary |
|---|---|
| public DetachedCriteria createCriteria(String associationPath, String alias, int joinType)
Deprecated Deprecated!
| |
| createCriteria | back to summary |
|---|---|
| public DetachedCriteria createCriteria(String associationPath, String alias, int joinType, Criterion withClause)
Deprecated Deprecated!
| |
| forClass | back to summary |
|---|---|
| public static DetachedCriteria forClass(Class<T> clazz) Static builder to create a DetachedCriteria for the given entity, by its Class.
| |
| forClass | back to summary |
|---|---|
| public static DetachedCriteria forClass(Class<T> clazz, String alias) Static builder to create a DetachedCriteria for the given entity, by its Class.
| |
| forEntityName | back to summary |
|---|---|
| public static DetachedCriteria forEntityName(String entityName) Static builder to create a DetachedCriteria for the given entity.
| |
| forEntityName | back to summary |
|---|---|
| public static DetachedCriteria forEntityName(String entityName, String alias) Static builder to create a DetachedCriteria for the given entity.
| |
| getAlias | back to summary |
|---|---|
| public String getAlias() Obtain the alias associated with this DetachedCriteria
| |
| getCriteriaImpl | back to summary |
|---|---|
| pack-priv CriteriaImpl getCriteriaImpl() Retrieve the CriteriaImpl used internally to hold the DetachedCriteria state
| |
| getExecutableCriteria | back to summary |
|---|---|
| public Criteria getExecutableCriteria(Session session)
Deprecated as a consequence of Get an executable instance of Criteria to actually run the query. | |
| setComment | back to summary |
|---|---|
| public DetachedCriteria setComment(String comment) Set the SQL comment to use.
| |
| setFetchMode | back to summary |
|---|---|
| public DetachedCriteria setFetchMode(String associationPath, FetchMode mode) Set the fetch mode for a given association
| |
| setLockMode | back to summary |
|---|---|
| public DetachedCriteria setLockMode(LockMode lockMode) Set the lock mode to use.
| |
| setLockMode | back to summary |
|---|---|
| public DetachedCriteria setLockMode(String alias, LockMode lockMode) Set an alias-specific lock mode. The specified lock mode applies only to that alias.
| |
| setProjection | back to summary |
|---|---|
| public DetachedCriteria setProjection(Projection projection) Set the projection to use.
| |
| setResultTransformer | back to summary |
|---|---|
| public DetachedCriteria setResultTransformer(ResultTransformer resultTransformer) Set the result transformer to use.
| |
| setTimeout | back to summary |
|---|---|
| public DetachedCriteria setTimeout(int timeout) Set a timeout for the underlying JDBC query.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |