Change the header to SO
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / NetworkResource.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.mso.db.catalog.beans;
22
23 import java.io.Serializable;
24 import java.sql.Timestamp;
25 import java.text.DateFormat;
26
27 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
28
29 public class NetworkResource extends MavenLikeVersioning implements Serializable {
30         
31         private static final long serialVersionUID = 768026109321305392L;
32
33         private String orchestrationMode = null;
34         private String description = null;
35         private String neutronNetworkType = null;
36         private String aicVersionMin = null;
37         private String aicVersionMax = null;
38         private String modelName;
39         private String modelInvariantUUID;
40         private String modelVersion;
41         private String toscaNodeType;
42         private Timestamp created;
43         private String modelUUID;
44         private String heatTemplateArtifactUUID;
45         
46         public NetworkResource() {}
47         
48         public String getOrchestrationMode() {
49                 return orchestrationMode;
50         }
51         
52         public void setOrchestrationMode(String orchestrationMode) {
53                 this.orchestrationMode = orchestrationMode;
54         }
55         
56         public String getDescription() {
57                 return description;
58         }
59         public void setDescription(String description) {
60                 this.description = description;
61         }
62         
63         public String getNeutronNetworkType() {
64                 return neutronNetworkType;
65         }
66
67         public void setNeutronNetworkType(String neutronNetworkType) {
68                 this.neutronNetworkType = neutronNetworkType;
69         }
70         
71         public Timestamp getCreated() {
72                 return created;
73         }
74
75         public void setCreated(Timestamp created) {
76                 this.created = created;
77         }
78                 
79         public String getAicVersionMin() {
80                 return aicVersionMin;
81         }
82
83         public void setAicVersionMin(String aicVersionMin) {
84                 this.aicVersionMin = aicVersionMin;
85         }
86
87         public String getAicVersionMax() {
88                 return aicVersionMax;
89         }
90
91         public void setAicVersionMax(String aicVersionMax) {
92                 this.aicVersionMax = aicVersionMax;
93         }
94
95         public String getModelName() {
96                 return modelName;
97         }
98
99         public void setModelName(String modelName) {
100                 this.modelName = modelName;
101         }
102
103         public String getModelInvariantUUID() {
104                 return modelInvariantUUID;
105         }
106
107         public void setModelInvariantUUID(String modelInvariantUUID) {
108                 this.modelInvariantUUID = modelInvariantUUID;
109         }
110
111         public String getToscaNodeType() {
112                 return toscaNodeType;
113         }
114
115         public void setToscaNodeType(String toscaNodeType) {
116                 this.toscaNodeType = toscaNodeType;
117         }
118
119         public String getModelUUID() {
120                 return modelUUID;
121         }
122
123         public void setModelUUID(String modelUUID) {
124                 this.modelUUID = modelUUID;
125         }
126
127         public String getHeatTemplateArtifactUUID() {
128                 return heatTemplateArtifactUUID;
129         }
130
131         public void setHeatTemplateArtifactUUID(String heatTemplateArtifactUUID) {
132                 this.heatTemplateArtifactUUID = heatTemplateArtifactUUID;
133         }
134
135         public String getModelVersion() {
136                 return modelVersion;
137         }
138
139         public void setModelVersion(String modelVersion) {
140                 this.modelVersion = modelVersion;
141         }
142
143         @Override
144         public String toString () {
145                 StringBuffer sb = new StringBuffer();
146                 sb.append("NETWORK Resource:");
147                 sb.append("modelVersion=");
148                 sb.append(modelVersion);
149                 sb.append(",mode=");
150                 sb.append(orchestrationMode);
151                 sb.append(",neutronType=");
152                 sb.append(neutronNetworkType);
153                 sb.append(",aicVersionMin=");
154                 sb.append(aicVersionMin);
155                 sb.append(",aicVersionMax=");
156                 sb.append(aicVersionMax);
157                 sb.append(",modelName=");
158                 sb.append(modelName);
159                 sb.append(",modelInvariantUUID=");
160                 sb.append(modelInvariantUUID);
161                 sb.append(",toscaNodeType=");
162                 sb.append(toscaNodeType);
163                 sb.append(",modelUUID=");
164                 sb.append(modelUUID);
165                 sb.append(",heatTemplateArtifactUUID=");
166                 sb.append(heatTemplateArtifactUUID);
167                 
168                 if (created != null) {
169                 sb.append (",created=");
170                 sb.append (DateFormat.getInstance().format(created));
171             }
172                 
173                 return sb.toString();
174         }
175 }