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.io.Serializable;
26 import java.sql.Timestamp;
27 import java.text.DateFormat;
29 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
31 public class VfModule extends MavenLikeVersioning implements Serializable {
33 private static final long serialVersionUID = 768026109321305392L;
35 private String modelInvariantUUID;
36 private String modelName;
37 private String modelVersion;
38 private String description;
40 private String heatTemplateArtifactUUId;
41 private String volHeatTemplateArtifactUUId;
42 private Timestamp created;
43 private String modelUUID;
44 private String vnfResourceModelUUId;
50 public String getVnfResourceModelUUId() {
51 return this.vnfResourceModelUUId;
54 public void setVnfResourceModelUUId(String vnfResourceModelUUId) {
55 this.vnfResourceModelUUId = vnfResourceModelUUId;
58 public String getModelName() {
59 return this.modelName;
62 public void setModelName(String modelName) {
63 this.modelName = modelName;
66 public int getIsBase() {
70 public void setIsBase(int isBase) {
74 public boolean isBase() {
75 if (this.isBase == 0) {
82 public String getHeatTemplateArtifactUUId() {
83 return this.heatTemplateArtifactUUId;
86 public void setHeatTemplateArtifactUUId(String heatTemplateArtifactUUId) {
87 this.heatTemplateArtifactUUId = heatTemplateArtifactUUId;
90 public String getDescription() {
91 return this.description;
94 public void setDescription(String description) {
95 this.description = description;
98 public Timestamp getCreated() {
102 public void setCreated(Timestamp created) {
103 this.created = created;
106 public String getModelInvariantUuid() {
107 return this.modelInvariantUUID;
109 public void setModelInvariantUuid(String modelInvariantUuid) {
110 this.modelInvariantUUID = modelInvariantUuid;
112 public String getModelInvariantUUID() {
113 return this.modelInvariantUUID;
115 public void setModelInvariantUUID(String modelInvariantUuid) {
116 this.modelInvariantUUID = modelInvariantUuid;
119 public String getVolHeatTemplateArtifactUUId() {
120 return this.volHeatTemplateArtifactUUId;
123 public void setVolHeatTemplateArtifactUUId(String volHeatTemplateArtifactUUId) {
124 this.volHeatTemplateArtifactUUId = volHeatTemplateArtifactUUId;
127 public String getModelUUID() {
131 public void setModelUUID(String modelUUID) {
132 this.modelUUID = modelUUID;
135 public String getModelVersion() {
139 public void setModelVersion(String modelVersion) {
140 this.modelVersion = modelVersion;
144 public String toString () {
145 StringBuffer buf = new StringBuffer();
147 buf.append("VFModule:");
148 buf.append("modelName=");
149 buf.append(modelName);
150 buf.append(",modelVersion=");
151 buf.append(modelVersion);
152 buf.append(",vnfResourceModelUUId=");
153 buf.append(this.vnfResourceModelUUId);
154 buf.append(",heatTemplateArtifactUUId=");
155 buf.append(this.heatTemplateArtifactUUId);
156 buf.append(", description=");
157 buf.append(this.description);
158 buf.append(",volHeatTemplateArtifactUUId=");
159 buf.append(this.volHeatTemplateArtifactUUId);
160 buf.append(",isBase=");
161 buf.append(this.isBase);
162 buf.append(",modelInvariantUUID=");
163 buf.append(this.modelInvariantUUID);
164 buf.append(",modelUUID=");
165 buf.append(this.modelUUID);
167 if (this.created != null) {
168 buf.append (",created=");
169 buf.append (DateFormat.getInstance().format(this.created));
172 return buf.toString();