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;
54 public void setId(int id) {
58 public Integer getVnfResourceId() {
59 return this.vnfResourceId;
61 public void setVnfResourceId(Integer vnfResourceId) {
62 this.vnfResourceId = vnfResourceId;
65 public String getModelName() {
66 return this.modelName;
68 public void setModelName(String modelName) {
69 this.modelName = modelName;
72 public String getType() {
76 public void setType(String type) {
80 public int getIsBase() {
83 public void setIsBase(int isBase) {
86 public boolean isBase() {
87 if (this.isBase == 0) {
94 public Integer getTemplateId() {
95 return this.templateId;
97 public void setTemplateId(Integer templateId) {
98 this.templateId = templateId;
101 public Integer getEnvironmentId() {
102 return this.environmentId;
104 public void setEnvironmentId(Integer environmentId) {
105 this.environmentId = environmentId;
108 public Integer getVolTemplateId() {
109 return this.volTemplateId;
111 public void setVolTemplateId(Integer volTemplateId) {
112 this.volTemplateId = volTemplateId;
115 public Integer getVolEnvironmentId() {
116 return this.volEnvironmentId;
118 public void setVolEnvironmentId(Integer volEnvironmentId) {
119 this.volEnvironmentId = volEnvironmentId;
122 public String getDescription() {
123 return this.description;
125 public void setDescription(String description) {
126 this.description = description;
129 public String getAsdcUuid() {
133 public void setAsdcUuid(String asdcUuidp) {
134 this.asdcUuid = asdcUuidp;
137 public Timestamp getCreated() {
141 public void setCreated(Timestamp created) {
142 this.created = created;
144 public String getModelInvariantUuid() {
145 return this.modelInvariantUuid;
147 public void setModelInvariantUuid(String modelInvariantUuid) {
148 this.modelInvariantUuid = modelInvariantUuid;
152 public String getModelVersion() {
153 return this.modelVersion;
155 public void setModelVersion(String modelVersion) {
156 this.modelVersion = modelVersion;
160 public String toString () {
161 StringBuffer buf = new StringBuffer();
164 buf.append(this.type);
165 buf.append(",modelName=");
166 buf.append(modelName);
167 buf.append(",version=");
171 buf.append(",vnfResourceId=");
172 buf.append(this.vnfResourceId);
173 buf.append(",templateId=");
174 buf.append(this.templateId);
175 buf.append(",envtId=");
176 buf.append(this.environmentId);
177 buf.append(",volTemplateId=");
178 buf.append(this.volTemplateId);
179 buf.append(",volEnvtId=");
180 buf.append(this.volEnvironmentId);
181 buf.append(", description=");
182 buf.append(this.description);
183 buf.append(",asdcUuid=");
184 buf.append(asdcUuid);
185 buf.append(",modelVersion=");
186 buf.append(this.modelVersion);
188 if (this.created != null) {
189 buf.append (",created=");
190 buf.append (DateFormat.getInstance().format(this.created));
192 return buf.toString();