d379c2471a13355fe4963e1092bb0699210232f5
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / HeatFiles.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * OPENECOMP - MSO
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 import java.sql.Timestamp;
25 import java.text.DateFormat;
26
27 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
28
29 public class HeatFiles extends MavenLikeVersioning {
30         private int id;
31         private String description = null;
32         private String fileName;
33         private String fileBody;
34         private int vnfResourceId;
35         private Timestamp created;
36         private String asdcUuid;
37         private String asdcLabel;
38     private String asdcResourceName;
39         private String artifactChecksum;
40
41         public HeatFiles() {}
42
43         public int getId() {
44                 return this.id;
45         }
46
47         public void setId(int id) {
48                 this.id = id;
49         }
50
51         public String getDescription() {
52                 return this.description;
53         }
54         public void setDescription(String description) {
55                 this.description = description;
56         }
57
58         public String getFileName() {
59                 return this.fileName;
60         }
61         public void setFileName(String fileName) {
62                 this.fileName = fileName;
63         }
64
65         public String getFileBody() {
66                 return this.fileBody;
67         }
68         public void setFileBody(String fileBody) {
69                 this.fileBody = fileBody;
70         }
71
72         public int getVnfResourceId() {
73                 return this.vnfResourceId;
74         }
75         public void setVnfResourceId(int vnfResourceId) {
76                 this.vnfResourceId = vnfResourceId;
77         }
78
79         public Timestamp getCreated() {
80                 return created;
81         }
82
83         public void setCreated(Timestamp created) {
84                 this.created = created;
85         }
86
87         public String getAsdcUuid() {
88                 return this.asdcUuid;
89         }
90         public void setAsdcUuid(String asdcUuid) {
91                 this.asdcUuid = asdcUuid;
92         }
93         public String getAsdcLabel() {
94                 return this.asdcLabel;
95         }
96         public void setAsdcLabel(String asdcLabel) {
97                 this.asdcLabel = asdcLabel;
98         }
99         public String getAsdcResourceName() {
100                 return asdcResourceName;
101         }
102
103         public void setAsdcResourceName(String asdcResourceName) {
104                 this.asdcResourceName = asdcResourceName;
105         }
106
107         public String getArtifactChecksum() {
108                 return artifactChecksum;
109         }
110
111         public void setArtifactChecksum(String artifactChecksum) {
112                 this.artifactChecksum = artifactChecksum;
113         }
114
115         @Override
116         public String toString () {
117                 StringBuffer sb = new StringBuffer();
118                 sb.append ("ID=" + this.id);
119                 if (this.description == null) {
120                         sb.append(", description=null");
121                 } else {
122                         sb.append(", description=" + this.description);
123                 }
124                 if (this.fileName == null) {
125                         sb.append(", fileName=null");
126                 } else {
127                         sb.append(",fileName=" + this.fileName);
128                 }
129                 if (this.fileBody == null) {
130                         sb.append(", fileBody=null");
131                 } else {
132                         sb.append(",fileBody=" + this.fileBody);
133                 }
134                 if (this.asdcResourceName == null) {
135                         sb.append(", asdcResourceName=null");
136                 } else {
137                         sb.append(",asdcResourceName=" + this.asdcResourceName);
138                 }
139                 if (created != null) {
140                 sb.append (",created=");
141                 sb.append (DateFormat.getInstance().format(created));
142             }
143                 sb.append(", vnfResourceId=" + this.vnfResourceId);
144                 return sb.toString();
145         }
146 }