Initial OpenECOMP MSO commit
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / VnfResource.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * OPENECOMP - MSO
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
24 import java.sql.Timestamp;
25 import java.text.DateFormat;
26 import java.util.Map;
27
28 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
29
30 public class VnfResource extends MavenLikeVersioning {
31
32     private int id;
33     private String vnfType;
34     
35     private String orchestrationMode = null;
36     private String description = null;
37     private Integer templateId;
38     private Integer environmentId = null;
39     
40     private Map <String, HeatFiles> heatFiles;
41     
42     private String asdcUuid;
43
44     private Timestamp created;    
45     
46     private String aicVersionMin = null;
47     private String aicVersionMax = null;
48         
49     private String modelInvariantUuid = null;
50     private String modelVersion = null;
51
52     private String modelCustomizationName = null;
53     
54     private String modelName = null;
55     private String serviceModelInvariantUUID = null;
56     
57     public VnfResource () {
58     }
59
60     public int getId () {
61         return id;
62     }
63
64     public void setId (int id) {
65         this.id = id;
66     }
67
68     public String getVnfType () {
69         return vnfType;
70     }
71
72     public void setVnfType (String vnfType) {
73         this.vnfType = vnfType;
74     }
75
76     public String getOrchestrationMode () {
77         return orchestrationMode;
78     }
79
80     public void setOrchestrationMode (String orchestrationMode) {
81         this.orchestrationMode = orchestrationMode;
82     }
83
84     public String getDescription () {
85         return description;
86     }
87
88     public void setDescription (String description) {
89         this.description = description;
90     }
91
92     public Integer getTemplateId () {
93         return templateId;
94     }
95
96     public void setTemplateId (Integer templateId) {
97         this.templateId = templateId;
98     }
99
100     public Integer getEnvironmentId () {
101         return this.environmentId;
102     }
103
104     public void setEnvironmentId (Integer environmentId) {
105         this.environmentId = environmentId;
106     }
107     
108     public Map <String, HeatFiles> getHeatFiles () {
109         return this.heatFiles;
110     }
111
112     public void setHeatFiles (Map <String, HeatFiles> heatFiles) {
113         this.heatFiles = heatFiles;
114     }
115
116         public String getAsdcUuid() {
117                 return asdcUuid;
118         }
119
120         public void setAsdcUuid(String asdcUuidp) {
121                 this.asdcUuid = asdcUuidp;
122         }
123     
124         public Timestamp getCreated() {
125                 return created;
126         }
127
128         public void setCreated(Timestamp created) {
129                 this.created = created;
130         }
131         
132         public String getAicVersionMin() {
133                 return this.aicVersionMin;
134         }
135         
136         public void setAicVersionMin(String aicVersionMin) {
137                 this.aicVersionMin = aicVersionMin;
138         }
139         
140         public String getAicVersionMax() {
141                 return this.aicVersionMax;
142         }
143         
144         public void setAicVersionMax(String aicVersionMax) {
145                 this.aicVersionMax = aicVersionMax;
146         }
147         
148         public String getModelInvariantUuid() {
149                 return this.modelInvariantUuid;
150         }
151         
152         public void setModelInvariantUuid(String modelInvariantUuid) {
153                 this.modelInvariantUuid = modelInvariantUuid;
154         }
155         
156         public String getModelVersion() {
157                 return this.modelVersion;
158         }
159         public void setModelVersion(String modelVersion) {
160                 this.modelVersion = modelVersion;
161         }
162         
163         public String getModelCustomizationName() {
164                 return modelCustomizationName;
165         }
166
167         public void setModelCustomizationName(String modelCustomizationName) {
168                 this.modelCustomizationName = modelCustomizationName;
169         }
170
171         public String getModelName() {
172                 return modelName;
173         }
174
175         public void setModelName(String modelName) {
176                 this.modelName = modelName;
177         }
178
179         public String getServiceModelInvariantUUID() {
180                 return serviceModelInvariantUUID;
181         }
182
183         public void setServiceModelInvariantUUID(String serviceModelInvariantUUID) {
184                 this.serviceModelInvariantUUID = serviceModelInvariantUUID;
185         }
186
187         @Override
188         public String toString () {
189                 StringBuffer buf = new StringBuffer();
190
191                 buf.append("VNF=");
192                 buf.append(vnfType);
193                 buf.append(",version=");
194                 buf.append(version);
195                 buf.append(",mode=");
196                 buf.append(orchestrationMode);
197                 buf.append(",template=");
198                 buf.append(templateId);
199                 buf.append(",envtId=");
200                 buf.append(environmentId);
201                 buf.append(",asdcUuid=");
202                 buf.append(asdcUuid);
203                 buf.append(",aicVersionMin=");
204                 buf.append(this.aicVersionMin);
205                 buf.append(",aicVersionMax=");
206                 buf.append(this.aicVersionMax);
207         buf.append(",modelInvariantUuid=");
208         buf.append(this.modelInvariantUuid);
209         buf.append(",modelVersion=");
210         buf.append(this.modelVersion);
211         buf.append(",modelCustomizationName=");
212         buf.append(this.modelCustomizationName);
213         buf.append(",modelName=");
214         buf.append(this.modelName);
215         buf.append(",serviceModelInvariantUUID=");
216         buf.append(this.serviceModelInvariantUUID);
217         
218                 if (created != null) {
219                         buf.append(",created=");
220                         buf.append(DateFormat.getInstance().format(created));
221                 }
222                 return buf.toString();
223     }
224
225 }