test.ca.odell.glazedlists.hibernate.Role Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glazedlists_java15 Show documentation
Show all versions of glazedlists_java15 Show documentation
Event-driven lists for dynamically filtered and sorted tables
/* Glazed Lists (c) 2003-2006 */
/* http://publicobject.com/glazedlists/ publicobject.com,*/
/* O'Dell Engineering Ltd.*/
package ca.odell.glazedlists.hibernate;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
/**
* Represents a role a user can have.
*
* @author Holger Brands
*/
public class Role implements Serializable {
private static final long serialVersionUID = 0L;
/** Id. */
private Long id;
/** Role name. */
private String name;
/** Users who are in this role. */
private Collection users = new ArrayList();
/**
* Default constructor for hibernate.
*/
Role() {
}
/**
* Constructor with name.
*/
public Role(String name) {
this.name = name;
}
/**
* Gets the Id.
*/
public Long getId() {
return id;
}
/**
* Sets the Id.
*/
private void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Collection getUsers() {
return users;
}
public void addUser(User user) {
users.add(user);
}
public void removeUser(User user) {
users.remove(user);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy