summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/util/Role.java
blob: 83f63db4ab66fdbdc3c6d7a9f796e62da1bec657 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.vaadin.tests.util;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

public class Role implements Serializable {
    private String name = "";
    private Set<User> users = new HashSet<User>();

    public Role() {
    }

    public Role(String name) {
        setName(name);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /**
     * In this direction, the users for a role can be queried and the returned
     * collection modified, but the whole collection of users cannot be set
     * directly.
     * 
     * @return set of users having the role (not null)
     */
    public Set<User> getUsers() {
        return users;
    }

}