The ICriteria type exposes the following members.

Methods

  NameDescription
Public methodAdd
Add an Expression to constrain the results to be retrieved.
Public methodAddOrder
An an Order to the result set
Public methodClearOrders
Clear all orders from criteria.
Public methodClone
Creates a new object that is a copy of the current instance.
(Inherited from ICloneable.)
Public methodCreateAlias(String, String)
Join an association, assigning an alias to the joined entity
Public methodCreateAlias(String, String, JoinType)
Join an association using the specified join-type, assigning an alias to the joined association
Public methodCreateAlias(String, String, JoinType, ICriterion)
Join an association using the specified join-type, assigning an alias to the joined association
Public methodCreateCriteria(String)
Create a new ICriteria, "rooted" at the associated entity
Public methodCreateCriteria(String, JoinType)
Create a new ICriteria, "rooted" at the associated entity, using the specified join type.
Public methodCreateCriteria(String, String)
Create a new ICriteria, "rooted" at the associated entity, assigning the given alias
Public methodCreateCriteria(String, String, JoinType)
Create a new ICriteria, "rooted" at the associated entity, assigning the given alias and using the specified join type.
Public methodCreateCriteria(String, String, JoinType, ICriterion)
Create a new ICriteria, "rooted" at the associated entity, assigning the given alias and using the specified join type.
Public methodFuture<(Of <<'(T>)>>)
Get a enumerable that when enumerated will execute a batch of queries in a single database roundtrip
Public methodFutureValue<(Of <<'(T>)>>)
Get an IFutureValue instance, whose value can be retrieved through its Value property. The query is not executed until the Value property is retrieved, which will execute other Future queries as well in a single roundtrip
Public methodGetCriteriaByAlias
Alows to get a sub criteria by alias. Will return null if the criteria does not exists
Public methodGetCriteriaByPath
Allows to get a sub criteria by path. Will return null if the criteria does not exists.
Public methodGetRootEntityTypeIfAvailable
Gets the root entity type if available, throws otherwise
Public methodList()()()()
Get the results
Public methodList(IList)
Get the results and fill the IList
Public methodList<(Of <<'(T>)>>)()()()()
Strongly-typed version of List()()()().
Public methodSetCacheable
Enable caching of this query result set
Public methodSetCacheMode
Override the cache mode for this particular query.
Public methodSetCacheRegion
Set the name of the cache region.
Public methodSetComment
Add a comment to the generated SQL.
Public methodSetFetchMode
Specify an association fetching strategy. Currently, only one-to-many and one-to-one associations are supported.
Public methodSetFetchSize
Set a fetch size for the underlying ADO query.
Public methodSetFirstResult
Set the first result to be retrieved
Public methodSetFlushMode
Override the flush mode for this particular query.
Public methodSetLockMode(LockMode)
Set the lock mode of the current entity
Public methodSetLockMode(String, LockMode)
Set the lock mode of the aliased entity
Public methodSetMaxResults
Set a limit upon the number of objects to be retrieved
Public methodSetProjection
Used to specify that the query results will be a projection (scalar in nature). Implicitly specifies the projection result transformer.
Public methodSetReadOnly
Set the read-only mode for entities (and proxies) loaded by this Criteria. This setting overrides the default for the session (see DefaultReadOnly).
Public methodSetResultTransformer
Set a strategy for handling the query results. This determines the "shape" of the query result set.
Public methodSetTimeout
Set a timeout for the underlying ADO.NET query
Public methodUniqueResult()()()()
Convenience method to return a single instance that matches the query, or null if the query returns no results.
Public methodUniqueResult<(Of <<'(T>)>>)()()()()
Strongly-typed version of UniqueResult()()()().

Properties

  NameDescription
Public propertyAlias
Get the alias of the entity encapsulated by this criteria instance.
Public propertyIsReadOnly
Will entities (and proxies) loaded by this Criteria be put in read-only mode?
Public propertyIsReadOnlyInitialized
Was the read-only mode explicitly initialized?

See Also