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.io.Serializable;
24 import java.sql.Timestamp;
25 import java.text.DateFormat;
28 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
29 public class Model extends MavenLikeVersioning implements Serializable {
31 private static final long serialVersionUID = 768026109321305392L;
34 private String modelCustomizationId;
35 private String modelCustomizationName;
36 private String modelInvariantId;
37 private String modelName;
38 private String modelType;
39 private String modelVersion;
40 private String modelVersionId;
41 private Timestamp created;
42 private Map<String,ServiceRecipe> recipes;
52 * @param id the id to set
54 public void setId(int id) {
59 * @return the modelCustomizationId
61 public String getModelCustomizationId() {
62 return modelCustomizationId;
66 * @param modelCustomizationId the modelCustomizationId to set
68 public void setModelCustomizationId(String modelCustomizationId) {
69 this.modelCustomizationId = modelCustomizationId;
73 * @return the modelCustomizationName
75 public String getModelCustomizationName() {
76 return modelCustomizationName;
80 * @param modelCustomizationName the modelCustomizationName to set
82 public void setModelCustomizationName(String modelCustomizationName) {
83 this.modelCustomizationName = modelCustomizationName;
87 * @return the modelInvariantId
89 public String getModelInvariantId() {
90 return modelInvariantId;
94 * @param modelInvariantId the modelInvariantId to set
96 public void setModelInvariantId(String modelInvariantId) {
97 this.modelInvariantId = modelInvariantId;
101 * @return the modelName
103 public String getModelName() {
108 * @param modelName the modelName to set
110 public void setModelName(String modelName) {
111 this.modelName = modelName;
115 * @return the modelType
117 public String getModelType() {
122 * @param modelType the modelType to set
124 public void setModelType(String modelType) {
125 this.modelType = modelType;
129 * @return the modelVersion
131 public String getModelVersion() {
136 * @param modelVersion the modelVersion to set
138 public void setModelVersion(String modelVersion) {
139 this.modelVersion = modelVersion;
143 * @return the modelVersionId
145 public String getModelVersionId() {
146 return modelVersionId;
150 * @param modelVersionId the modelVersionId to set
152 public void setModelVersionId(String modelVersionId) {
153 this.modelVersionId = modelVersionId;
157 * @return the created
159 public Timestamp getCreated() {
164 * @param created the created to set
166 public void setCreated(Timestamp created) {
167 this.created = created;
171 * @return the recipes
173 public Map<String, ServiceRecipe> getRecipes() {
178 * @param recipes the recipes to set
180 public void setRecipes(Map<String, ServiceRecipe> recipes) {
181 this.recipes = recipes;
185 public String toString() {
186 StringBuilder sb = new StringBuilder();
187 sb.append("Model: ");
188 sb.append("modelCustomizationId=" + modelCustomizationId);
189 sb.append(",modelCustomizationName=" + modelCustomizationName);
190 sb.append(",modelInvariantId=" + modelInvariantId);
191 sb.append(",modelName=" + modelName);
192 sb.append(",modelType=" + modelType);
193 sb.append(",modelVersion=" + modelVersion);
194 sb.append(",modelVersionId=" + modelVersionId);
195 if (created != null) {
196 sb.append (",created=");
197 sb.append (DateFormat.getInstance().format(created));
199 return sb.toString();