forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIJoinable.cs
78 lines (66 loc) · 2.3 KB
/
IJoinable.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
using System.Collections.Generic;
using NHibernate.SqlCommand;
namespace NHibernate.Persister.Entity
{
/// <summary>
/// Anything that can be loaded by outer join - namely persisters for classes or collections.
/// </summary>
public interface IJoinable
{
// Should this interface extend PropertyMapping?
/// <summary>
/// An identifying name; a class name or collection role name.
/// </summary>
string Name { get; }
/// <summary>
/// The columns to join on.
/// </summary>
string[] KeyColumnNames { get; }
/// <summary>
/// Is this instance actually a ICollectionPersister?
/// </summary>
bool IsCollection { get; }
/// <summary>
/// The table to join to.
/// </summary>
string TableName { get; }
/// <summary>
/// All columns to select, when loading.
/// </summary>
string SelectFragment(IJoinable rhs, string rhsAlias, string lhsAlias, string currentEntitySuffix,
string currentCollectionSuffix, bool includeCollectionColumns);
/// <summary>
/// Get the where clause part of any joins (optional operation)
/// </summary>
/// <param name="alias"></param>
/// <param name="innerJoin"></param>
/// <param name="includeSubclasses"></param>
/// <returns></returns>
SqlString WhereJoinFragment(string alias, bool innerJoin, bool includeSubclasses);
/// <summary>
/// Get the from clause part of any joins (optional operation)
/// </summary>
/// <param name="alias"></param>
/// <param name="innerJoin"></param>
/// <param name="includeSubclasses"></param>
/// <returns></returns>
SqlString FromJoinFragment(string alias, bool innerJoin, bool includeSubclasses);
/// <summary>
/// Get the where clause filter, given a query alias and considering enabled session filters
/// </summary>
string FilterFragment(string alias, IDictionary<string, IFilter> enabledFilters, bool excludeDiscriminator);
string OneToManyFilterFragment(string alias);
/// <summary>
/// Very, very, very ugly...
/// </summary>
/// <value>Does this persister "consume" entity column aliases in the result
/// set?</value>
bool ConsumesEntityAlias();
/// <summary>
/// Very, very, very ugly...
/// </summary>
/// <value>Does this persister "consume" collection column aliases in the result
/// set?</value>
bool ConsumesCollectionAlias();
}
}