📄 userrole.java
字号:
package com.relationinfo.model;
import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
/**
* This class is used to represent available roles in the database.</p>
*
* <p><a href="UserRole.java.html"><i>www.relationinfo.com</i></a></p>
*
* @author Jeff cao
*
* @struts.form extends="BaseForm"
* @hibernate.class table="userrole"
*/
public class UserRole extends BaseObject implements Serializable {
private static final long serialVersionUID = 3690197650654049848L;
private String rolecode;
private String userid;
public UserRole() {}
public UserRole(String rolecode,String userid) {
this.rolecode = rolecode;
this.userid=userid;
}
//~ Methods ================================================================
/**
* Returns the rolecode.
* @return String
*
* @struts.validator type="required"
* @hibernate.id column="rolecode" length="20"
* generator-class="assigned" unsaved-value="version"
*/
public String getRolecode() {
return this.rolecode;
}
/**
* Returns the userid.
* @return String
*
* @struts.validator type="required"
* @hibernate.property column="userid"
*/
public String getUserid() {
return this.userid;
}
public void setRolecode(String rolecode) {
this.rolecode = rolecode;
}
public void setUserid(String userid) {
this.userid = userid;
}
/**
* Generated using Commonclipse (http://commonclipse.sf.net)
*/
public boolean equals(Object object) {
if (!(object instanceof Role)) {
return false;
}
UserRole rhs = (UserRole) object;
return new EqualsBuilder().append(this.userid, rhs.userid)
.append(this.rolecode, rhs.rolecode).isEquals();
}
/**
* Generated using Commonclipse (http://commonclipse.sf.net)
*/
public int hashCode() {
return new HashCodeBuilder(1156335803, 987569255).append(
this.userid).append(this.rolecode).toHashCode();
}
/**
* Generated using Commonclipse (http://commonclipse.sf.net)
*/
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("rolecode", this.rolecode).append("userid",
this.userid).toString();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -