2 * ============LICENSE_START==========================================
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
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.
19 * ============LICENSE_END=============================================
20 * ====================================================================
22 package org.onap.music.conductor.conditionals;
24 import java.io.Serializable;
27 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
29 import io.swagger.annotations.ApiModel;
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 {
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;
42 public Map<String, Object> getTableValues() {
45 public void setTableValues(Map<String, Object> tableValues) {
46 this.tableValues = tableValues;
49 public String getPrimaryKey() {
52 public String getPrimaryKeyValue() {
53 return primaryKeyValue;
55 public String getCasscadeColumnName() {
56 return casscadeColumnName;
59 public Map<String, Object> getCasscadeColumnData() {
60 return casscadeColumnData;
65 public void setPrimaryKey(String primaryKey) {
66 this.primaryKey = primaryKey;
68 public void setPrimaryKeyValue(String primaryKeyValue) {
69 this.primaryKeyValue = primaryKeyValue;
71 public Map<String, Map<String, String>> getConditions() {
74 public void setConditions(Map<String, Map<String, String>> conditions) {
75 this.conditions = conditions;
77 public void setCasscadeColumnName(String casscadeColumnName) {
78 this.casscadeColumnName = casscadeColumnName;
81 public void setCasscadeColumnData(Map<String, Object> casscadeColumnData) {
82 this.casscadeColumnData = casscadeColumnData;