forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIQueryTranslatorFactory.cs
64 lines (61 loc) · 3.29 KB
/
IQueryTranslatorFactory.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
using System.Collections.Generic;
using NHibernate.Engine;
namespace NHibernate.Hql
{
/// <summary>
/// Facade for generation of <see cref="NHibernate.Hql.IQueryTranslator"/>
/// and <see cref="NHibernate.Hql.IFilterTranslator"/> instances.
/// </summary>
public interface IQueryTranslatorFactory
{
/// <summary>
/// Construct a <see cref="NHibernate.Hql.IQueryTranslator"/> instance
/// capable of translating an HQL query string.
/// </summary>
/// <param name="queryIdentifier">
/// The query-identifier (used in <see cref="NHibernate.Stat.QueryStatistics"/> collection).
/// This is typically the same as the queryString parameter except for the case of
/// split polymorphic queries which result in multiple physical sql queries.
/// </param>
/// <param name="queryString">The query string to be translated</param>
/// <param name="filters">Currently enabled filters</param>
/// <param name="factory">The session factory</param>
/// <returns>An appropriate translator.</returns>
IQueryTranslator CreateQueryTranslator(string queryIdentifier, string queryString, IDictionary<string, IFilter> filters, ISessionFactoryImplementor factory);
/// <summary>
/// Construct a <see cref="NHibernate.Hql.IFilterTranslator"/> instance capable of
/// translating an HQL filter string.
/// </summary>
/// <param name="queryIdentifier">
/// The query-identifier (used in <see cref="NHibernate.Stat.QueryStatistics"/> collection).
/// This is typically the same as the queryString parameter except for the case of
/// split polymorphic queries which result in multiple physical sql queries.
/// </param>
/// <param name="queryString">The query string to be translated</param>
/// <param name="filters">Currently enabled filters</param>
/// <param name="factory">The session factory</param>
/// <returns>An appropriate translator.</returns>
IFilterTranslator CreateFilterTranslator(string queryIdentifier, string queryString, IDictionary<string, IFilter> filters, ISessionFactoryImplementor factory);
}
/// <summary>
/// Facade for generation of <see cref="NHibernate.Hql.IQueryTranslator"/>
/// and <see cref="NHibernate.Hql.IFilterTranslator"/> instances.
/// </summary>
public interface IQueryTranslatorFactory2 : IQueryTranslatorFactory
{
/// <summary>
/// Construct a <see cref="NHibernate.Hql.IQueryTranslator"/> instance
/// capable of translating a Linq expression.
/// </summary>
/// <param name="queryIdentifier">
/// The query-identifier (used in <see cref="NHibernate.Stat.QueryStatistics"/> collection).
/// This is typically the same as the queryString parameter except for the case of
/// split polymorphic queries which result in multiple physical sql queries.
/// </param>
/// <param name="queryExpression">The query expression to be translated</param>
/// <param name="filters">Currently enabled filters</param>
/// <param name="factory">The session factory</param>
/// <returns>An appropriate translator.</returns>
IQueryTranslator CreateQueryTranslator(string queryIdentifier, IQueryExpression queryExpression, IDictionary<string, IFilter> filters, ISessionFactoryImplementor factory);
}
}