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;
59 public void setId(int id) {
63 public Integer getVnfResourceId() {
64 return this.vnfResourceId;
66 public void setVnfResourceId(Integer vnfResourceId) {
67 this.vnfResourceId = vnfResourceId;
70 public String getModelName() {
71 return this.modelName;
73 public void setModelName(String modelName) {
74 this.modelName = modelName;
77 public String getType() {
81 public void setType(String type) {
85 public int getIsBase() {
88 public void setIsBase(int isBase) {
91 public boolean isBase() {
92 if (this.isBase == 0) {
99 public Integer getTemplateId() {
100 return this.templateId;
102 public void setTemplateId(Integer templateId) {
103 this.templateId = templateId;
106 public Integer getEnvironmentId() {
107 return this.environmentId;
109 public void setEnvironmentId(Integer environmentId) {
110 this.environmentId = environmentId;
113 public Integer getVolTemplateId() {
114 return this.volTemplateId;
116 public void setVolTemplateId(Integer volTemplateId) {
117 this.volTemplateId = volTemplateId;
120 public Integer getVolEnvironmentId() {
121 return this.volEnvironmentId;
123 public void setVolEnvironmentId(Integer volEnvironmentId) {
124 this.volEnvironmentId = volEnvironmentId;
127 public String getDescription() {
128 return this.description;
130 public void setDescription(String description) {
131 this.description = description;
134 public String getAsdcUuid() {
138 public void setAsdcUuid(String asdcUuidp) {
139 this.asdcUuid = asdcUuidp;
142 public Timestamp getCreated() {
146 public void setCreated(Timestamp created) {
147 this.created = created;
149 public String getModelInvariantUuid() {
150 return this.modelInvariantUuid;
152 public void setModelInvariantUuid(String modelInvariantUuid) {
153 this.modelInvariantUuid = modelInvariantUuid;
157 public String getModelVersion() {
158 return this.modelVersion;
160 public void setModelVersion(String modelVersion) {
161 this.modelVersion = modelVersion;
163 public String getModelCustomizationUuid() {
164 return this.modelCustomizationUuid;
166 public void setModelCustomizationUuid(String modelCustomizationUuid) {
167 this.modelCustomizationUuid = modelCustomizationUuid;
169 public Integer getMinInstances() {
170 return this.minInstances;
172 public void setMinInstances(Integer minInstances) {
173 this.minInstances = minInstances;
175 public Integer getMaxInstances() {
176 return this.maxInstances;
178 public void setMaxInstances(Integer maxInstances) {
179 this.maxInstances = maxInstances;
181 public Integer getInitialCount() {
182 return this.initialCount;
184 public void setInitialCount(Integer initialCount) {
185 this.initialCount = initialCount;
187 public String getLabel() {
190 public void setLabel(String label) {
195 public String toString () {
196 StringBuffer buf = new StringBuffer();
199 buf.append(this.type);
200 buf.append(",modelName=");
201 buf.append(modelName);
202 buf.append(",version=");
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);
233 if (this.created != null) {
234 buf.append (",created=");
235 buf.append (DateFormat.getInstance().format(this.created));
237 return buf.toString();