package com.jiuqi.mobile.nigo.comeclose.bean.base;
/**
*
* @类描述: 权限枚举类 <br/>
* @项目名称:comeclose <br/>
* @版权所有(c):JOIN-CHEER <br/>
* @作者:xuzhe <br/>
* @创建时间:2015-2-11上午11:02:39 <br/>
* @修改时间:<br/>
* @修改备注: <br/>
*/
public enum Authority {
/**
* 采集
*/
Acquisition(1, "采集", "a1"),
/**
* 报送
*/
Submission(2, "报送", "b1");
private int code;
private String name;
/**
* 唯一码,用于判断权限,现在只有jsp页面使用
*/
private String weiyima;
private Authority(int code, String name, String weiyima) {
this.code = code;
this.name = name;
this.weiyima = weiyima;
}
/**
*
* @方法描述: 通过code获取Authority枚举对象<br/>
* @项目名称:comeclose<br/>
* @类路径:com.jiuqi.mobile.nigo.comeclose.bean.base.Authority.java<br/>
* @版权所有(c):JOIN-CHEER <br/>
* @作者:xuzhe <br/>
* @创建时间:2014-11-25上午11:51:37 <br/>
* @修改时间:<br/>
* @修改备注: <br/>
* @返回类型:RoleCode<br/>
* @param code
* @return
*/
public Authority getRoleCodeByCode(int code) {
for (Authority authority : Authority.values()) {
if (authority.getCode() == code) {
return authority;
}
}
return null;
}
public int getCode() {
return code;
}
public String getName() {
return name;
}
public String getWeiyima() {
return weiyima;
}
}