2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.mso.db.catalog.beans;
24 import java.sql.Timestamp;
25 import java.text.DateFormat;
27 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
29 public class HeatEnvironment extends MavenLikeVersioning {
31 private String name = null;
32 private String description = null;
33 private String environment = null;
35 private String asdcUuid;
36 private String asdcResourceName;
37 private String asdcLabel;
38 private String artifactChecksum;
40 private Timestamp created;
42 public HeatEnvironment() {}
48 public void setId(int id) {
56 public String getName () {
62 * @param name the name to set
64 public void setName (String name) {
68 public String getDescription() {
69 return this.description;
71 public void setDescription(String description) {
72 this.description = description;
75 public String getEnvironment() {
76 return this.environment;
78 public void setEnvironment(String environment) {
79 this.environment = environment;
82 public String getAsdcUuid() {
86 public void setAsdcUuid(String asdcUuid) {
87 this.asdcUuid = asdcUuid;
89 public String getAsdcLabel() {
90 return this.asdcLabel;
92 public void setAsdcLabel(String asdcLabel) {
93 this.asdcLabel = asdcLabel;
96 public String getArtifactChecksum() {
97 return artifactChecksum;
100 public void setArtifactChecksum(String artifactChecksum) {
101 this.artifactChecksum = artifactChecksum;
105 * @return the asdcResourceName
107 public String getAsdcResourceName () {
108 return asdcResourceName;
113 * @param asdcResourceName the asdcResourceName to set
115 public void setAsdcResourceName (String asdcResourceName) {
116 this.asdcResourceName = asdcResourceName;
119 public Timestamp getCreated() {
123 public void setCreated(Timestamp created) {
124 this.created = created;
128 public String toString () {
129 StringBuffer sb = new StringBuffer();
130 sb.append ("ID=" + this.id);
131 sb.append (", name=");
133 sb.append (", version=");
135 sb.append(", description=");
136 sb.append (description == null ? "null" : description);
137 sb.append(", environment=");
138 sb.append (environment == null ? "null" : environment);
139 sb.append(", asdcUuid=");
140 sb.append (asdcUuid == null ? "null" : asdcUuid);
141 sb.append (", asdcResourceName=");
142 sb.append (asdcResourceName == null ? "null" : asdcResourceName);
143 if (created != null) {
144 sb.append (",created=");
145 sb.append (DateFormat.getInstance().format(created));
147 return sb.toString();