View Javadoc
1   package generated.model.de.fhdw.partner;
2   
3   import de.fhdw.wtf.context.model.AnyType;
4   import de.fhdw.wtf.context.model.collections.MutableList;
5   import de.fhdw.wtf.persistence.meta.UserObject;
6   
7   /**
8    * Represents a collection of person groups.
9    */
10  public class PersonGroups extends AnyType {
11  	
12  	/**
13  	 * A collection of groups of persons.
14  	 */
15  	private MutableList<MutableList<NatuerlichePerson>> personGroups;
16  	
17  	/**
18  	 * Creates a PersonGroups object.
19  	 */
20  	public PersonGroups() {
21  		this.personGroups = new MutableList<>();
22  	}
23  	
24  	/**
25  	 * Loads object from database.
26  	 * 
27  	 * @param userObject
28  	 *            The underlying user object.
29  	 */
30  	public PersonGroups(final UserObject userObject) {
31  		super(userObject);
32  	}
33  	
34  	/**
35  	 * Adds a group of persons.
36  	 * 
37  	 * @param group
38  	 *            The group of persons to add.
39  	 */
40  	public void addPersonGroup(final MutableList<NatuerlichePerson> group) {
41  		this.personGroups.insert(group);
42  	}
43  	
44  	/**
45  	 * Returns the collection of groups of persons.
46  	 * 
47  	 * @return The collection of groups of persons.
48  	 */
49  	public MutableList<MutableList<NatuerlichePerson>> getPersonGroups() {
50  		return this.personGroups;
51  	}
52  }