BaseDomain.java
3.74 KB
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
164
165
166
package com.diligrp.website.util.domain;
import java.io.Serializable;
import java.sql.Timestamp;
import com.alibaba.fastjson.JSONObject;
/**
* <B>Description</B> Domain对象的父类,包含基本的一些属性 <br />
* <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
* 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
* <B>Company</B> 地利集团
* @createTime May 9, 2014 10:10:44 AM
* @author wujianjun
*/
public abstract class BaseDomain implements Serializable {
/**
*
*/
private static final long serialVersionUID = -1L;
protected Long id;
protected Timestamp created;
protected Timestamp modified;
protected Integer yn;
/**
* create instance of BaseDomain
* @createTime May 9, 2014 10:10:44 AM
* @author wujianjun
*/
public BaseDomain() {
}
/**
* get value of BaseDomain.id
* @return the id
* @createTime May 9, 2014 10:16:16 AM
* @author wujianjun
*/
public Long getId() {
return id;
}
/**
* get value of BaseDomain.yn
* @return the yn
* @createTime May 9, 2014 10:53:41 AM
* @author wujianjun
*/
public Integer getYn() {
return yn;
}
/**
* set value of BaseDomain.yn
* @param yn the yn to set
* @createTime May 9, 2014 10:53:41 AM
* @author wujianjun
*/
public void setYn(Integer yn) {
this.yn = yn;
}
/**
* set value of BaseDomain.id
* @param id the id to set
* @createTime May 9, 2014 10:16:16 AM
* @author wujianjun
*/
public void setId(Long id) {
this.id = id;
}
/**
* get value of BaseDomain.created
* @return the created
* @createTime May 9, 2014 10:16:16 AM
* @author wujianjun
*/
public Timestamp getCreated() {
return created;
}
/**
* set value of BaseDomain.created
* @param created the created to set
* @createTime May 9, 2014 10:16:16 AM
* @author wujianjun
*/
public void setCreated(Timestamp created) {
this.created = created;
}
/**
* get value of BaseDomain.modified
* @return the modified
* @createTime May 9, 2014 10:16:16 AM
* @author wujianjun
*/
public Timestamp getModified() {
return modified;
}
/**
* set value of BaseDomain.modified
* @param modified the modified to set
* @createTime May 9, 2014 10:16:16 AM
* @author wujianjun
*/
public void setModified(Timestamp modified) {
this.modified = modified;
}
/*
* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
/*
* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
BaseDomain other = (BaseDomain) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
}
/*
* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public abstract String toString();
/**
* 转换成JsonString
* @return json String
* @createTime May 9, 2014 10:17:15 AM
* @author wujianjun
*/
public String toJsonString() {
return JSONObject.toJSONString(this);
}
}