Change the header to SO
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / VfModule.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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.io.Serializable;
26 import java.sql.Timestamp;
27 import java.text.DateFormat;
28
29 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
30
31 public class VfModule extends MavenLikeVersioning implements Serializable {
32         
33         private static final long serialVersionUID = 768026109321305392L;
34
35         private String modelInvariantUUID;
36         private String modelName;
37         private String modelVersion;
38         private String description;
39         private int isBase;
40         private String heatTemplateArtifactUUId;
41         private String volHeatTemplateArtifactUUId;
42     private Timestamp created;
43         private String modelUUID;
44         private String vnfResourceModelUUId;
45
46     public VfModule() {
47                 super();
48         }
49
50         public String getVnfResourceModelUUId() {
51                 return this.vnfResourceModelUUId;
52         }
53
54         public void setVnfResourceModelUUId(String vnfResourceModelUUId) {
55                 this.vnfResourceModelUUId = vnfResourceModelUUId;
56         }
57
58         public String getModelName() {
59                 return this.modelName;
60         }
61         
62         public void setModelName(String modelName) {
63                 this.modelName = modelName;
64         }
65
66         public int getIsBase() {
67                 return this.isBase;
68         }
69         
70         public void setIsBase(int isBase) {
71                 this.isBase = isBase;
72         }
73         
74         public boolean isBase() {
75                 if (this.isBase == 0) {
76                         return false;
77                 } else {
78                         return true;
79                 }
80         }
81
82         public String getHeatTemplateArtifactUUId() {
83                 return this.heatTemplateArtifactUUId;
84         }
85
86         public void setHeatTemplateArtifactUUId(String heatTemplateArtifactUUId) {
87                 this.heatTemplateArtifactUUId = heatTemplateArtifactUUId;
88         }
89
90         public String getDescription() {
91                 return this.description;
92         }
93         
94         public void setDescription(String description) {
95                 this.description = description;
96         }
97
98         public Timestamp getCreated() {
99                 return created;
100         }
101
102         public void setCreated(Timestamp created) {
103                 this.created = created;
104         }
105         
106         public String getModelInvariantUuid() {
107                 return this.modelInvariantUUID;
108         }
109         public void setModelInvariantUuid(String modelInvariantUuid) {
110                 this.modelInvariantUUID = modelInvariantUuid;
111         }
112         public String getModelInvariantUUID() {
113                 return this.modelInvariantUUID;
114         }
115         public void setModelInvariantUUID(String modelInvariantUuid) {
116                 this.modelInvariantUUID = modelInvariantUuid;
117         }
118         
119         public String getVolHeatTemplateArtifactUUId() {
120                 return this.volHeatTemplateArtifactUUId;
121         }
122         
123         public void setVolHeatTemplateArtifactUUId(String volHeatTemplateArtifactUUId) {
124                 this.volHeatTemplateArtifactUUId = volHeatTemplateArtifactUUId;
125         }
126
127     public String getModelUUID() {
128                 return modelUUID;
129         }
130
131         public void setModelUUID(String modelUUID) {
132                 this.modelUUID = modelUUID;
133         }
134
135         public String getModelVersion() {
136                 return modelVersion;
137         }
138
139         public void setModelVersion(String modelVersion) {
140                 this.modelVersion = modelVersion;
141         }
142
143         @Override
144         public String toString () {
145        StringBuffer buf = new StringBuffer();
146
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);
166
167          if (this.created != null) {
168                  buf.append (",created=");
169                  buf.append (DateFormat.getInstance().format(this.created));
170          }
171                  
172         return buf.toString();
173     }
174
175 }