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
10 * The entity of t_seclocks(TABLE).
\r
16 * UserID, GroupID, EntityType, EntityID, Timestamp, LockType
\r
33 * [foreign-property]
\r
36 * [referrer-property]
\r
39 * @author DBFlute(AutoGenerator)
\r
41 @SuppressWarnings("unchecked")
\r
42 public abstract class BsTSeclocks implements Entity, java.io.Serializable {
\r
44 // ===================================================================================
\r
47 /** Serial version UID. (Default) */
\r
48 private static final long serialVersionUID = 1L;
\r
50 /** TABLE-Annotation for S2Dao. The value is t_seclocks. */
\r
51 public static final String TABLE = "t_seclocks";
\r
54 // ===================================================================================
\r
57 // -----------------------------------------------------
\r
60 /** The attribute of the column 'UserID'. {VARCHAR(40)} */
\r
61 protected String _userid;
\r
63 /** The attribute of the column 'GroupID'. {VARCHAR(40)} */
\r
64 protected String _groupid;
\r
66 /** The attribute of the column 'EntityType'. {VARCHAR(32)} */
\r
67 protected String _entitytype;
\r
69 /** The attribute of the column 'EntityID'. {UQ : VARCHAR(40)} */
\r
70 protected String _entityid;
\r
72 /** The attribute of the column 'Timestamp'. {DATETIME} */
\r
73 protected java.sql.Timestamp _timestamp;
\r
75 /** The attribute of the column 'LockType'. {VARCHAR(255)} */
\r
76 protected String _locktype;
\r
78 // -----------------------------------------------------
\r
81 /** The attribute of entity modified properties. (for S2Dao) */
\r
82 protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties();
\r
84 // ===================================================================================
\r
87 public BsTSeclocks() {
\r
90 // ===================================================================================
\r
93 public String getTableDbName() {
\r
94 return "t_seclocks";
\r
97 public String getTablePropertyName() {// as JavaBeansRule
\r
101 // ===================================================================================
\r
104 public DBMeta getDBMeta() {
\r
105 return DBMetaInstanceHandler.findDBMeta(getTableDbName());
\r
108 // ===================================================================================
\r
109 // Classification Classifying
\r
110 // ==========================
\r
111 // ===================================================================================
\r
112 // Classification Determination
\r
113 // ============================
\r
114 // ===================================================================================
\r
115 // Classification Name/Alias
\r
116 // =========================
\r
117 // ===================================================================================
\r
118 // Foreign Property
\r
119 // ================
\r
120 // ===================================================================================
\r
121 // Referrer Property
\r
122 // =================
\r
124 // ===================================================================================
\r
127 public boolean hasPrimaryKeyValue() {
\r
131 // ===================================================================================
\r
132 // Modified Properties
\r
133 // ===================
\r
134 public Set<String> getModifiedPropertyNames() {
\r
135 return _modifiedProperties.getPropertyNames();
\r
138 protected EntityModifiedProperties newEntityModifiedProperties() {
\r
139 return new EntityModifiedProperties();
\r
142 public void clearModifiedPropertyNames() {
\r
143 _modifiedProperties.clear();
\r
146 public boolean hasModification() {
\r
147 return !_modifiedProperties.isEmpty();
\r
150 // ===================================================================================
\r
154 * If the all-column value of the other is same as this one, returns true.
\r
155 * @param other Other entity. (Nullable)
\r
156 * @return Comparing result. If other is null, returns false.
\r
158 public boolean equals(Object other) {
\r
159 if (other == null || !(other instanceof BsTSeclocks)) { return false; }
\r
160 final BsTSeclocks otherEntity = (BsTSeclocks)other;
\r
161 if (!helpComparingValue(getUserid(), otherEntity.getUserid())) { return false; }
\r
162 if (!helpComparingValue(getGroupid(), otherEntity.getGroupid())) { return false; }
\r
163 if (!helpComparingValue(getEntitytype(), otherEntity.getEntitytype())) { return false; }
\r
164 if (!helpComparingValue(getEntityid(), otherEntity.getEntityid())) { return false; }
\r
165 if (!helpComparingValue(getTimestamp(), otherEntity.getTimestamp())) { return false; }
\r
166 if (!helpComparingValue(getLocktype(), otherEntity.getLocktype())) { return false; }
\r
170 protected boolean helpComparingValue(Object value1, Object value2) {
\r
171 if (value1 == null && value2 == null) { return true; }
\r
172 return value1 != null && value2 != null && value1.equals(value2);
\r
176 * Calculates hash-code from all columns.
\r
177 * @return Hash-code from all-columns.
\r
179 public int hashCode() {
\r
181 if (this.getUserid() != null) { result = result + this.getUserid().hashCode(); }
\r
182 if (this.getGroupid() != null) { result = result + this.getGroupid().hashCode(); }
\r
183 if (this.getEntitytype() != null) { result = result + this.getEntitytype().hashCode(); }
\r
184 if (this.getEntityid() != null) { result = result + this.getEntityid().hashCode(); }
\r
185 if (this.getTimestamp() != null) { result = result + this.getTimestamp().hashCode(); }
\r
186 if (this.getLocktype() != null) { result = result + this.getLocktype().hashCode(); }
\r
191 * @return The view string of columns. (NotNull)
\r
193 public String toString() {
\r
194 String delimiter = ",";
\r
195 StringBuilder sb = new StringBuilder();
\r
196 sb.append(delimiter).append(getUserid());
\r
197 sb.append(delimiter).append(getGroupid());
\r
198 sb.append(delimiter).append(getEntitytype());
\r
199 sb.append(delimiter).append(getEntityid());
\r
200 sb.append(delimiter).append(getTimestamp());
\r
201 sb.append(delimiter).append(getLocktype());
\r
202 if (sb.length() > 0) { sb.delete(0, delimiter.length()); }
\r
203 sb.insert(0, "{").append("}");
\r
204 return sb.toString();
\r
207 // ===================================================================================
\r
211 /** The column annotation for S2Dao. {VARCHAR(40)} */
\r
212 public static final String userid_COLUMN = "UserID";
\r
215 * Get the value of the column 'UserID'. <br />
\r
217 * @return The value of the column 'UserID'. (Nullable)
\r
219 public String getUserid() {
\r
224 * Set the value of the column 'UserID'. <br />
\r
226 * @param userid The value of the column 'UserID'. (Nullable)
\r
228 public void setUserid(String userid) {
\r
229 _modifiedProperties.addPropertyName("userid");
\r
230 this._userid = userid;
\r
233 /** The column annotation for S2Dao. {VARCHAR(40)} */
\r
234 public static final String groupid_COLUMN = "GroupID";
\r
237 * Get the value of the column 'GroupID'. <br />
\r
239 * @return The value of the column 'GroupID'. (Nullable)
\r
241 public String getGroupid() {
\r
246 * Set the value of the column 'GroupID'. <br />
\r
248 * @param groupid The value of the column 'GroupID'. (Nullable)
\r
250 public void setGroupid(String groupid) {
\r
251 _modifiedProperties.addPropertyName("groupid");
\r
252 this._groupid = groupid;
\r
255 /** The column annotation for S2Dao. {VARCHAR(32)} */
\r
256 public static final String entitytype_COLUMN = "EntityType";
\r
259 * Get the value of the column 'EntityType'. <br />
\r
261 * @return The value of the column 'EntityType'. (Nullable)
\r
263 public String getEntitytype() {
\r
264 return _entitytype;
\r
268 * Set the value of the column 'EntityType'. <br />
\r
270 * @param entitytype The value of the column 'EntityType'. (Nullable)
\r
272 public void setEntitytype(String entitytype) {
\r
273 _modifiedProperties.addPropertyName("entitytype");
\r
274 this._entitytype = entitytype;
\r
277 /** The column annotation for S2Dao. {UQ : VARCHAR(40)} */
\r
278 public static final String entityid_COLUMN = "EntityID";
\r
281 * Get the value of the column 'EntityID'. <br />
\r
282 * {UQ : VARCHAR(40)}
\r
283 * @return The value of the column 'EntityID'. (Nullable)
\r
285 public String getEntityid() {
\r
290 * Set the value of the column 'EntityID'. <br />
\r
291 * {UQ : VARCHAR(40)}
\r
292 * @param entityid The value of the column 'EntityID'. (Nullable)
\r
294 public void setEntityid(String entityid) {
\r
295 _modifiedProperties.addPropertyName("entityid");
\r
296 this._entityid = entityid;
\r
299 /** The column annotation for S2Dao. {DATETIME} */
\r
300 public static final String timestamp_COLUMN = "Timestamp";
\r
303 * Get the value of the column 'Timestamp'. <br />
\r
305 * @return The value of the column 'Timestamp'. (Nullable)
\r
307 public java.sql.Timestamp getTimestamp() {
\r
312 * Set the value of the column 'Timestamp'. <br />
\r
314 * @param timestamp The value of the column 'Timestamp'. (Nullable)
\r
316 public void setTimestamp(java.sql.Timestamp timestamp) {
\r
317 _modifiedProperties.addPropertyName("timestamp");
\r
318 this._timestamp = timestamp;
\r
321 /** The column annotation for S2Dao. {VARCHAR(255)} */
\r
322 public static final String locktype_COLUMN = "LockType";
\r
325 * Get the value of the column 'LockType'. <br />
\r
327 * @return The value of the column 'LockType'. (Nullable)
\r
329 public String getLocktype() {
\r
334 * Set the value of the column 'LockType'. <br />
\r
336 * @param locktype The value of the column 'LockType'. (Nullable)
\r
338 public void setLocktype(String locktype) {
\r
339 _modifiedProperties.addPropertyName("locktype");
\r
340 this._locktype = locktype;
\r