[VID-6] Initial rebase push
[vid.git] / vid-app-common / src / main / java / org / openecomp / vid / mso / RestObject.java
1 /*-\r
2  * ============LICENSE_START=======================================================\r
3  * VID\r
4  * ================================================================================\r
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
6  * ================================================================================\r
7  * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * you may not use this file except in compliance with the License.\r
9  * You may obtain a copy of the License at\r
10  * \r
11  *      http://www.apache.org/licenses/LICENSE-2.0\r
12  * \r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  * ============LICENSE_END=========================================================\r
19  */\r
20 \r
21 package org.openecomp.vid.mso;\r
22 \r
23 /**\r
24  * The Class RestObject.\r
25  *\r
26  * @param <T> the generic type\r
27  */\r
28 public class RestObject<T> {\r
29 \r
30         /**\r
31          * Generic version of the RestObject class.\r
32          *\r
33          */\r
34     // T stands for "Type"\r
35     private T t;\r
36     \r
37     /** The status code. */\r
38     private int statusCode= 0;\r
39     \r
40     /**\r
41      * Sets the.\r
42      *\r
43      * @param t the t\r
44      */\r
45     public void set(T t) { this.t = t; }\r
46     \r
47     /**\r
48      * Gets the.\r
49      *\r
50      * @return the t\r
51      */\r
52     public T get() { return t; }\r
53         \r
54     /**\r
55      * Sets the status code.\r
56      *\r
57      * @param v the new status code\r
58      */\r
59     public void setStatusCode(int v) { this.statusCode = v; }\r
60     \r
61     /**\r
62      * Gets the status code.\r
63      *\r
64      * @return the status code\r
65      */\r
66     public int getStatusCode() { return this.statusCode; }\r
67 }\r
68 \r