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