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_secusergroup that the type is TABLE. <br />
\r
34 * [foreign-property]
\r
37 * [referrer-property]
\r
40 * @author DBFlute(AutoGenerator)
\r
42 public abstract class BsTSecusergroup 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 /** UserID: {UQ : VARCHAR(40)} */
\r
57 protected String _userid;
\r
59 /** GroupID: {UQ : VARCHAR(40)} */
\r
60 protected String _groupid;
\r
62 // -----------------------------------------------------
\r
65 /** The attribute of entity modified properties. (for S2Dao) */
\r
66 protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties();
\r
68 // ===================================================================================
\r
71 public String getTableDbName() {
\r
72 return "t_secusergroup";
\r
75 public String getTablePropertyName() { // as JavaBeansRule
\r
76 return "TSecusergroup";
\r
79 // ===================================================================================
\r
82 public DBMeta getDBMeta() {
\r
83 return DBMetaInstanceHandler.findDBMeta(getTableDbName());
\r
86 // ===================================================================================
\r
87 // Classification Classifying
\r
88 // ==========================
\r
89 // ===================================================================================
\r
90 // Classification Determination
\r
91 // ============================
\r
92 // ===================================================================================
\r
93 // Classification Name/Alias
\r
94 // =========================
\r
95 // ===================================================================================
\r
98 // ===================================================================================
\r
99 // Referrer Property
\r
100 // =================
\r
101 // ===================================================================================
\r
104 public boolean hasPrimaryKeyValue() {
\r
108 // ===================================================================================
\r
109 // Modified Properties
\r
110 // ===================
\r
111 public Set<String> getModifiedPropertyNames() {
\r
112 return _modifiedProperties.getPropertyNames();
\r
115 protected EntityModifiedProperties newEntityModifiedProperties() {
\r
116 return new EntityModifiedProperties();
\r
119 public void clearModifiedPropertyNames() {
\r
120 _modifiedProperties.clear();
\r
123 public boolean hasModification() {
\r
124 return !_modifiedProperties.isEmpty();
\r
127 // ===================================================================================
\r
131 * If the all-column value of the other is same as this one, returns true.
\r
132 * @param other Other entity. (Nullable)
\r
133 * @return Comparing result. If other is null, returns false.
\r
135 public boolean equals(Object other) {
\r
136 if (other == null || !(other instanceof BsTSecusergroup)) { return false; }
\r
137 final BsTSecusergroup otherEntity = (BsTSecusergroup)other;
\r
138 if (!helpComparingValue(getUserid(), otherEntity.getUserid())) { return false; }
\r
139 if (!helpComparingValue(getGroupid(), otherEntity.getGroupid())) { return false; }
\r
143 protected boolean helpComparingValue(Object value1, Object value2) {
\r
144 if (value1 == null && value2 == null) { return true; }
\r
145 return value1 != null && value2 != null && value1.equals(value2);
\r
149 * Calculates hash-code from all columns.
\r
150 * @return Hash-code from all-columns.
\r
152 public int hashCode() {
\r
154 if (this.getUserid() != null) { result = result + this.getUserid().hashCode(); }
\r
155 if (this.getGroupid() != null) { result = result + this.getGroupid().hashCode(); }
\r
160 * @return The view string of columns. (NotNull)
\r
162 public String toString() {
\r
163 String delimiter = ",";
\r
164 StringBuilder sb = new StringBuilder();
\r
165 sb.append(delimiter).append(getUserid());
\r
166 sb.append(delimiter).append(getGroupid());
\r
167 if (sb.length() > 0) { sb.delete(0, delimiter.length()); }
\r
168 sb.insert(0, "{").append("}");
\r
169 return sb.toString();
\r
172 // ===================================================================================
\r
176 * UserID: {UQ : VARCHAR(40)} <br />
\r
177 * @return The value of the column 'UserID'. (Nullable)
\r
179 public String getUserid() {
\r
184 * UserID: {UQ : VARCHAR(40)} <br />
\r
185 * @param userid The value of the column 'UserID'. (Nullable)
\r
187 public void setUserid(String userid) {
\r
188 _modifiedProperties.addPropertyName("userid");
\r
189 this._userid = userid;
\r
193 * GroupID: {UQ : VARCHAR(40)} <br />
\r
194 * @return The value of the column 'GroupID'. (Nullable)
\r
196 public String getGroupid() {
\r
201 * GroupID: {UQ : VARCHAR(40)} <br />
\r
202 * @param groupid The value of the column 'GroupID'. (Nullable)
\r
204 public void setGroupid(String groupid) {
\r
205 _modifiedProperties.addPropertyName("groupid");
\r
206 this._groupid = groupid;
\r