2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.mso.db.catalog.beans;
25 import java.sql.Timestamp;
26 import java.text.DateFormat;
28 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
30 public class VfModule extends MavenLikeVersioning {
33 private Integer vnfResourceId;
35 private String modelName;
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;
51 private String modelUuid;
60 public void setId(int id) {
64 public Integer getVnfResourceId() {
65 return this.vnfResourceId;
67 public void setVnfResourceId(Integer vnfResourceId) {
68 this.vnfResourceId = vnfResourceId;
71 public String getModelName() {
72 return this.modelName;
74 public void setModelName(String modelName) {
75 this.modelName = modelName;
78 public String getType() {
82 public void setType(String type) {
86 public int getIsBase() {
89 public void setIsBase(int isBase) {
92 public boolean isBase() {
93 if (this.isBase == 0) {
100 public Integer getTemplateId() {
101 return this.templateId;
103 public void setTemplateId(Integer templateId) {
104 this.templateId = templateId;
107 public Integer getEnvironmentId() {
108 return this.environmentId;
110 public void setEnvironmentId(Integer environmentId) {
111 this.environmentId = environmentId;
114 public Integer getVolTemplateId() {
115 return this.volTemplateId;
117 public void setVolTemplateId(Integer volTemplateId) {
118 this.volTemplateId = volTemplateId;
121 public Integer getVolEnvironmentId() {
122 return this.volEnvironmentId;
124 public void setVolEnvironmentId(Integer volEnvironmentId) {
125 this.volEnvironmentId = volEnvironmentId;
128 public String getDescription() {
129 return this.description;
131 public void setDescription(String description) {
132 this.description = description;
135 public String getAsdcUuid() {
139 public void setAsdcUuid(String asdcUuidp) {
140 this.asdcUuid = asdcUuidp;
143 public Timestamp getCreated() {
147 public void setCreated(Timestamp created) {
148 this.created = created;
150 public String getModelInvariantUuid() {
151 return this.modelInvariantUuid;
153 public void setModelInvariantUuid(String modelInvariantUuid) {
154 this.modelInvariantUuid = modelInvariantUuid;
158 public String getModelVersion() {
159 return this.modelVersion;
161 public void setModelVersion(String modelVersion) {
162 this.modelVersion = modelVersion;
164 public String getModelCustomizationUuid() {
165 return this.modelCustomizationUuid;
167 public void setModelCustomizationUuid(String modelCustomizationUuid) {
168 this.modelCustomizationUuid = modelCustomizationUuid;
170 public Integer getMinInstances() {
171 return this.minInstances;
173 public void setMinInstances(Integer minInstances) {
174 this.minInstances = minInstances;
176 public Integer getMaxInstances() {
177 return this.maxInstances;
179 public void setMaxInstances(Integer maxInstances) {
180 this.maxInstances = maxInstances;
182 public Integer getInitialCount() {
183 return this.initialCount;
185 public void setInitialCount(Integer initialCount) {
186 this.initialCount = initialCount;
188 public String getLabel() {
191 public void setLabel(String label) {
195 // Will be fixed pending finalizing of 1707 catalog db schema changes
196 public void setModelUuid(String modelUuid) {
197 this.modelUuid = modelUuid;
199 public String getModelUuid() {
200 return this.modelUuid;
202 public String getModelInvariantId() {
203 return this.modelInvariantUuid;
205 public String getVfModuleType() {
208 public String getVfModuleLabel() {
213 public String toString () {
214 StringBuffer buf = new StringBuffer();
217 buf.append(this.type);
218 buf.append(",modelName=");
219 buf.append(modelName);
220 buf.append(",version=");
224 buf.append(",vnfResourceId=");
225 buf.append(this.vnfResourceId);
226 buf.append(",templateId=");
227 buf.append(this.templateId);
228 buf.append(",envtId=");
229 buf.append(this.environmentId);
230 buf.append(",volTemplateId=");
231 buf.append(this.volTemplateId);
232 buf.append(",volEnvtId=");
233 buf.append(this.volEnvironmentId);
234 buf.append(", description=");
235 buf.append(this.description);
236 buf.append(",asdcUuid=");
237 buf.append(asdcUuid);
238 buf.append(",modelVersion=");
239 buf.append(this.modelVersion);
240 buf.append(",modelCustomizationUuid=");
241 buf.append(this.modelCustomizationUuid);
242 buf.append(",minInstances=");
243 buf.append(this.minInstances);
244 buf.append(",maxInstances=");
245 buf.append(this.maxInstances);
246 buf.append(",initialCount=");
247 buf.append(this.initialCount);
248 buf.append(",label=");
249 buf.append(this.label);
251 if (this.created != null) {
252 buf.append (",created=");
253 buf.append (DateFormat.getInstance().format(this.created));
255 return buf.toString();