b85ff34365772237411b5afe4d5af0d578d9ef49
[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 import java.io.Serializable;
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 implements Serializable {
30         
31         private static final long serialVersionUID = 768026109321305392L;
32
33         private String artifactUuid;
34         private String description = null;
35         private String fileName;
36         private String fileBody;
37         private Timestamp created;
38         private String version;
39         private String artifactChecksum;
40
41         public HeatFiles() {}
42
43         public String getArtifactUuid() {
44                 return this.artifactUuid;
45         }
46         public void setArtifactUuid(String artifactUuid) {
47                 this.artifactUuid = artifactUuid;
48         }
49
50         public String getDescription() {
51                 return this.description;
52         }
53         public void setDescription(String description) {
54                 this.description = description;
55         }
56
57         public String getFileName() {
58                 return this.fileName;
59         }
60         public void setFileName(String fileName) {
61                 this.fileName = fileName;
62         }
63
64         public String getFileBody() {
65                 return this.fileBody;
66         }
67         public void setFileBody(String fileBody) {
68                 this.fileBody = fileBody;
69         }
70
71         public Timestamp getCreated() {
72                 return created;
73         }
74
75         public void setCreated(Timestamp created) {
76                 this.created = created;
77         }
78
79         public String getAsdcUuid() {
80                 return this.artifactUuid;
81         }
82         public void setAsdcUuid(String artifactUuid) {
83                 this.artifactUuid = artifactUuid;
84         }
85         public String getVersion() {
86                 return version;
87         }
88
89         public void setVersion(String version) {
90                 this.version = version;
91         }
92
93         public String getArtifactChecksum() {
94                 return artifactChecksum;
95         }
96         public void setArtifactChecksum(String artifactChecksum) {
97                 this.artifactChecksum = artifactChecksum;
98         }
99
100         @Override
101         public String toString () {
102                 StringBuffer sb = new StringBuffer();
103                 sb.append ("artifactUuid=" + this.artifactUuid);
104                 if (this.description == null) {
105                         sb.append(", description=null");
106                 } else {
107                         sb.append(", description=" + this.description);
108                 }
109                 if (this.fileName == null) {
110                         sb.append(", fileName=null");
111                 } else {
112                         sb.append(",fileName=" + this.fileName);
113                 }
114                 if (this.fileBody == null) {
115                         sb.append(", fileBody=null");
116                 } else {
117                         sb.append(",fileBody=" + this.fileBody);
118                 }
119                 sb.append(", artifactChecksum=" + this.artifactChecksum);
120                 if (created != null) {
121                 sb.append (",created=");
122                 sb.append (DateFormat.getInstance().format(created));
123             }
124                 return sb.toString();
125         }
126 }