Merge "Reorder modifiers"
[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 = null;
39         private String modelInvariantUUID = null;
40         private String modelVersion = null;
41         private String toscaNodeType = null;
42         private Timestamp created = null;
43         private String modelUUID = null;
44     private String category = null;
45     private String subCategory = null;
46         private String heatTemplateArtifactUUID = null;
47         
48         public NetworkResource() {}
49         
50         public String getOrchestrationMode() {
51                 return orchestrationMode;
52         }
53         
54         public void setOrchestrationMode(String orchestrationMode) {
55                 this.orchestrationMode = orchestrationMode;
56         }
57         
58         public String getDescription() {
59                 return description;
60         }
61         public void setDescription(String description) {
62                 this.description = description;
63         }
64         
65         public String getNeutronNetworkType() {
66                 return neutronNetworkType;
67         }
68
69         public void setNeutronNetworkType(String neutronNetworkType) {
70                 this.neutronNetworkType = neutronNetworkType;
71         }
72         
73         public Timestamp getCreated() {
74                 return created;
75         }
76
77         public void setCreated(Timestamp created) {
78                 this.created = created;
79         }
80                 
81         public String getAicVersionMin() {
82                 return aicVersionMin;
83         }
84
85         public void setAicVersionMin(String aicVersionMin) {
86                 this.aicVersionMin = aicVersionMin;
87         }
88
89         public String getAicVersionMax() {
90                 return aicVersionMax;
91         }
92
93         public void setAicVersionMax(String aicVersionMax) {
94                 this.aicVersionMax = aicVersionMax;
95         }
96
97         public String getModelName() {
98                 return modelName;
99         }
100
101         public void setModelName(String modelName) {
102                 this.modelName = modelName;
103         }
104
105         public String getModelInvariantUUID() {
106                 return modelInvariantUUID;
107         }
108
109         public void setModelInvariantUUID(String modelInvariantUUID) {
110                 this.modelInvariantUUID = modelInvariantUUID;
111         }
112
113         public String getToscaNodeType() {
114                 return toscaNodeType;
115         }
116
117         public void setToscaNodeType(String toscaNodeType) {
118                 this.toscaNodeType = toscaNodeType;
119         }
120
121         public String getModelUUID() {
122                 return modelUUID;
123         }
124
125         public void setModelUUID(String modelUUID) {
126                 this.modelUUID = modelUUID;
127         }
128         
129         
130     /**
131      * @return Returns the category.
132      */
133     public String getCategory() {
134         return category;
135     }
136
137     
138     /**
139      * @param category The category to set.
140      */
141     public void setCategory(String category) {
142         this.category = category;
143     }
144
145     
146     /**
147      * @return Returns the subCategory.
148      */
149     public String getSubCategory() {
150         return subCategory;
151     }
152
153     
154     /**
155      * @param subCategory The subCategory to set.
156      */
157     public void setSubCategory(String subCategory) {
158         this.subCategory = subCategory;
159     }
160
161     public String getHeatTemplateArtifactUUID() {
162                 return heatTemplateArtifactUUID;
163         }
164
165         public void setHeatTemplateArtifactUUID(String heatTemplateArtifactUUID) {
166                 this.heatTemplateArtifactUUID = heatTemplateArtifactUUID;
167         }
168
169         public String getModelVersion() {
170                 return modelVersion;
171         }
172
173         public void setModelVersion(String modelVersion) {
174                 this.modelVersion = modelVersion;
175         }
176
177         @Override
178         public String toString () {
179                 StringBuilder sb = new StringBuilder();
180                 sb.append("NETWORK Resource:");
181                 sb.append("modelVersion=");
182                 sb.append(modelVersion);
183                 sb.append(",mode=");
184                 sb.append(orchestrationMode);
185                 sb.append(",neutronType=");
186                 sb.append(neutronNetworkType);
187                 sb.append(",aicVersionMin=");
188                 sb.append(aicVersionMin);
189                 sb.append(",aicVersionMax=");
190                 sb.append(aicVersionMax);
191                 sb.append(",modelName=");
192                 sb.append(modelName);
193                 sb.append(",modelInvariantUUID=");
194                 sb.append(modelInvariantUUID);
195                 sb.append(",toscaNodeType=");
196                 sb.append(toscaNodeType);
197                 sb.append(",modelUUID=");
198                 sb.append(modelUUID);
199                 sb.append(",heatTemplateArtifactUUID=");
200                 sb.append(heatTemplateArtifactUUID);
201                 
202                 if (created != null) {
203                 sb.append (",created=");
204                 sb.append (DateFormat.getInstance().format(created));
205             }
206                 
207                 return sb.toString();
208         }
209 }