oa办公系统

源代码在线查看: role.java

软件大小: 14932 K
上传用户: lemon_zc1949
关键词:
下载地址: 免注册下载 普通下载 VIP

相关代码

				/**
				 * FileName:Role.java,v 1.0 created in 2008-11-7 上午11:06:54
				 * Created by lv
				 * Copyright (c) 2008 华东交通大学
				 * All Rights Reserved.
				 */
				package cn.jx.ecjtu.oa.ps.pojo;
				
				import java.util.ArrayList;
				import java.util.List;
				
				/**
				 * @todo:Description
				 * @author lv
				 * @version $Revision: 1.5 $
				 * @since 1.0
				 */
				
				public class Role implements java.io.Serializable{
					/**
					 * 实现序列化
					 */
					private static final long serialVersionUID = 6209766568716962681L;
					private int id;          //角色的id号
					private String name;     //角色的名称
					private List  permissions;   //对应于此角色的权限列表
					public Role() {
					}
					
					public Role(int id, String name, List permissions) {
						super();
						this.id = id;
						this.name = name;
						this.permissions = permissions;
					}
					public Role(int id, String name) {
						super();
						this.id = id;
						this.name = name;
						this.permissions = new ArrayList ();
					}
				
					public int getId() {
						return id;
					}
					public void setId(int id) {
						this.id = id;
					}
					public String getName() {
						return name;
					}
					public void setName(String name) {
						this.name = name;
					}
					public List getPermissions() {
						return permissions;
					}
					public void setPermissions(List permissions) {
						this.permissions = permissions;
					}
					@Override
					public String toString() {
						String str = "";
						for(Permission permission:permissions){
							str+=permission;
						}
						return "name:"+str;
					}
					
				}
							

相关资源