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_glossary that the type is TABLE. <br />
\r
17 * Term, Type, Meaning, GlossaryID
\r
34 * [foreign-property]
\r
37 * [referrer-property]
\r
40 * @author DBFlute(AutoGenerator)
\r
42 public abstract class BsTGlossary 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 /** Term: {UQ : VARCHAR(255)} */
\r
57 protected String _term;
\r
59 /** Type: {VARCHAR(255)} */
\r
60 protected String _type;
\r
62 /** Meaning: {LONGCHAR(2147483647)} */
\r
63 protected String _meaning;
\r
65 /** GlossaryID: {NotNull : COUNTER} */
\r
66 protected java.lang.Integer _glossaryid;
\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
78 return "t_glossary";
\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 BsTGlossary)) { return false; }
\r
143 final BsTGlossary otherEntity = (BsTGlossary)other;
\r
144 if (!helpComparingValue(getTerm(), otherEntity.getTerm())) { return false; }
\r
145 if (!helpComparingValue(getType(), otherEntity.getType())) { return false; }
\r
146 if (!helpComparingValue(getMeaning(), otherEntity.getMeaning())) { return false; }
\r
147 if (!helpComparingValue(getGlossaryid(), otherEntity.getGlossaryid())) { 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.getTerm() != null) { result = result + this.getTerm().hashCode(); }
\r
163 if (this.getType() != null) { result = result + this.getType().hashCode(); }
\r
164 if (this.getMeaning() != null) { result = result + this.getMeaning().hashCode(); }
\r
165 if (this.getGlossaryid() != null) { result = result + this.getGlossaryid().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(getTerm());
\r
176 sb.append(delimiter).append(getType());
\r
177 sb.append(delimiter).append(getMeaning());
\r
178 sb.append(delimiter).append(getGlossaryid());
\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 * Term: {UQ : VARCHAR(255)} <br />
\r
189 * @return The value of the column 'Term'. (Nullable)
\r
191 public String getTerm() {
\r
196 * Term: {UQ : VARCHAR(255)} <br />
\r
197 * @param term The value of the column 'Term'. (Nullable)
\r
199 public void setTerm(String term) {
\r
200 _modifiedProperties.addPropertyName("term");
\r
205 * Type: {VARCHAR(255)} <br />
\r
206 * @return The value of the column 'Type'. (Nullable)
\r
208 public String getType() {
\r
213 * Type: {VARCHAR(255)} <br />
\r
214 * @param type The value of the column 'Type'. (Nullable)
\r
216 public void setType(String type) {
\r
217 _modifiedProperties.addPropertyName("type");
\r
222 * Meaning: {LONGCHAR(2147483647)} <br />
\r
223 * @return The value of the column 'Meaning'. (Nullable)
\r
225 public String getMeaning() {
\r
230 * Meaning: {LONGCHAR(2147483647)} <br />
\r
231 * @param meaning The value of the column 'Meaning'. (Nullable)
\r
233 public void setMeaning(String meaning) {
\r
234 _modifiedProperties.addPropertyName("meaning");
\r
235 this._meaning = meaning;
\r
239 * GlossaryID: {NotNull : COUNTER} <br />
\r
240 * @return The value of the column 'GlossaryID'. (Nullable)
\r
242 public java.lang.Integer getGlossaryid() {
\r
243 return _glossaryid;
\r
247 * GlossaryID: {NotNull : COUNTER} <br />
\r
248 * @param glossaryid The value of the column 'GlossaryID'. (Nullable)
\r
250 public void setGlossaryid(java.lang.Integer glossaryid) {
\r
251 _modifiedProperties.addPropertyName("glossaryid");
\r
252 this._glossaryid = glossaryid;
\r