package com.blueland.bpm.identity.model;

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;
import com.blueland.bpm.common.base.BaseEntity;

public class Userrole extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	//date formats
	
	//columns START
    /**
     * ??ID       db_column: ROLE_ID 
     */	
	
	private String roleId;
    /**
     * ??ID       db_column: USER_ID 
     */	
	
	private String userId;
    /**
     * ??       db_column: REMARK 
     */	
	
	private String remark;
    /**
     *        db_column: USER_CODE 
     */	
	
	private String userCode;
    /**
     *        db_column: USER_NAME 
     */	
	
	private String userName;
    /**
     *        db_column: ORG_ID 
     */	
	
	private String orgId;
    /**
     *        db_column: ORG_NAME 
     */	
	
	private String orgName;
	//columns END
	private String roleAppId;
	public Userrole(){
	}

	public Userrole(
		String roleId,
		String userId
	){
		this.roleId = roleId;
		this.userId = userId;
	}
	
	public String getRoleAppId() {
		return roleAppId;
	}

	public void setRoleAppId(String roleAppId) {
		this.roleAppId = roleAppId;
	}

	public void setRoleId(String value) {
		this.roleId = value;
	}
	
	public String getRoleId() {
		return this.roleId;
	}
	public void setUserId(String value) {
		this.userId = value;
	}
	
	public String getUserId() {
		return this.userId;
	}
	public void setRemark(String value) {
		this.remark = value;
	}
	
	public String getRemark() {
		return this.remark;
	}
	public void setUserCode(String value) {
		this.userCode = value;
	}
	
	public String getUserCode() {
		return this.userCode;
	}
	public void setUserName(String value) {
		this.userName = value;
	}
	
	public String getUserName() {
		return this.userName;
	}
	public void setOrgId(String value) {
		this.orgId = value;
	}
	
	public String getOrgId() {
		return this.orgId;
	}
	public void setOrgName(String value) {
		this.orgName = value;
	}
	
	public String getOrgName() {
		return this.orgName;
	}

	public String toString() {
		return ToStringBuilder.reflectionToString(this,ToStringStyle.MULTI_LINE_STYLE);
	}

	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getRoleId())
			.append(getUserId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Userrole == false) return false;
		if(this == obj) return true;
		Userrole other = (Userrole)obj;
		return new EqualsBuilder()
			.append(getRoleId(),other.getRoleId())
			.append(getUserId(),other.getUserId())
			.isEquals();
	}
}

