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.context.model.collections.MutableMap;
6 import de.fhdw.wtf.persistence.meta.UserObject;
7
8
9
10
11 public class GlobalTelefonbuch extends AnyType {
12
13
14
15
16 private MutableMap<City, MutableList<MutableMap<Telefon, NatuerlichePerson>>> telefonbuchMapsPerCity;
17
18
19
20
21
22
23 public MutableMap<City, MutableList<MutableMap<Telefon, NatuerlichePerson>>> getTelefonbuchMapsPerCity() {
24 return this.telefonbuchMapsPerCity;
25 }
26
27
28
29
30
31
32
33
34
35 public void addTelefonbuchToCity(final City city, final Telefonbuch telefonbuch) {
36 MutableList<MutableMap<Telefon, NatuerlichePerson>> set = this.telefonbuchMapsPerCity.get(city);
37 if (set == null) {
38 set = new MutableList<>();
39 set.insert(telefonbuch.getEintraege());
40 this.telefonbuchMapsPerCity.put(city, set);
41 } else {
42 set.insert(telefonbuch.getEintraege());
43 }
44 }
45
46
47
48
49 public GlobalTelefonbuch() {
50 this.telefonbuchMapsPerCity = new MutableMap<>();
51 }
52
53
54
55
56
57
58
59 public GlobalTelefonbuch(final UserObject userObject) {
60 super(userObject);
61 }
62 }