OSDN Git Service

"https://svn.sourceforge.jp/svnroot/ea2ddl" にプロジェクト "ea2ddl-dao" を共用
[ea2ddl/ea2ddl.git] / ea2ddl-dao / src / main / java / jp / sourceforge / ea2ddl / dao / bsentity / BsTSeclocks.java
1 package jp.sourceforge.ea2ddl.dao.bsentity;\r
2 \r
3 import java.util.*;\r
4     \r
5 import jp.sourceforge.ea2ddl.dao.allcommon.Entity;\r
6 import jp.sourceforge.ea2ddl.dao.allcommon.dbmeta.DBMeta;\r
7 import jp.sourceforge.ea2ddl.dao.allcommon.dbmeta.DBMetaInstanceHandler;\r
8 \r
9 /**\r
10  * The entity of t_seclocks(TABLE).\r
11  * <pre>\r
12  * [primary-key]\r
13  *     \r
14  * \r
15  * [column]\r
16  *     UserID, GroupID, EntityType, EntityID, Timestamp, LockType\r
17  * \r
18  * [sequence]\r
19  *     \r
20  * \r
21  * [identity]\r
22  *     \r
23  * \r
24  * [version-no]\r
25  *     \r
26  * \r
27  * [foreign-table]\r
28  *     \r
29  * \r
30  * [referrer-table]\r
31  *     \r
32  * \r
33  * [foreign-property]\r
34  *     \r
35  * \r
36  * [referrer-property]\r
37  *     \r
38  * </pre>\r
39  * @author DBFlute(AutoGenerator)\r
40  */
41 @SuppressWarnings("unchecked")\r
42 public abstract class BsTSeclocks implements Entity, java.io.Serializable {\r
43 \r
44     // ===================================================================================\r
45     //                                                                          Definition\r
46     //                                                                          ==========\r
47     /** Serial version UID. (Default) */\r
48     private static final long serialVersionUID = 1L;\r
49 \r
50     /** TABLE-Annotation for S2Dao. The value is t_seclocks. */\r
51     public static final String TABLE = "t_seclocks";\r
52 \r
53 \r
54     // ===================================================================================\r
55     //                                                                           Attribute\r
56     //                                                                           =========\r
57     // -----------------------------------------------------\r
58     //                                                Column\r
59     //                                                ------\r
60     /** The attribute of the column 'UserID'. {VARCHAR(40)} */\r
61     protected String _userid;\r
62 \r
63     /** The attribute of the column 'GroupID'. {VARCHAR(40)} */\r
64     protected String _groupid;\r
65 \r
66     /** The attribute of the column 'EntityType'. {VARCHAR(32)} */\r
67     protected String _entitytype;\r
68 \r
69     /** The attribute of the column 'EntityID'. {UQ : VARCHAR(40)} */\r
70     protected String _entityid;\r
71 \r
72     /** The attribute of the column 'Timestamp'. {DATETIME} */\r
73     protected java.sql.Timestamp _timestamp;\r
74 \r
75     /** The attribute of the column 'LockType'. {VARCHAR(255)} */\r
76     protected String _locktype;\r
77 \r
78     // -----------------------------------------------------\r
79     //                                              Internal\r
80     //                                              --------\r
81     /** The attribute of entity modified properties. (for S2Dao) */\r
82     protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties();\r
83     \r
84     // ===================================================================================\r
85     //                                                                         Constructor\r
86     //                                                                         ===========\r
87     public BsTSeclocks() {\r
88     }\r
89 \r
90     // ===================================================================================\r
91     //                                                                          Table Name\r
92     //                                                                          ==========\r
93     public String getTableDbName() {\r
94         return "t_seclocks";\r
95     }\r
96 \r
97     public String getTablePropertyName() {// as JavaBeansRule\r
98         return "TSeclocks";\r
99     }\r
100 \r
101     // ===================================================================================\r
102     //                                                                              DBMeta\r
103     //                                                                              ======\r
104     public DBMeta getDBMeta() {\r
105         return DBMetaInstanceHandler.findDBMeta(getTableDbName());\r
106     }\r
107 \r
108     // ===================================================================================\r
109     //                                                          Classification Classifying\r
110     //                                                          ==========================\r
111     // ===================================================================================\r
112     //                                                        Classification Determination\r
113     //                                                        ============================\r
114     // ===================================================================================\r
115     //                                                           Classification Name/Alias\r
116     //                                                           =========================\r
117     // ===================================================================================\r
118     //                                                                    Foreign Property\r
119     //                                                                    ================\r
120     // ===================================================================================\r
121     //                                                                   Referrer Property\r
122     //                                                                   =================\r
123 \r
124     // ===================================================================================\r
125     //                                                                       Determination\r
126     //                                                                       =============\r
127     public boolean hasPrimaryKeyValue() {\r
128         return false;\r
129     }\r
130 \r
131     // ===================================================================================\r
132     //                                                                 Modified Properties\r
133     //                                                                 ===================\r
134     public Set<String> getModifiedPropertyNames() {\r
135         return _modifiedProperties.getPropertyNames();\r
136     }\r
137 \r
138     protected EntityModifiedProperties newEntityModifiedProperties() {\r
139         return new EntityModifiedProperties();\r
140     }\r
141 \r
142     public void clearModifiedPropertyNames() {\r
143         _modifiedProperties.clear();\r
144     }\r
145 \r
146     public boolean hasModification() {\r
147         return !_modifiedProperties.isEmpty();\r
148     }\r
149 \r
150     // ===================================================================================\r
151     //                                                                      Basic Override\r
152     //                                                                      ==============\r
153     /**\r
154      * If the all-column value of the other is same as this one, returns true.\r
155      * @param other Other entity. (Nullable)\r
156      * @return Comparing result. If other is null, returns false.\r
157      */\r
158     public boolean equals(Object other) {\r
159         if (other == null || !(other instanceof BsTSeclocks)) { return false; }\r
160         final BsTSeclocks otherEntity = (BsTSeclocks)other;\r
161         if (!helpComparingValue(getUserid(), otherEntity.getUserid())) { return false; }\r
162         if (!helpComparingValue(getGroupid(), otherEntity.getGroupid())) { return false; }\r
163         if (!helpComparingValue(getEntitytype(), otherEntity.getEntitytype())) { return false; }\r
164         if (!helpComparingValue(getEntityid(), otherEntity.getEntityid())) { return false; }\r
165         if (!helpComparingValue(getTimestamp(), otherEntity.getTimestamp())) { return false; }\r
166         if (!helpComparingValue(getLocktype(), otherEntity.getLocktype())) { return false; }\r
167         return true;\r
168     }\r
169 \r
170     protected boolean helpComparingValue(Object value1, Object value2) {\r
171         if (value1 == null && value2 == null) { return true; }\r
172         return value1 != null && value2 != null && value1.equals(value2);\r
173     }\r
174 \r
175     /**\r
176      * Calculates hash-code from all columns.\r
177      * @return Hash-code from all-columns.\r
178      */\r
179     public int hashCode() {\r
180         int result = 17;\r
181         if (this.getUserid() != null) { result = result + this.getUserid().hashCode(); }\r
182         if (this.getGroupid() != null) { result = result + this.getGroupid().hashCode(); }\r
183         if (this.getEntitytype() != null) { result = result + this.getEntitytype().hashCode(); }\r
184         if (this.getEntityid() != null) { result = result + this.getEntityid().hashCode(); }\r
185         if (this.getTimestamp() != null) { result = result + this.getTimestamp().hashCode(); }\r
186         if (this.getLocktype() != null) { result = result + this.getLocktype().hashCode(); }\r
187         return result;\r
188     }\r
189 \r
190     /**\r
191      * @return The view string of columns. (NotNull)\r
192      */\r
193     public String toString() {\r
194         String delimiter = ",";\r
195         StringBuilder sb = new StringBuilder();\r
196         sb.append(delimiter).append(getUserid());\r
197         sb.append(delimiter).append(getGroupid());\r
198         sb.append(delimiter).append(getEntitytype());\r
199         sb.append(delimiter).append(getEntityid());\r
200         sb.append(delimiter).append(getTimestamp());\r
201         sb.append(delimiter).append(getLocktype());\r
202         if (sb.length() > 0) { sb.delete(0, delimiter.length()); }\r
203         sb.insert(0, "{").append("}");\r
204         return sb.toString();\r
205     }\r
206 \r
207     // ===================================================================================\r
208     //                                                                            Accessor\r
209     //                                                                            ========\r
210 \r
211     /** The column annotation for S2Dao. {VARCHAR(40)} */\r
212     public static final String userid_COLUMN = "UserID";\r
213 \r
214     /**\r
215      * Get the value of the column 'UserID'. <br />\r
216      * {VARCHAR(40)}\r
217      * @return The value of the column 'UserID'. (Nullable)\r
218      */\r
219     public String getUserid() {\r
220         return _userid;\r
221     }\r
222 \r
223     /**\r
224      * Set the value of the column 'UserID'. <br />\r
225      * {VARCHAR(40)}\r
226      * @param userid The value of the column 'UserID'. (Nullable)\r
227      */\r
228     public void setUserid(String userid) {\r
229         _modifiedProperties.addPropertyName("userid");\r
230         this._userid = userid;\r
231     }\r
232 \r
233     /** The column annotation for S2Dao. {VARCHAR(40)} */\r
234     public static final String groupid_COLUMN = "GroupID";\r
235 \r
236     /**\r
237      * Get the value of the column 'GroupID'. <br />\r
238      * {VARCHAR(40)}\r
239      * @return The value of the column 'GroupID'. (Nullable)\r
240      */\r
241     public String getGroupid() {\r
242         return _groupid;\r
243     }\r
244 \r
245     /**\r
246      * Set the value of the column 'GroupID'. <br />\r
247      * {VARCHAR(40)}\r
248      * @param groupid The value of the column 'GroupID'. (Nullable)\r
249      */\r
250     public void setGroupid(String groupid) {\r
251         _modifiedProperties.addPropertyName("groupid");\r
252         this._groupid = groupid;\r
253     }\r
254 \r
255     /** The column annotation for S2Dao. {VARCHAR(32)} */\r
256     public static final String entitytype_COLUMN = "EntityType";\r
257 \r
258     /**\r
259      * Get the value of the column 'EntityType'. <br />\r
260      * {VARCHAR(32)}\r
261      * @return The value of the column 'EntityType'. (Nullable)\r
262      */\r
263     public String getEntitytype() {\r
264         return _entitytype;\r
265     }\r
266 \r
267     /**\r
268      * Set the value of the column 'EntityType'. <br />\r
269      * {VARCHAR(32)}\r
270      * @param entitytype The value of the column 'EntityType'. (Nullable)\r
271      */\r
272     public void setEntitytype(String entitytype) {\r
273         _modifiedProperties.addPropertyName("entitytype");\r
274         this._entitytype = entitytype;\r
275     }\r
276 \r
277     /** The column annotation for S2Dao. {UQ : VARCHAR(40)} */\r
278     public static final String entityid_COLUMN = "EntityID";\r
279 \r
280     /**\r
281      * Get the value of the column 'EntityID'. <br />\r
282      * {UQ : VARCHAR(40)}\r
283      * @return The value of the column 'EntityID'. (Nullable)\r
284      */\r
285     public String getEntityid() {\r
286         return _entityid;\r
287     }\r
288 \r
289     /**\r
290      * Set the value of the column 'EntityID'. <br />\r
291      * {UQ : VARCHAR(40)}\r
292      * @param entityid The value of the column 'EntityID'. (Nullable)\r
293      */\r
294     public void setEntityid(String entityid) {\r
295         _modifiedProperties.addPropertyName("entityid");\r
296         this._entityid = entityid;\r
297     }\r
298 \r
299     /** The column annotation for S2Dao. {DATETIME} */\r
300     public static final String timestamp_COLUMN = "Timestamp";\r
301 \r
302     /**\r
303      * Get the value of the column 'Timestamp'. <br />\r
304      * {DATETIME}\r
305      * @return The value of the column 'Timestamp'. (Nullable)\r
306      */\r
307     public java.sql.Timestamp getTimestamp() {\r
308         return _timestamp;\r
309     }\r
310 \r
311     /**\r
312      * Set the value of the column 'Timestamp'. <br />\r
313      * {DATETIME}\r
314      * @param timestamp The value of the column 'Timestamp'. (Nullable)\r
315      */\r
316     public void setTimestamp(java.sql.Timestamp timestamp) {\r
317         _modifiedProperties.addPropertyName("timestamp");\r
318         this._timestamp = timestamp;\r
319     }\r
320 \r
321     /** The column annotation for S2Dao. {VARCHAR(255)} */\r
322     public static final String locktype_COLUMN = "LockType";\r
323 \r
324     /**\r
325      * Get the value of the column 'LockType'. <br />\r
326      * {VARCHAR(255)}\r
327      * @return The value of the column 'LockType'. (Nullable)\r
328      */\r
329     public String getLocktype() {\r
330         return _locktype;\r
331     }\r
332 \r
333     /**\r
334      * Set the value of the column 'LockType'. <br />\r
335      * {VARCHAR(255)}\r
336      * @param locktype The value of the column 'LockType'. (Nullable)\r
337      */\r
338     public void setLocktype(String locktype) {\r
339         _modifiedProperties.addPropertyName("locktype");\r
340         this._locktype = locktype;\r
341     }\r
342 \r
343 }\r