Initial OpenECOMP MSO commit
[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         
40         public HeatFiles() {}
41         
42         public int getId() {
43                 return this.id;
44         }
45         
46         public void setId(int id) {
47                 this.id = id;
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 int getVnfResourceId() {
72                 return this.vnfResourceId;
73         }
74         public void setVnfResourceId(int vnfResourceId) {
75                 this.vnfResourceId = vnfResourceId;
76         }
77
78         public Timestamp getCreated() {
79                 return created;
80         }
81
82         public void setCreated(Timestamp created) {
83                 this.created = created;
84         }
85         
86         public String getAsdcUuid() {
87                 return this.asdcUuid;
88         }
89         public void setAsdcUuid(String asdcUuid) {
90                 this.asdcUuid = asdcUuid;
91         }
92         public String getAsdcLabel() {
93                 return this.asdcLabel;
94         }
95         public void setAsdcLabel(String asdcLabel) {
96                 this.asdcLabel = asdcLabel;
97         }
98         public String getAsdcResourceName() {
99                 return asdcResourceName;
100         }
101
102         public void setAsdcResourceName(String asdcResourceName) {
103                 this.asdcResourceName = asdcResourceName;
104         }
105
106         @Override
107         public String toString () {
108                 StringBuffer sb = new StringBuffer();
109                 sb.append ("ID=" + this.id);
110                 if (this.description == null) {
111                         sb.append(", description=null");
112                 } else {
113                         sb.append(", description=" + this.description);
114                 }
115                 if (this.fileName == null) {
116                         sb.append(", fileName=null");
117                 } else {
118                         sb.append(",fileName=" + this.fileName);
119                 }
120                 if (this.fileBody == null) {
121                         sb.append(", fileBody=null");
122                 } else {
123                         sb.append(",fileBody=" + this.fileBody);
124                 }
125                 if (this.asdcResourceName == null) {
126                         sb.append(", asdcResourceName=null");
127                 } else {
128                         sb.append(",asdcResourceName=" + this.asdcResourceName);
129                 }
130                 if (created != null) {
131                 sb.append (",created=");
132                 sb.append (DateFormat.getInstance().format(created));
133             }
134                 sb.append(", vnfResourceId=" + this.vnfResourceId);
135                 return sb.toString();
136         }
137 }