1 package jp.sourceforge.ea2ddl.dao.bsentity;
\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
11 * The entity of t_objectproperties(TABLE).
\r
17 * PropertyID, Object_ID, Property, Value, Notes, ea_guid
\r
34 * [foreign-property]
\r
37 * [referrer-property]
\r
40 * @author DBFlute(AutoGenerator)
\r
42 @SuppressWarnings("unchecked")
\r
43 public abstract class BsTObjectproperties implements Entity, java.io.Serializable {
\r
45 // ===================================================================================
\r
48 /** Serial version UID. (Default) */
\r
49 private static final long serialVersionUID = 1L;
\r
51 /** TABLE-Annotation for S2Dao. The value is t_objectproperties. */
\r
52 public static final String TABLE = "t_objectproperties";
\r
55 // ===================================================================================
\r
58 // -----------------------------------------------------
\r
61 /** The attribute of the column 'PropertyID'. {UQ : COUNTER : NotNull} */
\r
62 protected java.lang.Integer _propertyid;
\r
64 /** The attribute of the column 'Object_ID'. {INTEGER : FK to t_object} */
\r
65 protected java.lang.Integer _objectId;
\r
67 /** The attribute of the column 'Property'. {VARCHAR(255)} */
\r
68 protected String _property;
\r
70 /** The attribute of the column 'Value'. {VARCHAR(255)} */
\r
71 protected String _value;
\r
73 /** The attribute of the column 'Notes'. {LONGCHAR(2147483647)} */
\r
74 protected String _notes;
\r
76 /** The attribute of the column 'ea_guid'. {VARCHAR(40)} */
\r
77 protected String _eaGuid;
\r
79 // -----------------------------------------------------
\r
82 /** The attribute of entity modified properties. (for S2Dao) */
\r
83 protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties();
\r
85 // ===================================================================================
\r
88 public BsTObjectproperties() {
\r
91 // ===================================================================================
\r
94 public String getTableDbName() {
\r
95 return "t_objectproperties";
\r
98 public String getTablePropertyName() {// as JavaBeansRule
\r
99 return "TObjectproperties";
\r
102 // ===================================================================================
\r
105 public DBMeta getDBMeta() {
\r
106 return DBMetaInstanceHandler.findDBMeta(getTableDbName());
\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
127 /** The entity of foreign property 'TObject'. */
\r
128 protected TObject _parentTObject;
\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
134 public TObject getTObject() {
\r
135 return _parentTObject;
\r
139 * Set the entity of foreign property 'TObject'.
\r
140 * @param tObject The entity of foreign property 'TObject'. (Nullable)
\r
142 public void setTObject(TObject tObject) {
\r
143 _parentTObject = tObject;
\r
146 // ===================================================================================
\r
147 // Referrer Property
\r
148 // =================
\r
150 // ===================================================================================
\r
153 public boolean hasPrimaryKeyValue() {
\r
157 // ===================================================================================
\r
158 // Modified Properties
\r
159 // ===================
\r
160 public Set<String> getModifiedPropertyNames() {
\r
161 return _modifiedProperties.getPropertyNames();
\r
164 protected EntityModifiedProperties newEntityModifiedProperties() {
\r
165 return new EntityModifiedProperties();
\r
168 public void clearModifiedPropertyNames() {
\r
169 _modifiedProperties.clear();
\r
172 public boolean hasModification() {
\r
173 return !_modifiedProperties.isEmpty();
\r
176 // ===================================================================================
\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
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
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
202 * Calculates hash-code from all columns.
\r
203 * @return Hash-code from all-columns.
\r
205 public int hashCode() {
\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
217 * @return The view string of columns. (NotNull)
\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
233 // ===================================================================================
\r
237 /** The column annotation for S2Dao. {UQ : COUNTER : NotNull} */
\r
238 public static final String propertyid_COLUMN = "PropertyID";
\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
245 public java.lang.Integer getPropertyid() {
\r
246 return _propertyid;
\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
254 public void setPropertyid(java.lang.Integer propertyid) {
\r
255 _modifiedProperties.addPropertyName("propertyid");
\r
256 this._propertyid = propertyid;
\r
259 /** The column annotation for S2Dao. {INTEGER : FK to t_object} */
\r
260 public static final String objectId_COLUMN = "Object_ID";
\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
267 public java.lang.Integer getObjectId() {
\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
276 public void setObjectId(java.lang.Integer objectId) {
\r
277 _modifiedProperties.addPropertyName("objectId");
\r
278 this._objectId = objectId;
\r
281 /** The column annotation for S2Dao. {VARCHAR(255)} */
\r
282 public static final String property_COLUMN = "Property";
\r
285 * Get the value of the column 'Property'. <br />
\r
287 * @return The value of the column 'Property'. (Nullable)
\r
289 public String getProperty() {
\r
294 * Set the value of the column 'Property'. <br />
\r
296 * @param property The value of the column 'Property'. (Nullable)
\r
298 public void setProperty(String property) {
\r
299 _modifiedProperties.addPropertyName("property");
\r
300 this._property = property;
\r
303 /** The column annotation for S2Dao. {VARCHAR(255)} */
\r
304 public static final String value_COLUMN = "Value";
\r
307 * Get the value of the column 'Value'. <br />
\r
309 * @return The value of the column 'Value'. (Nullable)
\r
311 public String getValue() {
\r
316 * Set the value of the column 'Value'. <br />
\r
318 * @param value The value of the column 'Value'. (Nullable)
\r
320 public void setValue(String value) {
\r
321 _modifiedProperties.addPropertyName("value");
\r
322 this._value = value;
\r
325 /** The column annotation for S2Dao. {LONGCHAR(2147483647)} */
\r
326 public static final String notes_COLUMN = "Notes";
\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
333 public String getNotes() {
\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
342 public void setNotes(String notes) {
\r
343 _modifiedProperties.addPropertyName("notes");
\r
344 this._notes = notes;
\r
347 /** The column annotation for S2Dao. {VARCHAR(40)} */
\r
348 public static final String eaGuid_COLUMN = "ea_guid";
\r
351 * Get the value of the column 'ea_guid'. <br />
\r
353 * @return The value of the column 'ea_guid'. (Nullable)
\r
355 public String getEaGuid() {
\r
360 * Set the value of the column 'ea_guid'. <br />
\r
362 * @param eaGuid The value of the column 'ea_guid'. (Nullable)
\r
364 public void setEaGuid(String eaGuid) {
\r
365 _modifiedProperties.addPropertyName("eaGuid");
\r
366 this._eaGuid = eaGuid;
\r