[MSO-8] Update the maven dependency
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / VfModule.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
25 import java.sql.Timestamp;
26 import java.text.DateFormat;
27
28 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
29
30 public class VfModule extends MavenLikeVersioning {
31
32         private int id;
33         private Integer vnfResourceId;
34         private String type;
35         private String modelName;
36         private int isBase;
37         private Integer templateId;
38         private Integer environmentId;
39         private Integer volTemplateId;
40         private Integer volEnvironmentId;
41         private String description;
42         private String asdcUuid;
43     private Timestamp created;
44     private String modelInvariantUuid;
45     private String modelVersion;
46         private String modelCustomizationUuid = null;
47         private Integer minInstances;
48         private Integer maxInstances;
49         private Integer initialCount;
50         private String label;
51
52     public VfModule() {
53                 super();
54         }
55
56         public int getId(){
57                 return this.id;
58         }
59         public void setId(int id) {
60                 this.id = id;
61         }
62
63         public Integer getVnfResourceId() {
64                 return this.vnfResourceId;
65         }
66         public void setVnfResourceId(Integer vnfResourceId) {
67                 this.vnfResourceId = vnfResourceId;
68         }
69
70         public String getModelName() {
71                 return this.modelName;
72         }
73         public void setModelName(String modelName) {
74                 this.modelName = modelName;
75         }
76
77         public String getType() {
78                 return type;
79         }
80
81         public void setType(String type) {
82                 this.type = type;
83         }
84
85         public int getIsBase() {
86                 return this.isBase;
87         }
88         public void setIsBase(int isBase) {
89                 this.isBase = isBase;
90         }
91         public boolean isBase() {
92                 if (this.isBase == 0) {
93                         return false;
94                 } else {
95                         return true;
96                 }
97         }
98
99         public Integer getTemplateId() {
100                 return this.templateId;
101         }
102         public void setTemplateId(Integer templateId) {
103                 this.templateId = templateId;
104         }
105
106         public Integer getEnvironmentId() {
107                 return this.environmentId;
108         }
109         public void setEnvironmentId(Integer environmentId) {
110                 this.environmentId = environmentId;
111         }
112
113         public Integer getVolTemplateId() {
114                 return this.volTemplateId;
115         }
116         public void setVolTemplateId(Integer volTemplateId) {
117                 this.volTemplateId = volTemplateId;
118         }
119
120         public Integer getVolEnvironmentId() {
121                 return this.volEnvironmentId;
122         }
123         public void setVolEnvironmentId(Integer volEnvironmentId) {
124                 this.volEnvironmentId = volEnvironmentId;
125         }
126
127         public String getDescription() {
128                 return this.description;
129         }
130         public void setDescription(String description) {
131                 this.description = description;
132         }
133
134         public String getAsdcUuid() {
135                 return asdcUuid;
136         }
137
138         public void setAsdcUuid(String asdcUuidp) {
139                 this.asdcUuid = asdcUuidp;
140         }
141
142         public Timestamp getCreated() {
143                 return created;
144         }
145
146         public void setCreated(Timestamp created) {
147                 this.created = created;
148         }
149         public String getModelInvariantUuid() {
150                 return this.modelInvariantUuid;
151         }
152         public void setModelInvariantUuid(String modelInvariantUuid) {
153                 this.modelInvariantUuid = modelInvariantUuid;
154         }
155
156
157         public String getModelVersion() {
158                 return this.modelVersion;
159         }
160         public void setModelVersion(String modelVersion) {
161                 this.modelVersion = modelVersion;
162         }
163         public String getModelCustomizationUuid() {
164                 return this.modelCustomizationUuid;
165         }
166         public void setModelCustomizationUuid(String modelCustomizationUuid) {
167                 this.modelCustomizationUuid = modelCustomizationUuid;
168         }
169         public Integer getMinInstances() {
170                 return this.minInstances;
171         }
172         public void setMinInstances(Integer minInstances) {
173                 this.minInstances = minInstances;
174         }
175         public Integer getMaxInstances() {
176                 return this.maxInstances;
177         }
178         public void setMaxInstances(Integer maxInstances) {
179                 this.maxInstances = maxInstances;
180         }
181         public Integer getInitialCount() {
182                 return this.initialCount;
183         }
184         public void setInitialCount(Integer initialCount) {
185                 this.initialCount = initialCount;
186         }
187         public String getLabel() {
188                 return this.label;
189         }
190         public void setLabel(String label) {
191                 this.label = label;
192         }
193
194         @Override
195         public String toString () {
196        StringBuffer buf = new StringBuffer();
197
198        buf.append("VF=");
199        buf.append(this.type);
200        buf.append(",modelName=");
201        buf.append(modelName);
202        buf.append(",version=");
203        buf.append(version);
204        buf.append(",id=");
205        buf.append(this.id);
206        buf.append(",vnfResourceId=");
207        buf.append(this.vnfResourceId);
208        buf.append(",templateId=");
209        buf.append(this.templateId);
210        buf.append(",envtId=");
211        buf.append(this.environmentId);
212        buf.append(",volTemplateId=");
213        buf.append(this.volTemplateId);
214        buf.append(",volEnvtId=");
215        buf.append(this.volEnvironmentId);
216        buf.append(", description=");
217        buf.append(this.description);
218        buf.append(",asdcUuid=");
219        buf.append(asdcUuid);
220        buf.append(",modelVersion=");
221        buf.append(this.modelVersion);
222        buf.append(",modelCustomizationUuid=");
223        buf.append(this.modelCustomizationUuid);
224        buf.append(",minInstances=");
225        buf.append(this.minInstances);
226        buf.append(",maxInstances=");
227        buf.append(this.maxInstances);
228        buf.append(",initialCount=");
229        buf.append(this.initialCount);
230        buf.append(",label=");
231        buf.append(this.label);
232
233          if (this.created != null) {
234                  buf.append (",created=");
235                  buf.append (DateFormat.getInstance().format(this.created));
236          }
237         return buf.toString();
238     }
239
240 }