1 /* Copyright (c) 2019 AT&T Intellectual Property. #
\r
3 # Licensed under the Apache License, Version 2.0 (the "License"); #
\r
4 # you may not use this file except in compliance with the License. #
\r
5 # You may obtain a copy of the License at #
\r
7 # http://www.apache.org/licenses/LICENSE-2.0 #
\r
9 # Unless required by applicable law or agreed to in writing, software #
\r
10 # distributed under the License is distributed on an "AS IS" BASIS, #
\r
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
\r
12 # See the License for the specific language governing permissions and #
\r
13 # limitations under the License. #
\r
14 ##############################################################################*/
\r
17 package org.oran.otf.common.model;
\r
19 import org.oran.otf.common.utility.gson.Convert;
\r
20 import java.io.Serializable;
\r
21 import java.util.List;
\r
22 import org.bson.types.ObjectId;
\r
23 import org.springframework.data.annotation.Id;
\r
24 import org.springframework.data.mongodb.core.mapping.Document;
\r
26 @Document(collection = "groups")
\r
27 public class Group implements Serializable {
\r
29 private static final long serialVersionUID = 1L;
\r
32 private ObjectId _id;
\r
33 private String groupName;
\r
34 private String groupDescription;
\r
35 private List<ObjectId> mechanizedIds;
\r
36 private ObjectId ownerId;
\r
37 private List<Role> roles;
\r
38 private List<GroupMember> members;
\r
39 private ObjectId parentGroupId;
\r
41 public ObjectId get_id() {
\r
45 public void set_id(ObjectId _id) {
\r
49 public String getGroupName() {
\r
53 public void setGroupName(String groupName) {
\r
54 this.groupName = groupName;
\r
57 public String getGroupDescription() {
\r
58 return groupDescription;
\r
61 public void setGroupDescription(String groupDescription) {
\r
62 this.groupDescription = groupDescription;
\r
65 public List<ObjectId> getMechanizedIds() {
\r
66 return mechanizedIds;
\r
69 public void setMechanizedIds(List<ObjectId> mechanizedIds) {
\r
70 this.mechanizedIds = mechanizedIds;
\r
73 public ObjectId getOwnerId() {
\r
77 public void setOwnerId(ObjectId ownerId) {
\r
78 this.ownerId = ownerId;
\r
81 public List<Role> getRoles() {
\r
85 public void setRoles(List<Role> roles) {
\r
89 public List<GroupMember> getMembers() {
\r
93 public void setMembers(List<GroupMember> members) {
\r
94 this.members = members;
\r
97 public ObjectId getParentGroupId() {
\r
98 return parentGroupId;
\r
101 public void setParentGroupId(ObjectId parentGroupId) {
\r
102 this.parentGroupId = parentGroupId;
\r
106 public String toString() {
\r
107 return Convert.objectToJson(this);
\r