Role.java~13~
资源名称:shihua.rar [点击查看]
上传用户:zghglow
上传日期:2022-08-09
资源大小:27227k
文件大小:2k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
JavaScript
- package com.chinacannel.entity;
- import java.io.*;
- import java.util.*;
- import org.apache.commons.lang.builder.*;
- import com.chinacannel.xlchemical.service.AdminService;
- import com.chinacannel.common.DAOException;
- import org.apache.commons.lang.builder.*;
- import org.apache.commons.logging.*;
- import com.chinacannel.common.CommonDAO;
- public class Role implements Serializable {
- private static Log log = LogFactory.getLog(Category.class);
- private CommonDAO dao = new CommonDAO();
- private Long rol_ID;
- private String rol_Name;
- private String rol_FModel;
- private String rol_CModel;
- private Date rol_Time;
- private Long rol_Count = new Long(0);
- public boolean equals(Object other) {
- if (!(other instanceof Role))
- return false;
- Role castOther = (Role) other;
- return new EqualsBuilder()
- .append(this.getRol_ID(), castOther.getRol_ID())
- .isEquals();
- }
- public int hashCode() {
- return new HashCodeBuilder()
- .append(getRol_ID())
- .toHashCode();
- }
- public Long getRol_ID() {
- return rol_ID;
- }
- public String getRol_Name() {
- return rol_Name;
- }
- public String getRol_CModel() {
- return rol_CModel;
- }
- public String getRol_FModel() {
- return rol_FModel;
- }
- public Date getRol_Time() {
- return rol_Time;
- }
- public Long getRol_Count() {
- try {
- this.rol_Count = dao.getCountBySql(
- "select * from Admin as admin where admin.adm_RoleID=" +
- this.getRol_ID());
- } catch (DAOException ex) {
- log.error(ex.getMessage(), ex);
- return new Long(0);
- }
- return rol_Count;
- }
- public void setRol_ID(Long rol_ID) {
- this.rol_ID = rol_ID;
- }
- public void setRol_Name(String rol_Name) {
- this.rol_Name = rol_Name;
- }
- public void setRol_CModel(String rol_CModel) {
- this.rol_CModel = rol_CModel;
- }
- public void setRol_FModel(String rol_FModel) {
- this.rol_FModel = rol_FModel;
- }
- public void setRol_Time(Date rol_Time) {
- this.rol_Time = rol_Time;
- }
- }