forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContainer.cs
163 lines (138 loc) · 2.99 KB
/
Container.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
using System;
using System.Collections.Generic;
namespace NHibernate.DomainModel
{
public class Container
{
public sealed class ContainerInnerClass
{
private Simple _simple;
private string _name;
private One _one;
private Many _many;
private int _count;
public Simple Simple
{
get { return _simple; }
set { _simple = value; }
}
public string Name
{
get { return _name; }
set { _name = value; }
}
public One One
{
get { return _one; }
set { _one = value; }
}
public Many Many
{
get { return _many; }
set { _many = value; }
}
public int Count
{
get { return _count; }
set { _count = value; }
}
#region System.Object Members
public override string ToString()
{
return _name + " = " + _simple.Count
+ "/" + (_one == null ? "nil" : _one.Key.ToString())
+ "/" + (_many == null ? "nii" : _many.Key.ToString());
}
#endregion
}
public sealed class Ternary
{
private string _name;
private Foo _foo;
private Glarch _glarch;
public string Name
{
get { return _name; }
set { _name = value; }
}
public Foo Foo
{
get { return _foo; }
set { _foo = value; }
}
public Glarch Glarch
{
get { return _glarch; }
set { _glarch = value; }
}
}
private IList<Simple> _oneToMany;
private IList<ContainerInnerClass> _components;
private IList<Simple> _manyToMany;
// <set> mapping
private ISet<ContainerInnerClass> _composites;
private IList<ContainerInnerClass> _cascades;
private long _id;
private IList<Contained> _bag;
private IList<Contained> _lazyBag = new List<Contained>();
private IDictionary<string, Ternary> _ternaryMap;
//<set> mapping
private ISet<Ternary> _ternarySet;
private Simple _manyToOne;
public virtual IList<Simple> OneToMany
{
get { return _oneToMany; }
set { _oneToMany = value; }
}
public virtual IList<Simple> ManyToMany
{
get { return _manyToMany; }
set { _manyToMany = value; }
}
public virtual IList<ContainerInnerClass> Components
{
get { return _components; }
set { _components = value; }
}
public virtual ISet<ContainerInnerClass> Composites
{
get { return _composites; }
set { _composites = value; }
}
public virtual IList<ContainerInnerClass> Cascades
{
get { return _cascades; }
set { _cascades = value; }
}
public virtual long Id
{
get { return _id; }
set { _id = value; }
}
public virtual Simple ManyToOne
{
get => _manyToOne;
set => _manyToOne = value;
}
public virtual IList<Contained> Bag
{
get { return _bag; }
set { _bag = value; }
}
public virtual IList<Contained> LazyBag
{
get { return _lazyBag; }
set { _lazyBag = value; }
}
public virtual IDictionary<string, Ternary> TernaryMap
{
get { return _ternaryMap; }
set { _ternaryMap = value; }
}
public virtual ISet<Ternary> TernarySet
{
get { return _ternarySet; }
set { _ternarySet = value; }
}
}
}