@@ -0,0 +1,1768 @@
+import java.util.HashSet;%0Aimport java.util.Set;%0A%0Aimport javax.persistence.CascadeType;%0Aimport javax.persistence.Column;%0Aimport javax.persistence.Entity;%0Aimport javax.persistence.FetchType;%0Aimport javax.persistence.GeneratedValue;%0Aimport javax.persistence.Id;%0Aimport javax.persistence.JoinColumn;%0Aimport javax.persistence.JoinTable;%0Aimport javax.persistence.ManyToMany;%0A/**%0A * %E6%9D%83%E9%99%90%E7%BB%84(%E8%A7%92%E8%89%B2)%0A */%0A@Entity%0Apublic class PrivilegeGroup %7B%0A%09private Integer id;%0A%09private String name;%0A%09private Set%3CSystemPrivilege%3E privileges = new HashSet%3CSystemPrivilege%3E();%0A%09private Set%3CEmployee%3E employees = new HashSet%3CEmployee%3E();%0A%09%0A%09public PrivilegeGroup()%7B%7D%0A%09%0A%09public PrivilegeGroup(Integer id) %7B%0A%09%09this.id = id;%0A%09%7D%0A%09%0A%09@ManyToMany(mappedBy=%22groups%22,cascade=CascadeType.REFRESH)%0A%09public Set%3CEmployee%3E getEmployees() %7B%0A%09%09return employees;%0A%09%7D%0A%09public void setEmployees(Set%3CEmployee%3E employees) %7B%0A%09%09this.employees = employees;%0A%09%7D%0A%09@Id @GeneratedValue%0A%09public Integer getId() %7B%0A%09%09return id;%0A%09%7D%0A%09public void setId(Integer id) %7B%0A%09%09this.id = id;%0A%09%7D%0A%09%0A%09@Column(length=20,nullable=false)%0A%09public String getName() %7B%0A%09%09return name;%0A%09%7D%0A%09public void setName(String name) %7B%0A%09%09this.name = name;%0A%09%7D%0A%09%0A%09@ManyToMany(cascade=CascadeType.REFRESH,fetch=FetchType.EAGER)%0A%09@JoinTable(name=%22group_privilege%22,joinColumns=@JoinColumn(name=%22groupid%22),%0A%09%09%09inverseJoinColumns=%7B@JoinColumn(name=%22model%22, referencedColumnName=%22model%22),%0A%09%09%09%09%09%09%09%09@JoinColumn(name=%22privilegeValue%22, referencedColumnName=%22privilegeValue%22)%7D)%0A%09public Set%3CSystemPrivilege%3E getPrivileges() %7B%0A%09%09return privileges;%0A%09%7D%0A%09public void setPrivileges(Set%3CSystemPrivilege%3E privileges) %7B%0A%09%09this.privileges = privileges;%0A%09%7D%0A%09/**%0A%09 * %E6%B7%BB%E5%8A%A0%E6%9D%83%E9%99%90%0A%09 * @param privilege %E6%9D%83%E9%99%90%0A%09 */%0A%09public void addPrivilege(SystemPrivilege privilege) %7B%0A%09%09this.privileges.add(privilege);%0A%09%7D%0A%7D%0A

Create PrivilegeGroup.java