1
|
|
#region Copyright
|
2
|
|
|
3
|
|
|
4
|
|
|
5
|
|
|
6
|
|
|
7
|
|
|
8
|
|
|
9
|
|
|
10
|
|
|
11
|
|
|
12
|
|
|
13
|
|
|
14
|
|
|
15
|
|
|
16
|
|
|
17
|
|
#endregion
|
18
|
|
|
19
|
|
using System;
|
20
|
|
using System.Text;
|
21
|
|
using Nullables;
|
22
|
|
|
23
|
|
namespace Seasar.Tests.Extension.Unit
|
24
|
|
{
|
25
|
|
[Serializable]
|
26
|
|
public class NHibernateNullableEmployee
|
27
|
|
{
|
28
|
|
private NullableInt64 empno;
|
29
|
|
|
30
|
|
private string ename;
|
31
|
|
|
32
|
|
private NullableInt32 deptno;
|
33
|
|
|
34
|
|
private string dname;
|
35
|
|
|
36
|
2
|
public NHibernateNullableEmployee()
|
37
|
|
{
|
38
|
|
}
|
39
|
|
|
40
|
0
|
public NHibernateNullableEmployee(
|
41
|
|
NullableInt64 empno,
|
42
|
|
string ename,
|
43
|
|
NullableInt32 deptno,
|
44
|
|
string dname
|
45
|
|
)
|
46
|
|
{
|
47
|
|
this.empno = empno;
|
48
|
|
this.ename = ename;
|
49
|
|
this.deptno = deptno;
|
50
|
|
this.dname = dname;
|
51
|
|
}
|
52
|
|
|
53
|
|
public NullableInt64 Empno
|
54
|
|
{
|
55
|
2
|
set { empno = value; }
|
56
|
2
|
get { return empno; }
|
57
|
|
}
|
58
|
|
|
59
|
|
public string Ename
|
60
|
|
{
|
61
|
2
|
set { ename = value; }
|
62
|
2
|
get { return ename; }
|
63
|
|
}
|
64
|
|
|
65
|
|
public NullableInt32 Deptno
|
66
|
|
{
|
67
|
2
|
set { deptno = value; }
|
68
|
2
|
get { return deptno; }
|
69
|
|
}
|
70
|
|
|
71
|
|
public string Dname
|
72
|
|
{
|
73
|
2
|
set { dname = value; }
|
74
|
2
|
get { return dname; }
|
75
|
|
}
|
76
|
|
|
77
|
0
|
public override bool Equals(object other)
|
78
|
|
{
|
79
|
|
if (!(other is NHibernateNullableEmployee)) { return false; }
|
80
|
|
NHibernateNullableEmployee castOther = (NHibernateNullableEmployee) other;
|
81
|
|
return this.Empno == castOther.Empno;
|
82
|
|
}
|
83
|
|
|
84
|
0
|
public override int GetHashCode()
|
85
|
|
{
|
86
|
|
return (int) this.Empno;
|
87
|
|
}
|
88
|
|
|
89
|
0
|
public override string ToString()
|
90
|
|
{
|
91
|
|
StringBuilder buf = new StringBuilder();
|
92
|
|
buf.Append(empno).Append(", ");
|
93
|
|
buf.Append(ename).Append(", ");
|
94
|
|
buf.Append(deptno).Append(", ");
|
95
|
|
buf.Append(dname);
|
96
|
|
return buf.ToString();
|
97
|
|
}
|
98
|
|
}
|
99
|
|
}
|
100
|
|
|