1 9 package org.jboss.portal.core.impl.role; 10 11 import org.jboss.portal.core.model.Role; 12 13 import java.util.HashSet ; 14 import java.util.Set ; 15 16 23 public class RoleImpl 24 implements Role 25 { 26 27 private Integer id; 28 29 private String name; 30 31 private Set users; 32 33 private String displayName; 34 35 private Integer rid; 37 40 public RoleImpl() 41 { 42 this.id = null; 43 this.name = null; 44 this.users = new HashSet (); 45 } 46 47 public RoleImpl(String name) 48 { 49 this.id = null; 50 this.name = name; 51 this.displayName = name; 52 this.users = new HashSet (); 53 } 54 55 public RoleImpl(String name, String displayName) 56 { 57 this.id = null; 58 this.name = name; 59 this.displayName = displayName; 60 this.users = new HashSet (); 61 } 62 63 66 private void setID(Integer id) 67 { 68 this.id = id; 69 } 70 71 74 public void setName(String name) 75 { 76 this.name = name; 77 } 78 79 82 public void setDisplayName(String displayName) 83 { 84 this.displayName = displayName; 85 } 86 87 90 private void setUsers(Set users) 91 { 92 this.users = users; 93 } 94 95 97 100 public Integer getID() 101 { 102 return id; 103 } 104 105 108 public String getName() 109 { 110 return name; 111 } 112 113 116 public String getDisplayName() 117 { 118 return displayName; 119 } 120 121 129 public Set getUsers() 130 { 131 return users; 132 } 133 134 public String toString() 135 { 136 return "Role[" + id + "," + name + "]"; 137 } 138 } | Popular Tags |