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=========================================================
20 package org.openecomp.mso.db.catalog.beans;
23 import java.sql.Timestamp;
24 import java.text.DateFormat;
27 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
29 public class Model extends MavenLikeVersioning {
31 private String modelCustomizationId;
32 private String modelCustomizationName;
33 private String modelInvariantId;
34 private String modelName;
35 private String modelType;
36 private String modelVersion;
37 private String modelVersionId;
38 private Timestamp created;
39 private Map<String,ServiceRecipe> recipes;
49 * @param id the id to set
51 public void setId(int id) {
56 * @return the modelCustomizationId
58 public String getModelCustomizationId() {
59 return modelCustomizationId;
63 * @param modelCustomizationId the modelCustomizationId to set
65 public void setModelCustomizationId(String modelCustomizationId) {
66 this.modelCustomizationId = modelCustomizationId;
70 * @return the modelCustomizationName
72 public String getModelCustomizationName() {
73 return modelCustomizationName;
77 * @param modelCustomizationName the modelCustomizationName to set
79 public void setModelCustomizationName(String modelCustomizationName) {
80 this.modelCustomizationName = modelCustomizationName;
84 * @return the modelInvariantId
86 public String getModelInvariantId() {
87 return modelInvariantId;
91 * @param modelInvariantId the modelInvariantId to set
93 public void setModelInvariantId(String modelInvariantId) {
94 this.modelInvariantId = modelInvariantId;
98 * @return the modelName
100 public String getModelName() {
105 * @param modelName the modelName to set
107 public void setModelName(String modelName) {
108 this.modelName = modelName;
112 * @return the modelType
114 public String getModelType() {
119 * @param modelType the modelType to set
121 public void setModelType(String modelType) {
122 this.modelType = modelType;
126 * @return the modelVersion
128 public String getModelVersion() {
133 * @param modelVersion the modelVersion to set
135 public void setModelVersion(String modelVersion) {
136 this.modelVersion = modelVersion;
140 * @return the modelVersionId
142 public String getModelVersionId() {
143 return modelVersionId;
147 * @param modelVersionId the modelVersionId to set
149 public void setModelVersionId(String modelVersionId) {
150 this.modelVersionId = modelVersionId;
154 * @return the created
156 public Timestamp getCreated() {
161 * @param created the created to set
163 public void setCreated(Timestamp created) {
164 this.created = created;
168 * @return the recipes
170 public Map<String, ServiceRecipe> getRecipes() {
175 * @param recipes the recipes to set
177 public void setRecipes(Map<String, ServiceRecipe> recipes) {
178 this.recipes = recipes;
182 public String toString() {
183 StringBuilder sb = new StringBuilder();
184 sb.append("Model: ");
185 sb.append("modelCustomizationId=" + modelCustomizationId);
186 sb.append(",modelCustomizationName=" + modelCustomizationName);
187 sb.append(",modelInvariantId=" + modelInvariantId);
188 sb.append(",modelName=" + modelName);
189 sb.append(",modelType=" + modelType);
190 sb.append(",modelVersion=" + modelVersion);
191 sb.append(",modelVersionId=" + modelVersionId);
192 if (created != null) {
193 sb.append (",created=");
194 sb.append (DateFormat.getInstance().format(created));
196 return sb.toString();