OSDN Git Service

EAからOracle用DDLが吐けるようになった
[ea2ddl/ea2ddl.git] / ea2ddl-dao / src / main / java / jp / sourceforge / ea2ddl / dao / bsentity / BsTObjectproperties.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 import jp.sourceforge.ea2ddl.dao.exentity.*;\r
9 \r
10 /**\r
11  * The entity of t_objectproperties(TABLE).\r
12  * <pre>\r
13  * [primary-key]\r
14  *     \r
15  * \r
16  * [column]\r
17  *     PropertyID, Object_ID, Property, Value, Notes, ea_guid\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  *     t_object\r
30  * \r
31  * [referrer-table]\r
32  *     \r
33  * \r
34  * [foreign-property]\r
35  *     tObject\r
36  * \r
37  * [referrer-property]\r
38  *     \r
39  * </pre>\r
40  * @author DBFlute(AutoGenerator)\r
41  */
42 @SuppressWarnings("unchecked")\r
43 public abstract class BsTObjectproperties implements Entity, java.io.Serializable {\r
44 \r
45     // ===================================================================================\r
46     //                                                                          Definition\r
47     //                                                                          ==========\r
48     /** Serial version UID. (Default) */\r
49     private static final long serialVersionUID = 1L;\r
50 \r
51     /** TABLE-Annotation for S2Dao. The value is t_objectproperties. */\r
52     public static final String TABLE = "t_objectproperties";\r
53 \r
54 \r
55     // ===================================================================================\r
56     //                                                                           Attribute\r
57     //                                                                           =========\r
58     // -----------------------------------------------------\r
59     //                                                Column\r
60     //                                                ------\r
61     /** The attribute of the column 'PropertyID'. {UQ : COUNTER : NotNull} */\r
62     protected java.lang.Integer _propertyid;\r
63 \r
64     /** The attribute of the column 'Object_ID'. {INTEGER : FK to t_object} */\r
65     protected java.lang.Integer _objectId;\r
66 \r
67     /** The attribute of the column 'Property'. {VARCHAR(255)} */\r
68     protected String _property;\r
69 \r
70     /** The attribute of the column 'Value'. {VARCHAR(255)} */\r
71     protected String _value;\r
72 \r
73     /** The attribute of the column 'Notes'. {LONGCHAR(2147483647)} */\r
74     protected String _notes;\r
75 \r
76     /** The attribute of the column 'ea_guid'. {VARCHAR(40)} */\r
77     protected String _eaGuid;\r
78 \r
79     // -----------------------------------------------------\r
80     //                                              Internal\r
81     //                                              --------\r
82     /** The attribute of entity modified properties. (for S2Dao) */\r
83     protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties();\r
84     \r
85     // ===================================================================================\r
86     //                                                                         Constructor\r
87     //                                                                         ===========\r
88     public BsTObjectproperties() {\r
89     }\r
90 \r
91     // ===================================================================================\r
92     //                                                                          Table Name\r
93     //                                                                          ==========\r
94     public String getTableDbName() {\r
95         return "t_objectproperties";\r
96     }\r
97 \r
98     public String getTablePropertyName() {// as JavaBeansRule\r
99         return "TObjectproperties";\r
100     }\r
101 \r
102     // ===================================================================================\r
103     //                                                                              DBMeta\r
104     //                                                                              ======\r
105     public DBMeta getDBMeta() {\r
106         return DBMetaInstanceHandler.findDBMeta(getTableDbName());\r
107     }\r
108 \r
109     // ===================================================================================\r
110     //                                                          Classification Classifying\r
111     //                                                          ==========================\r
112     // ===================================================================================\r
113     //                                                        Classification Determination\r
114     //                                                        ============================\r
115     // ===================================================================================\r
116     //                                                           Classification Name/Alias\r
117     //                                                           =========================\r
118     // ===================================================================================\r
119     //                                                                    Foreign Property\r
120     //                                                                    ================\r
121     // /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\r
122     //   Foreign Property = [TObject]\r
123     // * * * * * * * * */\r
124     public static final int TObject_RELNO = 0;\r
125     public static final String TObject_RELKEYS = "Object_ID:Object_ID";\r
126 \r
127     /** The entity of foreign property 'TObject'. */\r
128     protected TObject _parentTObject;\r
129 \r
130     /**\r
131      * Get the entity of foreign property 'TObject'. {without lazy-load}\r
132      * @return The entity of foreign property 'TObject'. (Nullable: If the foreign key does not have 'NotNull' constraint, please check null.)\r
133      */\r
134     public TObject getTObject() {\r
135         return _parentTObject;\r
136     }\r
137 \r
138     /**\r
139      * Set the entity of foreign property 'TObject'.\r
140      * @param tObject The entity of foreign property 'TObject'. (Nullable)\r
141      */\r
142     public void setTObject(TObject tObject) {\r
143         _parentTObject = tObject;\r
144     }\r
145 \r
146     // ===================================================================================\r
147     //                                                                   Referrer Property\r
148     //                                                                   =================\r
149 \r
150     // ===================================================================================\r
151     //                                                                       Determination\r
152     //                                                                       =============\r
153     public boolean hasPrimaryKeyValue() {\r
154         return false;\r
155     }\r
156 \r
157     // ===================================================================================\r
158     //                                                                 Modified Properties\r
159     //                                                                 ===================\r
160     public Set<String> getModifiedPropertyNames() {\r
161         return _modifiedProperties.getPropertyNames();\r
162     }\r
163 \r
164     protected EntityModifiedProperties newEntityModifiedProperties() {\r
165         return new EntityModifiedProperties();\r
166     }\r
167 \r
168     public void clearModifiedPropertyNames() {\r
169         _modifiedProperties.clear();\r
170     }\r
171 \r
172     public boolean hasModification() {\r
173         return !_modifiedProperties.isEmpty();\r
174     }\r
175 \r
176     // ===================================================================================\r
177     //                                                                      Basic Override\r
178     //                                                                      ==============\r
179     /**\r
180      * If the all-column value of the other is same as this one, returns true.\r
181      * @param other Other entity. (Nullable)\r
182      * @return Comparing result. If other is null, returns false.\r
183      */\r
184     public boolean equals(Object other) {\r
185         if (other == null || !(other instanceof BsTObjectproperties)) { return false; }\r
186         final BsTObjectproperties otherEntity = (BsTObjectproperties)other;\r
187         if (!helpComparingValue(getPropertyid(), otherEntity.getPropertyid())) { return false; }\r
188         if (!helpComparingValue(getObjectId(), otherEntity.getObjectId())) { return false; }\r
189         if (!helpComparingValue(getProperty(), otherEntity.getProperty())) { return false; }\r
190         if (!helpComparingValue(getValue(), otherEntity.getValue())) { return false; }\r
191         if (!helpComparingValue(getNotes(), otherEntity.getNotes())) { return false; }\r
192         if (!helpComparingValue(getEaGuid(), otherEntity.getEaGuid())) { return false; }\r
193         return true;\r
194     }\r
195 \r
196     protected boolean helpComparingValue(Object value1, Object value2) {\r
197         if (value1 == null && value2 == null) { return true; }\r
198         return value1 != null && value2 != null && value1.equals(value2);\r
199     }\r
200 \r
201     /**\r
202      * Calculates hash-code from all columns.\r
203      * @return Hash-code from all-columns.\r
204      */\r
205     public int hashCode() {\r
206         int result = 17;\r
207         if (this.getPropertyid() != null) { result = result + this.getPropertyid().hashCode(); }\r
208         if (this.getObjectId() != null) { result = result + this.getObjectId().hashCode(); }\r
209         if (this.getProperty() != null) { result = result + this.getProperty().hashCode(); }\r
210         if (this.getValue() != null) { result = result + this.getValue().hashCode(); }\r
211         if (this.getNotes() != null) { result = result + this.getNotes().hashCode(); }\r
212         if (this.getEaGuid() != null) { result = result + this.getEaGuid().hashCode(); }\r
213         return result;\r
214     }\r
215 \r
216     /**\r
217      * @return The view string of columns. (NotNull)\r
218      */\r
219     public String toString() {\r
220         String delimiter = ",";\r
221         StringBuilder sb = new StringBuilder();\r
222         sb.append(delimiter).append(getPropertyid());\r
223         sb.append(delimiter).append(getObjectId());\r
224         sb.append(delimiter).append(getProperty());\r
225         sb.append(delimiter).append(getValue());\r
226         sb.append(delimiter).append(getNotes());\r
227         sb.append(delimiter).append(getEaGuid());\r
228         if (sb.length() > 0) { sb.delete(0, delimiter.length()); }\r
229         sb.insert(0, "{").append("}");\r
230         return sb.toString();\r
231     }\r
232 \r
233     // ===================================================================================\r
234     //                                                                            Accessor\r
235     //                                                                            ========\r
236 \r
237     /** The column annotation for S2Dao. {UQ : COUNTER : NotNull} */\r
238     public static final String propertyid_COLUMN = "PropertyID";\r
239 \r
240     /**\r
241      * Get the value of the column 'PropertyID'. <br />\r
242      * {UQ : COUNTER : NotNull}\r
243      * @return The value of the column 'PropertyID'. (Nullable)\r
244      */\r
245     public java.lang.Integer getPropertyid() {\r
246         return _propertyid;\r
247     }\r
248 \r
249     /**\r
250      * Set the value of the column 'PropertyID'. <br />\r
251      * {UQ : COUNTER : NotNull}\r
252      * @param propertyid The value of the column 'PropertyID'. (Nullable)\r
253      */\r
254     public void setPropertyid(java.lang.Integer propertyid) {\r
255         _modifiedProperties.addPropertyName("propertyid");\r
256         this._propertyid = propertyid;\r
257     }\r
258 \r
259     /** The column annotation for S2Dao. {INTEGER : FK to t_object} */\r
260     public static final String objectId_COLUMN = "Object_ID";\r
261 \r
262     /**\r
263      * Get the value of the column 'Object_ID'. <br />\r
264      * {INTEGER : FK to t_object}\r
265      * @return The value of the column 'Object_ID'. (Nullable)\r
266      */\r
267     public java.lang.Integer getObjectId() {\r
268         return _objectId;\r
269     }\r
270 \r
271     /**\r
272      * Set the value of the column 'Object_ID'. <br />\r
273      * {INTEGER : FK to t_object}\r
274      * @param objectId The value of the column 'Object_ID'. (Nullable)\r
275      */\r
276     public void setObjectId(java.lang.Integer objectId) {\r
277         _modifiedProperties.addPropertyName("objectId");\r
278         this._objectId = objectId;\r
279     }\r
280 \r
281     /** The column annotation for S2Dao. {VARCHAR(255)} */\r
282     public static final String property_COLUMN = "Property";\r
283 \r
284     /**\r
285      * Get the value of the column 'Property'. <br />\r
286      * {VARCHAR(255)}\r
287      * @return The value of the column 'Property'. (Nullable)\r
288      */\r
289     public String getProperty() {\r
290         return _property;\r
291     }\r
292 \r
293     /**\r
294      * Set the value of the column 'Property'. <br />\r
295      * {VARCHAR(255)}\r
296      * @param property The value of the column 'Property'. (Nullable)\r
297      */\r
298     public void setProperty(String property) {\r
299         _modifiedProperties.addPropertyName("property");\r
300         this._property = property;\r
301     }\r
302 \r
303     /** The column annotation for S2Dao. {VARCHAR(255)} */\r
304     public static final String value_COLUMN = "Value";\r
305 \r
306     /**\r
307      * Get the value of the column 'Value'. <br />\r
308      * {VARCHAR(255)}\r
309      * @return The value of the column 'Value'. (Nullable)\r
310      */\r
311     public String getValue() {\r
312         return _value;\r
313     }\r
314 \r
315     /**\r
316      * Set the value of the column 'Value'. <br />\r
317      * {VARCHAR(255)}\r
318      * @param value The value of the column 'Value'. (Nullable)\r
319      */\r
320     public void setValue(String value) {\r
321         _modifiedProperties.addPropertyName("value");\r
322         this._value = value;\r
323     }\r
324 \r
325     /** The column annotation for S2Dao. {LONGCHAR(2147483647)} */\r
326     public static final String notes_COLUMN = "Notes";\r
327 \r
328     /**\r
329      * Get the value of the column 'Notes'. <br />\r
330      * {LONGCHAR(2147483647)}\r
331      * @return The value of the column 'Notes'. (Nullable)\r
332      */\r
333     public String getNotes() {\r
334         return _notes;\r
335     }\r
336 \r
337     /**\r
338      * Set the value of the column 'Notes'. <br />\r
339      * {LONGCHAR(2147483647)}\r
340      * @param notes The value of the column 'Notes'. (Nullable)\r
341      */\r
342     public void setNotes(String notes) {\r
343         _modifiedProperties.addPropertyName("notes");\r
344         this._notes = notes;\r
345     }\r
346 \r
347     /** The column annotation for S2Dao. {VARCHAR(40)} */\r
348     public static final String eaGuid_COLUMN = "ea_guid";\r
349 \r
350     /**\r
351      * Get the value of the column 'ea_guid'. <br />\r
352      * {VARCHAR(40)}\r
353      * @return The value of the column 'ea_guid'. (Nullable)\r
354      */\r
355     public String getEaGuid() {\r
356         return _eaGuid;\r
357     }\r
358 \r
359     /**\r
360      * Set the value of the column 'ea_guid'. <br />\r
361      * {VARCHAR(40)}\r
362      * @param eaGuid The value of the column 'ea_guid'. (Nullable)\r
363      */\r
364     public void setEaGuid(String eaGuid) {\r
365         _modifiedProperties.addPropertyName("eaGuid");\r
366         this._eaGuid = eaGuid;\r
367     }\r
368 \r
369 }\r