01: package org.osbl.orga.model;
02:
03: import org.conform.Property;
04: import org.osbl.identity.model.Identity;
05: import org.osbl.persistence.model.TreeNodeEntity;
06:
07: import java.util.*;
08:
09: public class Group extends TreeNodeEntity<Organisation> {
10: @Property(mandatory="true")
11: String name;
12: @Property(mandatory="true")
13: Identity identity;
14: List<Membership> memberships;
15:
16: public Group() {
17: }
18:
19: public String getName() {
20: return name;
21: }
22:
23: public void setName(String name) {
24: this .name = name;
25: }
26:
27: public Identity getIdentity() {
28: return identity;
29: }
30:
31: public void setIdentity(Identity identity) {
32: this .identity = identity;
33: }
34:
35: public List<Membership> getMemberships() {
36: return memberships;
37: }
38:
39: public void setMemberships(List<Membership> memberships) {
40: this .memberships = memberships;
41: }
42:
43: Map<String, Object> properties;
44:
45: public void setProperty(String name, Object value) {
46: if (properties == null)
47: properties = new HashMap<String, Object>();
48: properties.put(name, value);
49: }
50:
51: public Object getProperty(String name) {
52: if (properties == null)
53: properties = new HashMap<String, Object>();
54: return properties.get(name);
55: }
56:
57: protected void setProperties(Map<String, Object> properties) {
58: this .properties = properties;
59: }
60:
61: public Map<String, Object> getProperties() {
62: return properties;
63: }
64: }
|