当前文件:
ActiveRecord/App_Code/jobs.cs[3K,2009-6-12 11:31:32],
打开代码结构图
1
using System;
2
using System.Collections;
3
//using System.Collections.Generic;
4
using System.Text;
5
using Castle.ActiveRecord;
6
using Castle.ActiveRecord.Queries;
7
using NHibernate.Expression;
8
//using NHibernate.Generics;
9
//该源码下载自www.51aspx.com(51aspx.com)
10
/**//// <summary>
11
/// jobs 的摘要说明
12
/// </summary>
13
namespace Soa.Pow.Objects.Domain
14
...{
15
[Serializable, ActiveRecord("jobs", DynamicUpdate = true, Lazy = true)]
16
public class jobs : ActiveRecordBase<jobs>
17
...{
18
19
Private Members#region Private Members
20
21
private int job_id;
22
private string job_desc;
23
24
private int min_lvl;
25
private int max_lvl;
26
27
#endregion
28
29
Constuctor(s)#region Constuctor(s)
30
31
public jobs()
32
...{
33
job_id = 0;
34
job_desc = String.Empty;
35
min_lvl = 0;
36
max_lvl = 0;
37
38
}
39
40
public jobs(
41
int id)
42
: this()
43
...{
44
job_id = id;
45
job_desc = String.Empty;
46
max_lvl = 0;
47
min_lvl = 0;
48
}
49
50
#endregion // End of Class Constuctor(s)
51
52
Public Properties#region Public Properties
53
54
[PrimaryKey(PrimaryKeyType.Identity, "job_id")]
55
public virtual int jobid
56
...{
57
get ...{ return job_id; }
58
set ...{ job_id = value; }
59
}
60
61
[Property(Column = "job_desc", Length = 50)]
62
public virtual string jobdesc
63
...{
64
get ...{ return job_desc; }
65
set ...{ job_desc = value; }
66
}
67
68
[Property(Column = "max_lvl")]
69
public virtual int maxlvl
70
...{
71
get ...{ return max_lvl; }
72
set ...{ max_lvl = value; }
73
}
74
75
[Property(Column = "min_lvl")]
76
public virtual int minlvl
77
...{
78
get ...{ return min_lvl; }
79
set ...{ min_lvl = value; }
80
}
81
82
83
84
85
#endregion
86
87
88
Equals, HashCode and ToString overrides#region Equals, HashCode and ToString overrides
89
90
/**//// <summary>
91
/// Local implementation of Equals based on unique value members
92
/// </summary>
93
public override bool Equals(object obj)
94
...{
95
if (this == obj) return true;
96
if ((obj == null) || (obj.GetType() != this.GetType())) return false;
97
jobs castObj = (jobs)obj;
98
return (castObj != null) &&
99
(this.job_id == castObj.job_id);
100
}
101
102
/**//// <summary>
103
/// Local implementation of GetHashCode based on unique value members
104
/// </summary>
105
public override int GetHashCode()
106
...{
107
108
int hash = 57;
109
hash = 27 * hash * job_id.GetHashCode();
110
return hash;
111
}
112
113
/**//// <summary>
114
/// Local implementation of ToString based on class members
115
/// </summary>
116
public override String ToString()
117
...{
118
StringBuilder sbuffer = new StringBuilder();
119
sbuffer.Append("{");
120
121
sbuffer.AppendFormat("job_id = {0}, ", job_id);
122
sbuffer.AppendFormat("job_desc = {0}, ", job_desc);
123
sbuffer.AppendFormat("min_lvl = {0}, ", min_lvl);
124
sbuffer.AppendFormat("max_lvl = {0}, ", max_lvl);
125
126
sbuffer.Append(" }");
127
return sbuffer.ToString();
128
}
129
130
#endregion
131
}
132
}
133