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;
25 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
27 public class ModelRecipe extends MavenLikeVersioning {
29 private Integer modelId;
30 private String action;
31 private String schemaVersion;
32 private String description;
33 private String orchestrationUri;
34 private String modelParamXSD;
35 private Integer recipeTimeout;
36 private Timestamp created;
46 * @param id the id to set
48 public void setId(int id) {
55 public Integer getModelId() {
60 * @param modelId the modelId to set
62 public void setModelId(Integer modelId) {
63 this.modelId = modelId;
69 public String getAction() {
74 * @param action the action to set
76 public void setAction(String action) {
81 * @return the versionStr
83 public String getSchemaVersion() {
88 * @param versionStr the versionStr to set
90 public void setSchemaVersion(String schemaVersion) {
91 this.schemaVersion = schemaVersion;
95 * @return the description
97 public String getDescription() {
102 * @param description the description to set
104 public void setDescription(String description) {
105 this.description = description;
109 * @return the orchestrationUri
111 public String getOrchestrationUri() {
112 return orchestrationUri;
116 * @param orchestrationUri the orchestrationUri to set
118 public void setOrchestrationUri(String orchestrationUri) {
119 this.orchestrationUri = orchestrationUri;
123 * @return the modelParamXSD
125 public String getModelParamXSD() {
126 return modelParamXSD;
130 * @param modelParamXSD the modelParamXSD to set
132 public void setModelParamXSD(String modelParamXSD) {
133 this.modelParamXSD = modelParamXSD;
137 * @return the recipeTimeout
139 public Integer getRecipeTimeout() {
140 return recipeTimeout;
144 * @param recipeTimeout the recipeTimeout to set
146 public void setRecipeTimeout(Integer recipeTimeout) {
147 this.recipeTimeout = recipeTimeout;
151 * @return the created
153 public Timestamp getCreated() {
158 * @param created the created to set
160 public void setCreated(Timestamp created) {
161 this.created = created;
165 public String toString() {
166 StringBuilder sb = new StringBuilder();
167 sb.append("ModelRecipe: ");
168 sb.append("modelId=" + modelId.toString());
169 sb.append(",action=" + action);
170 sb.append(",schemaVersion=" + schemaVersion);
171 sb.append(",orchestrationUri=" + orchestrationUri);
172 sb.append(",modelParamXSD=" + modelParamXSD);
173 sb.append(",recipeTimeout=" + recipeTimeout.toString());
174 if (created != null) {
175 sb.append (",created=");
176 sb.append (DateFormat.getInstance().format(created));
178 return sb.toString();