forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIValue.cs
85 lines (71 loc) · 2.29 KB
/
IValue.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
79
80
81
82
83
84
85
using System.Collections.Generic;
using NHibernate.Engine;
using NHibernate.Type;
namespace NHibernate.Mapping
{
/// <summary>
/// A value is anything that is persisted by value, instead of
/// by reference. It is essentially a Hibernate IType, together
/// with zero or more columns. Values are wrapped by things with
/// higher level semantics, for example properties, collections,
/// classes.
/// </summary>
public interface IValue
{
/// <summary>
/// Gets the number of columns that this value spans in the table.
/// </summary>
int ColumnSpan { get; }
/// <summary>
/// Gets an <see cref="IEnumerable{ISelectable}"/> of <see cref="Column"/> objects
/// that this value is stored in.
/// </summary>
IEnumerable<ISelectable> ColumnIterator { get; }
/// <summary>
/// Gets the <see cref="IType"/> to read/write the Values.
/// </summary>
IType Type { get; }
/// <summary>
/// Gets the <see cref="Table"/> this Value is stored in.
/// </summary>
Table Table { get; }
bool HasFormula { get; }
/// <summary>
/// Gets a <see cref="bool"/> indicating if this Value is unique.
/// </summary>
bool IsAlternateUniqueKey { get; }
/// <summary>
/// Gets a <see cref="bool"/> indicating if this Value can have
/// null values.
/// </summary>
bool IsNullable { get; }
bool[] ColumnUpdateability { get; }
bool[] ColumnInsertability { get; }
/// <summary>
/// Gets a <see cref="bool"/> indicating if this is a SimpleValue
/// that does not involve foreign keys.
/// </summary>
bool IsSimpleValue { get; }
/// <summary>
///
/// </summary>
void CreateForeignKey();
/// <summary>
/// Determines if the Value is part of a valid mapping.
/// </summary>
/// <param name="mapping">The <see cref="IMapping"/> to validate.</param>
/// <returns>
/// <see langword="true" /> if the Value is part of a valid mapping, <see langword="false" />
/// otherwise.
/// </returns>
/// <exception cref="MappingException"></exception>
/// <remarks>
/// Mainly used to make sure that Value maps to the correct number
/// of columns.
/// </remarks>
bool IsValid(IMapping mapping);
FetchMode FetchMode { get; }
void SetTypeUsingReflection(string className, string propertyName, string accesorName);
object Accept(IValueVisitor visitor);
}
}