/*
 * 该类为数据库表实体类
 */
package com.blueland.bpm.identity.model;

import java.util.Date;

import javax.persistence.Id;

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;


/**
 * @author lw
 * @version 1.0
 * @since  
 */


public class Role extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	//columns START
    /**
     * 角色ID       数据字段: ROLE_ID 
     */ 	
	private String roleId;
    /**
     * 角色名称       数据字段: ROLE_NAME 
     */ 	
	private String roleName;
    
    /**
     * 角色排序号       数据字段: ROLE_SORT 
     */ 	
	private Integer roleSort;
    /**
     * 角色类型，如全局角色:GLOBAL、业务系统角色：BIZ、其他:OTHER       数据字段: ROLE_TYPE 
     */ 	
	private String roleType;
	/**
     * 角色所属系统，所有:ALL、工作流:WF、门户:MH、内容发布:TCM     数据字段: ROLE_APP_ID
     */ 
	private String roleAppId;
    /**
     * 角色状态,（启用:QY、未启用:WQY）      数据字段: ROLE_STATUS 
     */ 	
	private String roleStatus;
	 /**
     * 角色创建时间     数据字段: ROLE_CREATE_TIME 
     */ 
	private Date roleCreateTime;
	/**
     * 角色创建者     数据字段: ROLE_CREATETOR 
     */ 
	private String roleCreator;
    /**
     * 备注       数据字段: REMARK 
     */ 	
	private String remark;


	public Role(){
	}


	@Id
	public String getRoleId() {
		return this.roleId;
	}
	
	public void setRoleId(String value) {
		this.roleId = value;
	}
	
	public String getRoleName() {
		return this.roleName;
	}
	
	public void setRoleName(String value) {
		this.roleName = value;
	}
	
	public Integer getRoleSort() {
		return this.roleSort;
	}
	
	public void setRoleSort(Integer value) {
		this.roleSort = value;
	}
	
	public String getRoleType() {
		return this.roleType;
	}
	
	public void setRoleType(String roleType) {
		this.roleType = roleType;
	}
	
	public String getRoleStatus() {
		return this.roleStatus;
	}
	
	public void setRoleStatus(String value) {
		this.roleStatus = value;
	}
	
	public String getRemark() {
		return this.remark;
	}
	
	public void setRemark(String value) {
		this.remark = value;
	}
	


	public Date getRoleCreateTime() {
		return roleCreateTime;
	}

	public void setRoleCreateTime(Date roleCreateTime) {
		this.roleCreateTime = roleCreateTime;
	}

	public String getRoleAppId() {
		return roleAppId;
	}

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

	public String getRoleCreator() {
		return roleCreator;
	}


	public void setRoleCreator(String roleCreator) {
		this.roleCreator = roleCreator;
	}


	public String toString() {
		return ToStringBuilder.reflectionToString(this,ToStringStyle.MULTI_LINE_STYLE);
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getRoleId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Role == false) return false;
		if(this == obj) return true;
		Role other = (Role)obj;
		return new EqualsBuilder()
			.append(getRoleId(),other.getRoleId())
			.isEquals();
	}
}

