83fb773a8c404ba1e312f7111c4031fa38519e67
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / ModelRecipe.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * OPENECOMP - MSO
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
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
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=========================================================
19  */
20 package org.openecomp.mso.db.catalog.beans;
21
22
23 import java.sql.Timestamp;
24 import java.text.DateFormat;
25 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
26
27 public class ModelRecipe extends MavenLikeVersioning {
28         private int id;
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;
37
38         /**
39          * @return the id
40          */
41         public int getId() {
42                 return id;
43         }
44
45         /**
46          * @param id the id to set
47          */
48         public void setId(int id) {
49                 this.id = id;
50         }
51
52         /**
53          * @return the modelId
54          */
55         public Integer getModelId() {
56                 return modelId;
57         }
58
59         /**
60          * @param modelId the modelId to set
61          */
62         public void setModelId(Integer modelId) {
63                 this.modelId = modelId;
64         }
65
66         /**
67          * @return the action
68          */
69         public String getAction() {
70                 return action;
71         }
72
73         /**
74          * @param action the action to set
75          */
76         public void setAction(String action) {
77                 this.action = action;
78         }
79
80         /**
81          * @return the versionStr
82          */
83         public String getSchemaVersion() {
84                 return schemaVersion;
85         }
86
87         /**
88          * @param versionStr the versionStr to set
89          */
90         public void setSchemaVersion(String schemaVersion) {
91                 this.schemaVersion = schemaVersion;
92         }
93
94         /**
95          * @return the description
96          */
97         public String getDescription() {
98                 return description;
99         }
100
101         /**
102          * @param description the description to set
103          */
104         public void setDescription(String description) {
105                 this.description = description;
106         }
107
108         /**
109          * @return the orchestrationUri
110          */
111         public String getOrchestrationUri() {
112                 return orchestrationUri;
113         }
114
115         /**
116          * @param orchestrationUri the orchestrationUri to set
117          */
118         public void setOrchestrationUri(String orchestrationUri) {
119                 this.orchestrationUri = orchestrationUri;
120         }
121
122         /**
123          * @return the modelParamXSD
124          */
125         public String getModelParamXSD() {
126                 return modelParamXSD;
127         }
128
129         /**
130          * @param modelParamXSD the modelParamXSD to set
131          */
132         public void setModelParamXSD(String modelParamXSD) {
133                 this.modelParamXSD = modelParamXSD;
134         }
135
136         /**
137          * @return the recipeTimeout
138          */
139         public Integer getRecipeTimeout() {
140                 return recipeTimeout;
141         }
142
143         /**
144          * @param recipeTimeout the recipeTimeout to set
145          */
146         public void setRecipeTimeout(Integer recipeTimeout) {
147                 this.recipeTimeout = recipeTimeout;
148         }
149
150         /**
151          * @return the created
152          */
153         public Timestamp getCreated() {
154                 return created;
155         }
156
157         /**
158          * @param created the created to set
159          */
160         public void setCreated(Timestamp created) {
161                 this.created = created;
162         }
163
164         @Override
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));
177             }
178                 return sb.toString();
179         }
180 }