forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathICriterion.cs
35 lines (32 loc) · 1.22 KB
/
ICriterion.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using NHibernate.Engine;
using NHibernate.SqlCommand;
namespace NHibernate.Criterion
{
/// <summary>
/// An object-oriented representation of a query criterion that may be used as a constraint
/// in a <see cref="ICriteria"/> query.
/// </summary>
/// <remarks>
/// Built-in criterion types are provided by the <c>Expression</c> factory class.
/// This interface might be implemented by application classes but, more commonly, application
/// criterion types would extend <c>AbstractCriterion</c>.
/// </remarks>
public interface ICriterion
{
/// <summary>
/// Render a SqlString fragment for the expression.
/// </summary>
/// <returns>A SqlString that contains a valid Sql fragment.</returns>
SqlString ToSqlString(ICriteria criteria, ICriteriaQuery criteriaQuery);
/// <summary>
/// Return typed values for all parameters in the rendered SQL fragment
/// </summary>
/// <returns>An array of TypedValues for the Expression.</returns>
TypedValue[] GetTypedValues(ICriteria criteria, ICriteriaQuery criteriaQuery);
/// <summary>
/// Return all projections used in this criterion
/// </summary>
/// <returns>An array of IProjection used by the Expression.</returns>
IProjection[] GetProjections();
}
}