Add voting app example
[music.git] / src / main / java / org / onap / music / conductor / conditionals / JsonConditional.java
1 /*
2  * ============LICENSE_START==========================================
3  * org.onap.music
4  * ===================================================================
5  *  Copyright (c) 2017 AT&T Intellectual Property
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  * 
19  * ============LICENSE_END=============================================
20  * ====================================================================
21  */
22 package org.onap.music.conductor.conditionals;
23
24 import java.io.Serializable;
25 import java.util.Map;
26
27 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
28
29 import io.swagger.annotations.ApiModel;
30
31 @ApiModel(value = "JsonConditional", description = "Json model for insert or update into table based on some conditions")
32 @JsonIgnoreProperties(ignoreUnknown = true)
33 public class JsonConditional implements Serializable {
34
35         private String primaryKey;
36         private String primaryKeyValue;
37         private String casscadeColumnName;
38         private Map<String,Object> tableValues;
39         private Map<String,Object> casscadeColumnData;
40         private Map<String,Map<String,String>> conditions;
41         
42         public Map<String, Object> getTableValues() {
43                 return tableValues;
44         }
45         public void setTableValues(Map<String, Object> tableValues) {
46                 this.tableValues = tableValues;
47         }
48         
49         public String getPrimaryKey() {
50                 return primaryKey;
51         }
52         public String getPrimaryKeyValue() {
53                 return primaryKeyValue;
54         }
55         public String getCasscadeColumnName() {
56                 return casscadeColumnName;
57         }
58
59         public Map<String, Object> getCasscadeColumnData() {
60                 return casscadeColumnData;
61         }
62
63         
64         
65         public void setPrimaryKey(String primaryKey) {
66                 this.primaryKey = primaryKey;
67         }
68         public void setPrimaryKeyValue(String primaryKeyValue) {
69                 this.primaryKeyValue = primaryKeyValue;
70         }
71         public Map<String, Map<String, String>> getConditions() {
72                 return conditions;
73         }
74         public void setConditions(Map<String, Map<String, String>> conditions) {
75                 this.conditions = conditions;
76         }
77         public void setCasscadeColumnName(String casscadeColumnName) {
78                 this.casscadeColumnName = casscadeColumnName;
79         }
80
81         public void setCasscadeColumnData(Map<String, Object> casscadeColumnData) {
82                 this.casscadeColumnData = casscadeColumnData;
83         }
84
85         
86         
87         
88         
89 }