[MSO-8] Update the maven dependency
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / Model.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 java.util.Map;
26
27 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
28
29 public class Model extends MavenLikeVersioning {
30         private int id;
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;
40
41         /**
42          * @return the id
43          */
44         public int getId() {
45                 return id;
46         }
47
48         /**
49          * @param id the id to set
50          */
51         public void setId(int id) {
52                 this.id = id;
53         }
54
55         /**
56          * @return the modelCustomizationId
57          */
58         public String getModelCustomizationId() {
59                 return modelCustomizationId;
60         }
61
62         /**
63          * @param modelCustomizationId the modelCustomizationId to set
64          */
65         public void setModelCustomizationId(String modelCustomizationId) {
66                 this.modelCustomizationId = modelCustomizationId;
67         }
68
69         /**
70          * @return the modelCustomizationName
71          */
72         public String getModelCustomizationName() {
73                 return modelCustomizationName;
74         }
75
76         /**
77          * @param modelCustomizationName the modelCustomizationName to set
78          */
79         public void setModelCustomizationName(String modelCustomizationName) {
80                 this.modelCustomizationName = modelCustomizationName;
81         }
82
83         /**
84          * @return the modelInvariantId
85          */
86         public String getModelInvariantId() {
87                 return modelInvariantId;
88         }
89
90         /**
91          * @param modelInvariantId the modelInvariantId to set
92          */
93         public void setModelInvariantId(String modelInvariantId) {
94                 this.modelInvariantId = modelInvariantId;
95         }
96
97         /**
98          * @return the modelName
99          */
100         public String getModelName() {
101                 return modelName;
102         }
103
104         /**
105          * @param modelName the modelName to set
106          */
107         public void setModelName(String modelName) {
108                 this.modelName = modelName;
109         }
110
111         /**
112          * @return the modelType
113          */
114         public String getModelType() {
115                 return modelType;
116         }
117
118         /**
119          * @param modelType the modelType to set
120          */
121         public void setModelType(String modelType) {
122                 this.modelType = modelType;
123         }
124
125         /**
126          * @return the modelVersion
127          */
128         public String getModelVersion() {
129                 return modelVersion;
130         }
131
132         /**
133          * @param modelVersion the modelVersion to set
134          */
135         public void setModelVersion(String modelVersion) {
136                 this.modelVersion = modelVersion;
137         }
138
139         /**
140          * @return the modelVersionId
141          */
142         public String getModelVersionId() {
143                 return modelVersionId;
144         }
145
146         /**
147          * @param modelVersionId the modelVersionId to set
148          */
149         public void setModelVersionId(String modelVersionId) {
150                 this.modelVersionId = modelVersionId;
151         }
152
153         /**
154          * @return the created
155          */
156         public Timestamp getCreated() {
157                 return created;
158         }
159
160         /**
161          * @param created the created to set
162          */
163         public void setCreated(Timestamp created) {
164                 this.created = created;
165         }
166
167         /**
168          * @return the recipes
169          */
170         public Map<String, ServiceRecipe> getRecipes() {
171                 return recipes;
172         }
173
174         /**
175          * @param recipes the recipes to set
176          */
177         public void setRecipes(Map<String, ServiceRecipe> recipes) {
178                 this.recipes = recipes;
179         }
180
181         @Override
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));
195             }
196                 return sb.toString();
197         }
198 }