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.MutableMap;
5   import de.fhdw.wtf.persistence.meta.UserObject;
6   
7   /**
8    * Represents a local phone number dictionary.
9    */
10  public class Telefonbuch extends AnyType {
11  	
12  	/**
13  	 * Maps phone numbers to persons.
14  	 */
15  	private MutableMap<Telefon, NatuerlichePerson> eintraege;
16  	
17  	/**
18  	 * Creates an empty Telefonbuch.
19  	 */
20  	public Telefonbuch() {
21  		this.eintraege = new MutableMap<>();
22  	}
23  	
24  	/**
25  	 * Loads object from database.
26  	 * 
27  	 * @param userObject
28  	 *            The underlying user object.
29  	 */
30  	public Telefonbuch(final UserObject userObject) {
31  		super(userObject);
32  	}
33  	
34  	/**
35  	 * Returns the whole map from phone numbers to persons.
36  	 * 
37  	 * @return A map from phone numbers to persons.
38  	 */
39  	public MutableMap<Telefon, NatuerlichePerson> getEintraege() {
40  		return this.eintraege;
41  	}
42  	
43  	/**
44  	 * Sets the whole map from phone numbers to persons.
45  	 * 
46  	 * @param eintraege
47  	 *            A map from phone numbers to persons.
48  	 */
49  	public void setEintraege(final MutableMap<Telefon, NatuerlichePerson> eintraege) {
50  		this.eintraege = eintraege;
51  	}
52  }