Methods Summary |
---|
public org.hibernate.Criteria | add(org.hibernate.criterion.Criterion criterion)Add a {@link Criterion restriction} to constrain the results to be
retrieved.
|
public org.hibernate.Criteria | addOrder(org.hibernate.criterion.Order order)Add an {@link Order ordering} to the result set.
|
public org.hibernate.Criteria | createAlias(java.lang.String associationPath, java.lang.String alias)Join an association, assigning an alias to the joined association.
Functionally equivalent to {@link #createAlias(String, String, int)} using
{@link #INNER_JOIN} for the joinType.
|
public org.hibernate.Criteria | createAlias(java.lang.String associationPath, java.lang.String alias, int joinType)Join an association using the specified join-type, assigning an alias
to the joined association.
The joinType is expected to be one of {@link #INNER_JOIN} (the default),
{@link #FULL_JOIN}, or {@link #LEFT_JOIN}.
|
public org.hibernate.Criteria | createCriteria(java.lang.String associationPath)Create a new Criteria, "rooted" at the associated entity.
Functionally equivalent to {@link #createCriteria(String, int)} using
{@link #INNER_JOIN} for the joinType.
|
public org.hibernate.Criteria | createCriteria(java.lang.String associationPath, int joinType)Create a new Criteria, "rooted" at the associated entity, using the
specified join type.
|
public org.hibernate.Criteria | createCriteria(java.lang.String associationPath, java.lang.String alias)Create a new Criteria, "rooted" at the associated entity,
assigning the given alias.
Functionally equivalent to {@link #createCriteria(String, String, int)} using
{@link #INNER_JOIN} for the joinType.
|
public org.hibernate.Criteria | createCriteria(java.lang.String associationPath, java.lang.String alias, int joinType)Create a new Criteria, "rooted" at the associated entity,
assigning the given alias and using the specified join type.
|
public java.lang.String | getAlias()Get the alias of the entity encapsulated by this criteria instance.
|
public java.util.List | list()Get the results.
|
public ScrollableResults | scroll()Get the results as an instance of {@link ScrollableResults}
|
public ScrollableResults | scroll(ScrollMode scrollMode)Get the results as an instance of {@link ScrollableResults} based on the
given scroll mode.
|
public org.hibernate.Criteria | setCacheMode(CacheMode cacheMode)Override the cache mode for this particular query.
|
public org.hibernate.Criteria | setCacheRegion(java.lang.String cacheRegion)Set the name of the cache region to use for query result caching.
|
public org.hibernate.Criteria | setCacheable(boolean cacheable)Enable caching of this query result, provided query caching is enabled
for the underlying session factory.
|
public org.hibernate.Criteria | setComment(java.lang.String comment)Add a comment to the generated SQL.
|
public org.hibernate.Criteria | setFetchMode(java.lang.String associationPath, FetchMode mode)Specify an association fetching strategy for an association or a
collection of values.
|
public org.hibernate.Criteria | setFetchSize(int fetchSize)Set a fetch size for the underlying JDBC query.
|
public org.hibernate.Criteria | setFirstResult(int firstResult)Set the first result to be retrieved.
|
public org.hibernate.Criteria | setFlushMode(FlushMode flushMode)Override the flush mode for this particular query.
|
public org.hibernate.Criteria | setLockMode(LockMode lockMode)Set the lock mode of the current entity
|
public org.hibernate.Criteria | setLockMode(java.lang.String alias, LockMode lockMode)Set the lock mode of the aliased entity
|
public org.hibernate.Criteria | setMaxResults(int maxResults)Set a limit upon the number of objects to be retrieved.
|
public org.hibernate.Criteria | setProjection(org.hibernate.criterion.Projection projection)Used to specify that the query results will be a projection (scalar in
nature). Implicitly specifies the {@link #PROJECTION} result transformer.
The individual components contained within the given
{@link Projection projection} determines the overall "shape" of the
query result.
|
public org.hibernate.Criteria | setResultTransformer(org.hibernate.transform.ResultTransformer resultTransformer)Set a strategy for handling the query results. This determines the
"shape" of the query result.
|
public org.hibernate.Criteria | setTimeout(int timeout)Set a timeout for the underlying JDBC query.
|
public java.lang.Object | uniqueResult()Convenience method to return a single instance that matches
the query, or null if the query returns no results.
|