forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMaster.cs
103 lines (88 loc) · 1.85 KB
/
Master.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace NHibernate.DomainModel
{
/// <summary>
/// Summary description for Master.
/// </summary>
[Serializable]
public class Master : INamed
{
private static object _emptyObject = new object();
private Master _otherMaster;
private ISet<Detail> _details = new HashSet<Detail>();
private ISet<Detail> _moreDetails = new HashSet<Detail>();
private ISet<Master> _incoming = new HashSet<Master>();
private ISet<Master> _outgoing = new HashSet<Master>();
private string _name = "master";
#pragma warning disable 169
private DateTime version;
#pragma warning restore 169
//private BigDecimal bigDecimal = new BigDecimal("1234.123"); //TODO: how to do in .net
private int _x;
public Master OtherMaster
{
get { return _otherMaster; }
set { _otherMaster = value; }
}
public void AddDetail(Detail d)
{
_details.Add(d);
}
public void RemoveDetail(Detail d)
{
_details.Remove(d);
}
public ISet<Detail> Details
{
get { return _details; }
set
{
Trace.WriteLine("Details assigned");
_details = value;
}
}
public ISet<Detail> MoreDetails
{
get { return _moreDetails; }
set { _moreDetails = value; }
}
public void AddIncoming(Master m)
{
_incoming.Add(m);
}
public void RemoveIncoming(Master m)
{
_incoming.Remove(m);
}
public ISet<Master> Incoming
{
get { return _incoming; }
set { _incoming = value; }
}
public void AddOutgoing(Master m)
{
_outgoing.Add(m);
}
public void RemoveOutgoing(Master m)
{
_outgoing.Remove(m);
}
public ISet<Master> Outgoing
{
get { return _outgoing; }
set { _outgoing = value; }
}
public string Name
{
get { return _name; }
set { _name = value; }
}
public int X
{
get { return _x; }
set { _x = value; }
}
}
}