1 package jp.sourceforge.ea2ddl.dao.bsentity;
\r
3 import java.io.Serializable;
\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
11 * The entity of t_method that the type is TABLE. <br />
\r
17 * Object_ID, Name, Scope, Type
\r
34 * [foreign-property]
\r
37 * [referrer-property]
\r
40 * @author DBFlute(AutoGenerator)
\r
42 public abstract class BsTMethod implements Entity, Serializable {
\r
44 // ===================================================================================
\r
47 /** Serial version UID. (Default) */
\r
48 private static final long serialVersionUID = 1L;
\r
50 // ===================================================================================
\r
53 // -----------------------------------------------------
\r
56 /** Object_ID: {UQ : INTEGER} */
\r
57 protected java.lang.Integer _objectId;
\r
59 /** Name: {UQ : VARCHAR(255)} */
\r
60 protected String _name;
\r
62 /** Scope: {VARCHAR(50)} */
\r
63 protected String _scope;
\r
65 /** Type: {VARCHAR(50)} */
\r
66 protected String _type;
\r
68 // -----------------------------------------------------
\r
71 /** The attribute of entity modified properties. (for S2Dao) */
\r
72 protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties();
\r
74 // ===================================================================================
\r
77 public String getTableDbName() {
\r
81 public String getTablePropertyName() { // as JavaBeansRule
\r
85 // ===================================================================================
\r
88 public DBMeta getDBMeta() {
\r
89 return DBMetaInstanceHandler.findDBMeta(getTableDbName());
\r
92 // ===================================================================================
\r
93 // Classification Classifying
\r
94 // ==========================
\r
95 // ===================================================================================
\r
96 // Classification Determination
\r
97 // ============================
\r
98 // ===================================================================================
\r
99 // Classification Name/Alias
\r
100 // =========================
\r
101 // ===================================================================================
\r
102 // Foreign Property
\r
103 // ================
\r
104 // ===================================================================================
\r
105 // Referrer Property
\r
106 // =================
\r
107 // ===================================================================================
\r
110 public boolean hasPrimaryKeyValue() {
\r
114 // ===================================================================================
\r
115 // Modified Properties
\r
116 // ===================
\r
117 public Set<String> getModifiedPropertyNames() {
\r
118 return _modifiedProperties.getPropertyNames();
\r
121 protected EntityModifiedProperties newEntityModifiedProperties() {
\r
122 return new EntityModifiedProperties();
\r
125 public void clearModifiedPropertyNames() {
\r
126 _modifiedProperties.clear();
\r
129 public boolean hasModification() {
\r
130 return !_modifiedProperties.isEmpty();
\r
133 // ===================================================================================
\r
137 * If the all-column value of the other is same as this one, returns true.
\r
138 * @param other Other entity. (Nullable)
\r
139 * @return Comparing result. If other is null, returns false.
\r
141 public boolean equals(Object other) {
\r
142 if (other == null || !(other instanceof BsTMethod)) { return false; }
\r
143 final BsTMethod otherEntity = (BsTMethod)other;
\r
144 if (!helpComparingValue(getObjectId(), otherEntity.getObjectId())) { return false; }
\r
145 if (!helpComparingValue(getName(), otherEntity.getName())) { return false; }
\r
146 if (!helpComparingValue(getScope(), otherEntity.getScope())) { return false; }
\r
147 if (!helpComparingValue(getType(), otherEntity.getType())) { return false; }
\r
151 protected boolean helpComparingValue(Object value1, Object value2) {
\r
152 if (value1 == null && value2 == null) { return true; }
\r
153 return value1 != null && value2 != null && value1.equals(value2);
\r
157 * Calculates hash-code from all columns.
\r
158 * @return Hash-code from all-columns.
\r
160 public int hashCode() {
\r
162 if (this.getObjectId() != null) { result = result + this.getObjectId().hashCode(); }
\r
163 if (this.getName() != null) { result = result + this.getName().hashCode(); }
\r
164 if (this.getScope() != null) { result = result + this.getScope().hashCode(); }
\r
165 if (this.getType() != null) { result = result + this.getType().hashCode(); }
\r
170 * @return The view string of columns. (NotNull)
\r
172 public String toString() {
\r
173 String delimiter = ",";
\r
174 StringBuilder sb = new StringBuilder();
\r
175 sb.append(delimiter).append(getObjectId());
\r
176 sb.append(delimiter).append(getName());
\r
177 sb.append(delimiter).append(getScope());
\r
178 sb.append(delimiter).append(getType());
\r
179 if (sb.length() > 0) { sb.delete(0, delimiter.length()); }
\r
180 sb.insert(0, "{").append("}");
\r
181 return sb.toString();
\r
184 // ===================================================================================
\r
188 * Object_ID: {UQ : INTEGER} <br />
\r
189 * @return The value of the column 'Object_ID'. (Nullable)
\r
191 public java.lang.Integer getObjectId() {
\r
196 * Object_ID: {UQ : INTEGER} <br />
\r
197 * @param objectId The value of the column 'Object_ID'. (Nullable)
\r
199 public void setObjectId(java.lang.Integer objectId) {
\r
200 _modifiedProperties.addPropertyName("objectId");
\r
201 this._objectId = objectId;
\r
205 * Name: {UQ : VARCHAR(255)} <br />
\r
206 * @return The value of the column 'Name'. (Nullable)
\r
208 public String getName() {
\r
213 * Name: {UQ : VARCHAR(255)} <br />
\r
214 * @param name The value of the column 'Name'. (Nullable)
\r
216 public void setName(String name) {
\r
217 _modifiedProperties.addPropertyName("name");
\r
222 * Scope: {VARCHAR(50)} <br />
\r
223 * @return The value of the column 'Scope'. (Nullable)
\r
225 public String getScope() {
\r
230 * Scope: {VARCHAR(50)} <br />
\r
231 * @param scope The value of the column 'Scope'. (Nullable)
\r
233 public void setScope(String scope) {
\r
234 _modifiedProperties.addPropertyName("scope");
\r
235 this._scope = scope;
\r
239 * Type: {VARCHAR(50)} <br />
\r
240 * @return The value of the column 'Type'. (Nullable)
\r
242 public String getType() {
\r
247 * Type: {VARCHAR(50)} <br />
\r
248 * @param type The value of the column 'Type'. (Nullable)
\r
250 public void setType(String type) {
\r
251 _modifiedProperties.addPropertyName("type");
\r