Initial OpenECOMP MSO commit
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / HeatEnvironment.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 HeatEnvironment extends MavenLikeVersioning {
30         private int id;
31         private String name = null;
32         private String description = null;
33         private String environment = null;
34
35         private String asdcUuid;
36         private String asdcResourceName;
37         private String asdcLabel;
38
39         private Timestamp created;
40         
41         public HeatEnvironment() {}
42
43         public int getId() {
44                 return this.id;
45         }
46
47         public void setId(int id) {
48                 this.id = id;
49         }
50
51
52     /**
53      * @return the name
54      */
55     public String getName () {
56         return name;
57     }
58
59
60     /**
61      * @param name the name to set
62      */
63     public void setName (String name) {
64         this.name = name;
65     }
66
67     public String getDescription() {
68                 return this.description;
69         }
70         public void setDescription(String description) {
71                 this.description = description;
72         }
73
74         public String getEnvironment() {
75                 return this.environment;
76         }
77         public void setEnvironment(String environment) {
78                 this.environment = environment;
79         }
80
81         public String getAsdcUuid() {
82                 return asdcUuid;
83         }
84
85         public void setAsdcUuid(String asdcUuid) {
86                 this.asdcUuid = asdcUuid;
87         }
88         public String getAsdcLabel() {
89                 return this.asdcLabel;
90         }
91         public void setAsdcLabel(String asdcLabel) {
92                 this.asdcLabel = asdcLabel;
93         }
94
95
96     /**
97      * @return the asdcResourceName
98      */
99     public String getAsdcResourceName () {
100         return asdcResourceName;
101     }
102
103
104     /**
105      * @param asdcResourceName the asdcResourceName to set
106      */
107     public void setAsdcResourceName (String asdcResourceName) {
108         this.asdcResourceName = asdcResourceName;
109     }
110
111         public Timestamp getCreated() {
112                 return created;
113         }
114
115         public void setCreated(Timestamp created) {
116                 this.created = created;
117         }
118     
119     @Override
120         public String toString () {
121                 StringBuffer sb = new StringBuffer();
122                 sb.append ("ID=" + this.id);
123         sb.append (", name=");
124         sb.append (name);
125         sb.append (", version=");
126         sb.append (version);
127         sb.append(", description=");
128         sb.append (description == null ? "null" : description);
129         sb.append(", environment=");
130         sb.append (environment == null ? "null" : environment);
131         sb.append(", asdcUuid=");
132         sb.append (asdcUuid == null ? "null" : asdcUuid);
133                 sb.append (", asdcResourceName=");
134                 sb.append (asdcResourceName == null ? "null" : asdcResourceName);
135                 if (created != null) {
136                 sb.append (",created=");
137                 sb.append (DateFormat.getInstance().format(created));
138             }
139                 return sb.toString();
140         }
141 }