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;
26 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
28 public class ModelRecipe extends MavenLikeVersioning implements Serializable {
30 private static final long serialVersionUID = 768026109321305392L;
33 private Integer modelId;
34 private String action;
35 private String schemaVersion;
36 private String description;
37 private String orchestrationUri;
38 private String modelParamXSD;
39 private Integer recipeTimeout;
40 private Timestamp created;
50 * @param id the id to set
52 public void setId(int id) {
59 public Integer getModelId() {
64 * @param modelId the modelId to set
66 public void setModelId(Integer modelId) {
67 this.modelId = modelId;
73 public String getAction() {
78 * @param action the action to set
80 public void setAction(String action) {
85 * @return the versionStr
87 public String getSchemaVersion() {
92 * @param versionStr the versionStr to set
94 public void setSchemaVersion(String schemaVersion) {
95 this.schemaVersion = schemaVersion;
99 * @return the description
101 public String getDescription() {
106 * @param description the description to set
108 public void setDescription(String description) {
109 this.description = description;
113 * @return the orchestrationUri
115 public String getOrchestrationUri() {
116 return orchestrationUri;
120 * @param orchestrationUri the orchestrationUri to set
122 public void setOrchestrationUri(String orchestrationUri) {
123 this.orchestrationUri = orchestrationUri;
127 * @return the modelParamXSD
129 public String getModelParamXSD() {
130 return modelParamXSD;
134 * @param modelParamXSD the modelParamXSD to set
136 public void setModelParamXSD(String modelParamXSD) {
137 this.modelParamXSD = modelParamXSD;
141 * @return the recipeTimeout
143 public Integer getRecipeTimeout() {
144 return recipeTimeout;
148 * @param recipeTimeout the recipeTimeout to set
150 public void setRecipeTimeout(Integer recipeTimeout) {
151 this.recipeTimeout = recipeTimeout;
155 * @return the created
157 public Timestamp getCreated() {
162 * @param created the created to set
164 public void setCreated(Timestamp created) {
165 this.created = created;
169 public String toString() {
170 StringBuilder sb = new StringBuilder();
171 sb.append("ModelRecipe: ");
172 sb.append("modelId=" + modelId.toString());
173 sb.append(",action=" + action);
174 sb.append(",schemaVersion=" + schemaVersion);
175 sb.append(",orchestrationUri=" + orchestrationUri);
176 sb.append(",modelParamXSD=" + modelParamXSD);
177 sb.append(",recipeTimeout=" + recipeTimeout.toString());
178 if (created != null) {
179 sb.append (",created=");
180 sb.append (DateFormat.getInstance().format(created));
182 return sb.toString();