OSDN Git Service

DBFlute-0.9.3に更新
[ea2ddl/ea2ddl.git] / ea2ddl-dao / src / main / java / jp / sourceforge / ea2ddl / dao / bsentity / BsTFiles.java
1 package jp.sourceforge.ea2ddl.dao.bsentity;\r
2 \r
3 import java.io.Serializable;\r
4 import java.util.*;\r
5 \r
6 import org.seasar.dbflute.Entity;\r
7 import org.seasar.dbflute.dbmeta.DBMeta;\r
8 import jp.sourceforge.ea2ddl.dao.allcommon.DBMetaInstanceHandler;\r
9 \r
10 /**\r
11  * The entity of t_files that the type is TABLE. <br />\r
12  * <pre>\r
13  * [primary-key]\r
14  *     \r
15  * \r
16  * [column]\r
17  *     FileID, AppliesTo, Category, Name, File, Notes, FileDate, FileSize\r
18  * \r
19  * [sequence]\r
20  *     \r
21  * \r
22  * [identity]\r
23  *     \r
24  * \r
25  * [version-no]\r
26  *     \r
27  * \r
28  * [foreign-table]\r
29  *     \r
30  * \r
31  * [referrer-table]\r
32  *     \r
33  * \r
34  * [foreign-property]\r
35  *     \r
36  * \r
37  * [referrer-property]\r
38  *     \r
39  * </pre>\r
40  * @author DBFlute(AutoGenerator)\r
41  */\r
42 public abstract class BsTFiles implements Entity, 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     // ===================================================================================\r
51     //                                                                           Attribute\r
52     //                                                                           =========\r
53     // -----------------------------------------------------\r
54     //                                                Column\r
55     //                                                ------\r
56     /** FileID: {UQ : VARCHAR(50)} */\r
57     protected String _fileid;\r
58 \r
59     /** AppliesTo: {VARCHAR(50)} */\r
60     protected String _appliesto;\r
61 \r
62     /** Category: {VARCHAR(100)} */\r
63     protected String _category;\r
64 \r
65     /** Name: {VARCHAR(150)} */\r
66     protected String _name;\r
67 \r
68     /** File: {VARCHAR(255)} */\r
69     protected String _file;\r
70 \r
71     /** Notes: {LONGCHAR(2147483647)} */\r
72     protected String _notes;\r
73 \r
74     /** FileDate: {DATETIME} */\r
75     protected java.sql.Timestamp _filedate;\r
76 \r
77     /** FileSize: {INTEGER} */\r
78     protected java.lang.Integer _filesize;\r
79 \r
80     // -----------------------------------------------------\r
81     //                                              Internal\r
82     //                                              --------\r
83     /** The attribute of entity modified properties. (for S2Dao) */\r
84     protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties();\r
85     \r
86     // ===================================================================================\r
87     //                                                                          Table Name\r
88     //                                                                          ==========\r
89     public String getTableDbName() {\r
90         return "t_files";\r
91     }\r
92 \r
93     public String getTablePropertyName() { // as JavaBeansRule\r
94         return "TFiles";\r
95     }\r
96 \r
97     // ===================================================================================\r
98     //                                                                              DBMeta\r
99     //                                                                              ======\r
100     public DBMeta getDBMeta() {\r
101         return DBMetaInstanceHandler.findDBMeta(getTableDbName());\r
102     }\r
103 \r
104     // ===================================================================================\r
105     //                                                          Classification Classifying\r
106     //                                                          ==========================\r
107     // ===================================================================================\r
108     //                                                        Classification Determination\r
109     //                                                        ============================\r
110     // ===================================================================================\r
111     //                                                           Classification Name/Alias\r
112     //                                                           =========================\r
113     // ===================================================================================\r
114     //                                                                    Foreign Property\r
115     //                                                                    ================\r
116     // ===================================================================================\r
117     //                                                                   Referrer Property\r
118     //                                                                   =================\r
119     // ===================================================================================\r
120     //                                                                       Determination\r
121     //                                                                       =============\r
122     public boolean hasPrimaryKeyValue() {\r
123         return false;\r
124     }\r
125 \r
126     // ===================================================================================\r
127     //                                                                 Modified Properties\r
128     //                                                                 ===================\r
129     public Set<String> getModifiedPropertyNames() {\r
130         return _modifiedProperties.getPropertyNames();\r
131     }\r
132 \r
133     protected EntityModifiedProperties newEntityModifiedProperties() {\r
134         return new EntityModifiedProperties();\r
135     }\r
136 \r
137     public void clearModifiedPropertyNames() {\r
138         _modifiedProperties.clear();\r
139     }\r
140 \r
141     public boolean hasModification() {\r
142         return !_modifiedProperties.isEmpty();\r
143     }\r
144 \r
145     // ===================================================================================\r
146     //                                                                      Basic Override\r
147     //                                                                      ==============\r
148     /**\r
149      * If the all-column value of the other is same as this one, returns true.\r
150      * @param other Other entity. (Nullable)\r
151      * @return Comparing result. If other is null, returns false.\r
152      */\r
153     public boolean equals(Object other) {\r
154         if (other == null || !(other instanceof BsTFiles)) { return false; }\r
155         final BsTFiles otherEntity = (BsTFiles)other;\r
156         if (!helpComparingValue(getFileid(), otherEntity.getFileid())) { return false; }\r
157         if (!helpComparingValue(getAppliesto(), otherEntity.getAppliesto())) { return false; }\r
158         if (!helpComparingValue(getCategory(), otherEntity.getCategory())) { return false; }\r
159         if (!helpComparingValue(getName(), otherEntity.getName())) { return false; }\r
160         if (!helpComparingValue(getFile(), otherEntity.getFile())) { return false; }\r
161         if (!helpComparingValue(getNotes(), otherEntity.getNotes())) { return false; }\r
162         if (!helpComparingValue(getFiledate(), otherEntity.getFiledate())) { return false; }\r
163         if (!helpComparingValue(getFilesize(), otherEntity.getFilesize())) { return false; }\r
164         return true;\r
165     }\r
166 \r
167     protected boolean helpComparingValue(Object value1, Object value2) {\r
168         if (value1 == null && value2 == null) { return true; }\r
169         return value1 != null && value2 != null && value1.equals(value2);\r
170     }\r
171 \r
172     /**\r
173      * Calculates hash-code from all columns.\r
174      * @return Hash-code from all-columns.\r
175      */\r
176     public int hashCode() {\r
177         int result = 17;\r
178         if (this.getFileid() != null) { result = result + this.getFileid().hashCode(); }\r
179         if (this.getAppliesto() != null) { result = result + this.getAppliesto().hashCode(); }\r
180         if (this.getCategory() != null) { result = result + this.getCategory().hashCode(); }\r
181         if (this.getName() != null) { result = result + this.getName().hashCode(); }\r
182         if (this.getFile() != null) { result = result + this.getFile().hashCode(); }\r
183         if (this.getNotes() != null) { result = result + this.getNotes().hashCode(); }\r
184         if (this.getFiledate() != null) { result = result + this.getFiledate().hashCode(); }\r
185         if (this.getFilesize() != null) { result = result + this.getFilesize().hashCode(); }\r
186         return result;\r
187     }\r
188 \r
189     /**\r
190      * @return The view string of columns. (NotNull)\r
191      */\r
192     public String toString() {\r
193         String delimiter = ",";\r
194         StringBuilder sb = new StringBuilder();\r
195         sb.append(delimiter).append(getFileid());\r
196         sb.append(delimiter).append(getAppliesto());\r
197         sb.append(delimiter).append(getCategory());\r
198         sb.append(delimiter).append(getName());\r
199         sb.append(delimiter).append(getFile());\r
200         sb.append(delimiter).append(getNotes());\r
201         sb.append(delimiter).append(getFiledate());\r
202         sb.append(delimiter).append(getFilesize());\r
203         if (sb.length() > 0) { sb.delete(0, delimiter.length()); }\r
204         sb.insert(0, "{").append("}");\r
205         return sb.toString();\r
206     }\r
207 \r
208     // ===================================================================================\r
209     //                                                                            Accessor\r
210     //                                                                            ========\r
211     /**\r
212      * FileID: {UQ : VARCHAR(50)} <br />\r
213      * @return The value of the column 'FileID'. (Nullable)\r
214      */\r
215     public String getFileid() {\r
216         return _fileid;\r
217     }\r
218 \r
219     /**\r
220      * FileID: {UQ : VARCHAR(50)} <br />\r
221      * @param fileid The value of the column 'FileID'. (Nullable)\r
222      */\r
223     public void setFileid(String fileid) {\r
224         _modifiedProperties.addPropertyName("fileid");\r
225         this._fileid = fileid;\r
226     }\r
227 \r
228     /**\r
229      * AppliesTo: {VARCHAR(50)} <br />\r
230      * @return The value of the column 'AppliesTo'. (Nullable)\r
231      */\r
232     public String getAppliesto() {\r
233         return _appliesto;\r
234     }\r
235 \r
236     /**\r
237      * AppliesTo: {VARCHAR(50)} <br />\r
238      * @param appliesto The value of the column 'AppliesTo'. (Nullable)\r
239      */\r
240     public void setAppliesto(String appliesto) {\r
241         _modifiedProperties.addPropertyName("appliesto");\r
242         this._appliesto = appliesto;\r
243     }\r
244 \r
245     /**\r
246      * Category: {VARCHAR(100)} <br />\r
247      * @return The value of the column 'Category'. (Nullable)\r
248      */\r
249     public String getCategory() {\r
250         return _category;\r
251     }\r
252 \r
253     /**\r
254      * Category: {VARCHAR(100)} <br />\r
255      * @param category The value of the column 'Category'. (Nullable)\r
256      */\r
257     public void setCategory(String category) {\r
258         _modifiedProperties.addPropertyName("category");\r
259         this._category = category;\r
260     }\r
261 \r
262     /**\r
263      * Name: {VARCHAR(150)} <br />\r
264      * @return The value of the column 'Name'. (Nullable)\r
265      */\r
266     public String getName() {\r
267         return _name;\r
268     }\r
269 \r
270     /**\r
271      * Name: {VARCHAR(150)} <br />\r
272      * @param name The value of the column 'Name'. (Nullable)\r
273      */\r
274     public void setName(String name) {\r
275         _modifiedProperties.addPropertyName("name");\r
276         this._name = name;\r
277     }\r
278 \r
279     /**\r
280      * File: {VARCHAR(255)} <br />\r
281      * @return The value of the column 'File'. (Nullable)\r
282      */\r
283     public String getFile() {\r
284         return _file;\r
285     }\r
286 \r
287     /**\r
288      * File: {VARCHAR(255)} <br />\r
289      * @param file The value of the column 'File'. (Nullable)\r
290      */\r
291     public void setFile(String file) {\r
292         _modifiedProperties.addPropertyName("file");\r
293         this._file = file;\r
294     }\r
295 \r
296     /**\r
297      * Notes: {LONGCHAR(2147483647)} <br />\r
298      * @return The value of the column 'Notes'. (Nullable)\r
299      */\r
300     public String getNotes() {\r
301         return _notes;\r
302     }\r
303 \r
304     /**\r
305      * Notes: {LONGCHAR(2147483647)} <br />\r
306      * @param notes The value of the column 'Notes'. (Nullable)\r
307      */\r
308     public void setNotes(String notes) {\r
309         _modifiedProperties.addPropertyName("notes");\r
310         this._notes = notes;\r
311     }\r
312 \r
313     /**\r
314      * FileDate: {DATETIME} <br />\r
315      * @return The value of the column 'FileDate'. (Nullable)\r
316      */\r
317     public java.sql.Timestamp getFiledate() {\r
318         return _filedate;\r
319     }\r
320 \r
321     /**\r
322      * FileDate: {DATETIME} <br />\r
323      * @param filedate The value of the column 'FileDate'. (Nullable)\r
324      */\r
325     public void setFiledate(java.sql.Timestamp filedate) {\r
326         _modifiedProperties.addPropertyName("filedate");\r
327         this._filedate = filedate;\r
328     }\r
329 \r
330     /**\r
331      * FileSize: {INTEGER} <br />\r
332      * @return The value of the column 'FileSize'. (Nullable)\r
333      */\r
334     public java.lang.Integer getFilesize() {\r
335         return _filesize;\r
336     }\r
337 \r
338     /**\r
339      * FileSize: {INTEGER} <br />\r
340      * @param filesize The value of the column 'FileSize'. (Nullable)\r
341      */\r
342     public void setFilesize(java.lang.Integer filesize) {\r
343         _modifiedProperties.addPropertyName("filesize");\r
344         this._filesize = filesize;\r
345     }\r
346 }\r