Top Description Inners Fields Constructors Methods
org.hibernate.impl

public Class CriteriaImpl

extends Object
implements Criteria, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.hibernate.Criteria, org.hibernate.criterion.CriteriaSpecification
Imports
java.io.Serializable, java.util.ArrayList, .HashMap, .Iterator, .List, .Map, org.hibernate.CacheMode, .Criteria, .FetchMode, .FlushMode, .HibernateException, .LockMode, .ScrollMode, .ScrollableResults, org.hibernate.criterion.Criterion, .NaturalIdentifier, .Order, .Projection, org.hibernate.engine.SessionImplementor, org.hibernate.transform.ResultTransformer, org.hibernate.util.StringHelper

Implementation of the Criteria interface
Author
Gavin King

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public class

Field Summary

Modifier and TypeField and Description
private boolean
private CacheMode
private String
private String
private List<E>
private final String
private Map<K, V>
private Integer
private Integer
private FlushMode
private Map<K, V>
private Integer
private List<E>
private Projection
private Criteria
private Boolean
private ResultTransformer
private final String
private transient SessionImplementor
private CacheMode
private FlushMode
private List<E>
private Integer

Constructor Summary

AccessConstructor and Description
public
CriteriaImpl(String entityOrClassName, SessionImplementor session)

public
CriteriaImpl(String entityOrClassName, String alias, SessionImplementor session)

Method Summary

Modifier and TypeMethod and Description
public Criteria
add(Criteria criteriaInst, Criterion expression)

public Criteria
add(Criterion
The criterion object representing the restriction to be applied.
expression
)

Implements org.hibernate.Criteria.add.

Add a restriction to constrain the results to be retrieved.
public Criteria
addOrder(Order
The order object representing an ordering to be applied to the results.
ordering
)

Implements org.hibernate.Criteria.addOrder.

Add an ordering to the result set.
protected void
protected void
public Criteria
createAlias(String
A dot-seperated property path
associationPath
,
String
The alias to assign to the joined association (for later reference).
alias
)

Implements org.hibernate.Criteria.createAlias.

Join an association, assigning an alias to the joined association.
public Criteria
createAlias(String
A dot-seperated property path
associationPath
,
String
The alias to assign to the joined association (for later reference).
alias
,
int
The type of join to use.
joinType
)

Implements org.hibernate.Criteria.createAlias.

Join an association using the specified join-type, assigning an alias to the joined association.
public Criteria
createAlias(String
A dot-seperated property path
associationPath
,
String
The alias to assign to the joined association (for later reference).
alias
,
int
The type of join to use.
joinType
,
Criterion
The criteria to be added to the join condition (ON clause)
withClause
)

Implements org.hibernate.Criteria.createAlias.

Join an association using the specified join-type, assigning an alias to the joined association.
public Criteria
createCriteria(String
A dot-seperated property path
associationPath
)

Implements org.hibernate.Criteria.createCriteria.

Create a new Criteria, "rooted" at the associated entity.
public Criteria
createCriteria(String
A dot-seperated property path
associationPath
,
int
The type of join to use.
joinType
)

Implements org.hibernate.Criteria.createCriteria.

Create a new Criteria, "rooted" at the associated entity, using the specified join type.
public Criteria
createCriteria(String
A dot-seperated property path
associationPath
,
String
The alias to assign to the joined association (for later reference).
alias
)

Implements org.hibernate.Criteria.createCriteria.

Create a new Criteria, "rooted" at the associated entity, assigning the given alias.
public Criteria
createCriteria(String
A dot-seperated property path
associationPath
,
String
The alias to assign to the joined association (for later reference).
alias
,
int
The type of join to use.
joinType
)

Implements org.hibernate.Criteria.createCriteria.

Create a new Criteria, "rooted" at the associated entity, assigning the given alias and using the specified join type.
public Criteria
createCriteria(String
A dot-seperated property path
associationPath
,
String
The alias to assign to the joined association (for later reference).
alias
,
int
The type of join to use.
joinType
,
Criterion
The criteria to be added to the join condition (ON clause)
withClause
)

Implements org.hibernate.Criteria.createCriteria.

Create a new Criteria, "rooted" at the associated entity, assigning the given alias and using the specified join type.
public String
getAlias()

Implements org.hibernate.Criteria.getAlias.

Get the alias of the entity encapsulated by this criteria instance.
public boolean
public String
public String
public String
public FetchMode
public Integer
public Integer
public Map<K, V>
public Integer
public Projection
public Criteria
public ResultTransformer
public SessionImplementor
public Integer
public boolean
public boolean
isReadOnly()

Implements org.hibernate.Criteria.isReadOnly.

Should entities and proxies loaded by this Criteria be put in read-only mode?
public boolean
isReadOnlyInitialized()

Implements org.hibernate.Criteria.isReadOnlyInitialized.

Was the read-only/modifiable mode explicitly initialized?
public Iterator<E>
public Iterator<E>
public Iterator<E>
public List<E>
list()

Implements org.hibernate.Criteria.list.

Get the results.
public ScrollableResults
scroll()

Implements org.hibernate.Criteria.scroll.

Get the results as an instance of ScrollableResults
public ScrollableResults
scroll(ScrollMode
Indicates the type of underlying database cursor to request.
scrollMode
)

Implements org.hibernate.Criteria.scroll.

Get the results as an instance of ScrollableResults based on the given scroll mode.
public Criteria
setCacheable(boolean
Should the result be considered cacheable; default is to not cache (false).
cacheable
)

Implements org.hibernate.Criteria.setCacheable.

Enable caching of this query result, provided query caching is enabled for the underlying session factory.
public Criteria
setCacheMode(CacheMode
The cache mode to use.
cacheMode
)

Implements org.hibernate.Criteria.setCacheMode.

Override the cache mode for this particular query.
public Criteria
setCacheRegion(String
the name of a query cache region, or null for the default query cache
cacheRegion
)

Implements org.hibernate.Criteria.setCacheRegion.

Set the name of the cache region to use for query result caching.
public Criteria
setComment(String
a human-readable string
comment
)

Implements org.hibernate.Criteria.setComment.

Add a comment to the generated SQL.
public Criteria
setFetchMode(String
a dot seperated property path
associationPath
,
FetchMode
The fetch mode for the referenced association
mode
)

Implements org.hibernate.Criteria.setFetchMode.

Specify an association fetching strategy for an association or a collection of values.
public Criteria
setFetchSize(int
the fetch size
fetchSize
)

Implements org.hibernate.Criteria.setFetchSize.

Set a fetch size for the underlying JDBC query.
public Criteria
setFirstResult(int
the first result to retrieve, numbered from 0
firstResult
)

Implements org.hibernate.Criteria.setFirstResult.

Set the first result to be retrieved.
public Criteria
setFlushMode(FlushMode
The flush mode to use.
flushMode
)

Implements org.hibernate.Criteria.setFlushMode.

Override the flush mode for this particular query.
public Criteria
setLockMode(LockMode
The lock mode to be applied
lockMode
)

Implements org.hibernate.Criteria.setLockMode.

Set the lock mode of the current entity
public Criteria
setLockMode(String
The previously assigned alias representing the entity to which the given lock mode should apply.
alias
,
LockMode
The lock mode to be applied
lockMode
)

Implements org.hibernate.Criteria.setLockMode.

Set the lock mode of the aliased entity
public Criteria
setMaxResults(int
the maximum number of results
maxResults
)

Implements org.hibernate.Criteria.setMaxResults.

Set a limit upon the number of objects to be retrieved.
public Criteria
setProjection(Projection
The projection representing the overall "shape" of the query results.
projection
)

Implements org.hibernate.Criteria.setProjection.

Used to specify that the query results will be a projection (scalar in nature).
public Criteria
setReadOnly(boolean
true, entities and proxies loaded by the criteria will be put in read-only mode false, entities and proxies loaded by the criteria will be put in modifiable mode
readOnly
)

Implements org.hibernate.Criteria.setReadOnly.

Set the read-only/modifiable mode for entities and proxies loaded by this Criteria.
public Criteria
setResultTransformer(ResultTransformer
The transformer to apply
tupleMapper
)

Implements org.hibernate.Criteria.setResultTransformer.

Set a strategy for handling the query results.
public void
public Criteria
setTimeout(int
The timeout value to apply.
timeout
)

Implements org.hibernate.Criteria.setTimeout.

Set a timeout for the underlying JDBC query.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public Object
uniqueResult()

Implements org.hibernate.Criteria.uniqueResult.

Convenience method to return a single instance that matches the query, or null if the query returns no results.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait