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_files that the type is TABLE. <br />
\r
17 * FileID, AppliesTo, Category, Name, File, Notes, FileDate, FileSize
\r
34 * [foreign-property]
\r
37 * [referrer-property]
\r
40 * @author DBFlute(AutoGenerator)
\r
42 public abstract class BsTFiles 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 /** FileID: {UQ : VARCHAR(50)} */
\r
57 protected String _fileid;
\r
59 /** AppliesTo: {VARCHAR(50)} */
\r
60 protected String _appliesto;
\r
62 /** Category: {VARCHAR(100)} */
\r
63 protected String _category;
\r
65 /** Name: {VARCHAR(150)} */
\r
66 protected String _name;
\r
68 /** File: {VARCHAR(255)} */
\r
69 protected String _file;
\r
71 /** Notes: {LONGCHAR(2147483647)} */
\r
72 protected String _notes;
\r
74 /** FileDate: {DATETIME} */
\r
75 protected java.sql.Timestamp _filedate;
\r
77 /** FileSize: {INTEGER} */
\r
78 protected java.lang.Integer _filesize;
\r
80 // -----------------------------------------------------
\r
83 /** The attribute of entity modified properties. (for S2Dao) */
\r
84 protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties();
\r
86 // ===================================================================================
\r
89 public String getTableDbName() {
\r
93 public String getTablePropertyName() { // as JavaBeansRule
\r
97 // ===================================================================================
\r
100 public DBMeta getDBMeta() {
\r
101 return DBMetaInstanceHandler.findDBMeta(getTableDbName());
\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
122 public boolean hasPrimaryKeyValue() {
\r
126 // ===================================================================================
\r
127 // Modified Properties
\r
128 // ===================
\r
129 public Set<String> getModifiedPropertyNames() {
\r
130 return _modifiedProperties.getPropertyNames();
\r
133 protected EntityModifiedProperties newEntityModifiedProperties() {
\r
134 return new EntityModifiedProperties();
\r
137 public void clearModifiedPropertyNames() {
\r
138 _modifiedProperties.clear();
\r
141 public boolean hasModification() {
\r
142 return !_modifiedProperties.isEmpty();
\r
145 // ===================================================================================
\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
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
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
173 * Calculates hash-code from all columns.
\r
174 * @return Hash-code from all-columns.
\r
176 public int hashCode() {
\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
190 * @return The view string of columns. (NotNull)
\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
208 // ===================================================================================
\r
212 * FileID: {UQ : VARCHAR(50)} <br />
\r
213 * @return The value of the column 'FileID'. (Nullable)
\r
215 public String getFileid() {
\r
220 * FileID: {UQ : VARCHAR(50)} <br />
\r
221 * @param fileid The value of the column 'FileID'. (Nullable)
\r
223 public void setFileid(String fileid) {
\r
224 _modifiedProperties.addPropertyName("fileid");
\r
225 this._fileid = fileid;
\r
229 * AppliesTo: {VARCHAR(50)} <br />
\r
230 * @return The value of the column 'AppliesTo'. (Nullable)
\r
232 public String getAppliesto() {
\r
237 * AppliesTo: {VARCHAR(50)} <br />
\r
238 * @param appliesto The value of the column 'AppliesTo'. (Nullable)
\r
240 public void setAppliesto(String appliesto) {
\r
241 _modifiedProperties.addPropertyName("appliesto");
\r
242 this._appliesto = appliesto;
\r
246 * Category: {VARCHAR(100)} <br />
\r
247 * @return The value of the column 'Category'. (Nullable)
\r
249 public String getCategory() {
\r
254 * Category: {VARCHAR(100)} <br />
\r
255 * @param category The value of the column 'Category'. (Nullable)
\r
257 public void setCategory(String category) {
\r
258 _modifiedProperties.addPropertyName("category");
\r
259 this._category = category;
\r
263 * Name: {VARCHAR(150)} <br />
\r
264 * @return The value of the column 'Name'. (Nullable)
\r
266 public String getName() {
\r
271 * Name: {VARCHAR(150)} <br />
\r
272 * @param name The value of the column 'Name'. (Nullable)
\r
274 public void setName(String name) {
\r
275 _modifiedProperties.addPropertyName("name");
\r
280 * File: {VARCHAR(255)} <br />
\r
281 * @return The value of the column 'File'. (Nullable)
\r
283 public String getFile() {
\r
288 * File: {VARCHAR(255)} <br />
\r
289 * @param file The value of the column 'File'. (Nullable)
\r
291 public void setFile(String file) {
\r
292 _modifiedProperties.addPropertyName("file");
\r
297 * Notes: {LONGCHAR(2147483647)} <br />
\r
298 * @return The value of the column 'Notes'. (Nullable)
\r
300 public String getNotes() {
\r
305 * Notes: {LONGCHAR(2147483647)} <br />
\r
306 * @param notes The value of the column 'Notes'. (Nullable)
\r
308 public void setNotes(String notes) {
\r
309 _modifiedProperties.addPropertyName("notes");
\r
310 this._notes = notes;
\r
314 * FileDate: {DATETIME} <br />
\r
315 * @return The value of the column 'FileDate'. (Nullable)
\r
317 public java.sql.Timestamp getFiledate() {
\r
322 * FileDate: {DATETIME} <br />
\r
323 * @param filedate The value of the column 'FileDate'. (Nullable)
\r
325 public void setFiledate(java.sql.Timestamp filedate) {
\r
326 _modifiedProperties.addPropertyName("filedate");
\r
327 this._filedate = filedate;
\r
331 * FileSize: {INTEGER} <br />
\r
332 * @return The value of the column 'FileSize'. (Nullable)
\r
334 public java.lang.Integer getFilesize() {
\r
339 * FileSize: {INTEGER} <br />
\r
340 * @param filesize The value of the column 'FileSize'. (Nullable)
\r
342 public void setFilesize(java.lang.Integer filesize) {
\r
343 _modifiedProperties.addPropertyName("filesize");
\r
344 this._filesize = filesize;
\r