forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVersionProperty.cs
61 lines (58 loc) · 2.06 KB
/
VersionProperty.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
using System;
using NHibernate.Engine;
using NHibernate.Type;
namespace NHibernate.Tuple
{
/// <summary>
/// Represents a version property within the Hibernate runtime-metamodel.
/// </summary>
/// <remarks>
/// Author: Steve Ebersole
/// </remarks>
[Serializable]
public class VersionProperty : StandardProperty
{
private readonly VersionValue unsavedValue;
/// <summary>
/// Constructs VersionProperty instances.
/// </summary>
/// <param name="name">The name by which the property can be referenced within
/// its owner.</param>
/// <param name="type">The Hibernate Type of this property.</param>
/// <param name="lazy">Should this property be handled lazily?</param>
/// <param name="insertable">Is this property an insertable value?</param>
/// <param name="updateable">Is this property an updateable value?</param>
/// <param name="insertGenerated">Is this property generated in the database on insert?</param>
/// <param name="updateGenerated">Is this property generated in the database on update?</param>
/// <param name="nullable">Is this property a nullable value?</param>
/// <param name="checkable">Is this property a checkable value?</param>
/// <param name="versionable">Is this property a versionable value?</param>
/// <param name="cascadeStyle">The cascade style for this property's value.</param>
/// <param name="unsavedValue">The value which, if found as the value of
/// this (i.e., the version) property, represents new (i.e., un-saved)
/// instances of the owning entity.</param>
public VersionProperty(
string name,
IType type,
bool lazy,
bool insertable,
bool updateable,
bool insertGenerated,
bool updateGenerated,
bool nullable,
bool checkable,
bool versionable,
CascadeStyle cascadeStyle,
VersionValue unsavedValue)
: base(
name, type, lazy, insertable, updateable, insertGenerated, updateGenerated, nullable, checkable, versionable,
cascadeStyle, null)
{
this.unsavedValue = unsavedValue;
}
public VersionValue UnsavedValue
{
get { return unsavedValue; }
}
}
}