Account server footnote
[platform/upstream/iotivity.git] / cloud / account / src / main / java / org / iotivity / cloud / accountserver / db / GroupTable.java
1 /*
2  * //******************************************************************
3  * //
4  * // Copyright 2016 Samsung Electronics All Rights Reserved.
5  * //
6  * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7  * //
8  * // Licensed under the Apache License, Version 2.0 (the "License");
9  * // you may not use this file except in compliance with the License.
10  * // You may obtain a copy of the License at
11  * //
12  * //      http://www.apache.org/licenses/LICENSE-2.0
13  * //
14  * // Unless required by applicable law or agreed to in writing, software
15  * // distributed under the License is distributed on an "AS IS" BASIS,
16  * // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * // See the License for the specific language governing permissions and
18  * // limitations under the License.
19  * //
20  * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21  */
22 package org.iotivity.cloud.accountserver.db;
23
24 public class GroupTable {
25
26     private String gid;
27     private Object midlist;
28     private Object dilist;
29     private String gmid;
30     private String gacl;
31     private String gtype;
32
33     public GroupTable() {
34     }
35
36     /**
37      * API to initialize group table instance
38      * 
39      * @param gid
40      *            group ID
41      * @param midlist
42      *            member ID list as a form of array
43      * @param dilist
44      *            device ID list as a form of array
45      * @param gmid
46      *            group master ID
47      * @param gacl
48      *            group ACL
49      * @param gtype
50      *            group type
51      */
52     public GroupTable(String gid, Object midlist, Object dilist, String gmid,
53             String gacl, String gtype) {
54         this.gid = gid;
55         this.midlist = midlist;
56         this.dilist = dilist;
57         this.gmid = gmid;
58         this.gacl = gacl;
59         this.gtype = gtype;
60     }
61
62     /**
63      * API to get group ID
64      * 
65      * @return group ID
66      */
67     public String getGid() {
68         return gid;
69     }
70
71     /**
72      * API to set group ID
73      * 
74      * @param gid
75      *            group ID to be set
76      */
77     public void setGid(Object gid) {
78         this.gid = gid.toString();
79     }
80
81     /**
82      * API to get member ID list of the group
83      * 
84      * @return member ID list
85      */
86     public Object getMidlist() {
87         return midlist;
88     }
89
90     /**
91      * API to set member ID list of the group
92      * 
93      * @param midlist
94      *            member ID list to be set
95      */
96     public void setMidlist(Object midlist) {
97         this.midlist = midlist;
98     }
99
100     /**
101      * API to get device ID list of the group
102      * 
103      * @return device ID list
104      */
105     public Object getDilist() {
106         return dilist;
107     }
108
109     /**
110      * API to set device ID list of the group
111      * 
112      * @param dilist
113      *            device ID list to be set
114      */
115     public void setDilist(Object dilist) {
116         this.dilist = dilist;
117     }
118
119     /**
120      * API to get the group master ID
121      * 
122      * @return group master ID
123      */
124     public String getGmid() {
125         return gmid;
126     }
127
128     /**
129      * API to set the master ID of the group
130      * 
131      * @param gmid
132      *            group master ID to be set
133      */
134     public void setGmid(Object gmid) {
135         this.gmid = gmid.toString();
136     }
137
138     /**
139      * API to get group ACL
140      * 
141      * @return group ACL
142      */
143     public String getGacl() {
144         return gacl;
145     }
146
147     /**
148      * API to set group ACL of the group
149      * 
150      * @param gacl
151      *            group ACL to be set
152      */
153     public void setGacl(Object gacl) {
154         this.gacl = gacl.toString();
155     }
156
157     /**
158      * API to get group type
159      * 
160      * @return group type
161      */
162     public String getGtype() {
163         return gtype;
164     }
165
166     /**
167      * API to set group type
168      * 
169      * @param gtype
170      *            group type to be set
171      */
172     public void setGtype(Object gtype) {
173         this.gtype = gtype.toString();
174     }
175 }