|
| 1 | +/* |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one |
| 3 | + * or more contributor license agreements. See the NOTICE file |
| 4 | + * distributed with this work for additional information |
| 5 | + * regarding copyright ownership. The ASF licenses this file |
| 6 | + * to you under the Apache License, Version 2.0 (the |
| 7 | + * "License"); you may not use this file except in compliance |
| 8 | + * with the License. You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, software |
| 13 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | + * See the License for the specific language governing permissions and |
| 16 | + * limitations under the License. |
| 17 | + */ |
| 18 | + |
| 19 | +package com.dtstack.flink.sql.side; |
| 20 | + |
| 21 | +import java.io.Serializable; |
| 22 | + |
| 23 | +/** |
| 24 | + * Predicate base info |
| 25 | + * |
| 26 | + * Date: 2019/12/11 |
| 27 | + * Company: www.dtstack.com |
| 28 | + * @author maqi |
| 29 | + */ |
| 30 | +public class PredicateInfo implements Serializable { |
| 31 | + |
| 32 | + private String operatorName; |
| 33 | + private String operatorKind; |
| 34 | + private String ownerTable; |
| 35 | + private String fieldName; |
| 36 | + private String condition; |
| 37 | + |
| 38 | + public PredicateInfo(String operatorName, String operatorKind, String ownerTable, String fieldName, String condition) { |
| 39 | + this.operatorName = operatorName; |
| 40 | + this.operatorKind = operatorKind; |
| 41 | + this.ownerTable = ownerTable; |
| 42 | + this.fieldName = fieldName; |
| 43 | + this.condition = condition; |
| 44 | + } |
| 45 | + |
| 46 | + public String getOperatorName() { |
| 47 | + return operatorName; |
| 48 | + } |
| 49 | + |
| 50 | + public void setOperatorName(String operatorName) { |
| 51 | + this.operatorName = operatorName; |
| 52 | + } |
| 53 | + |
| 54 | + public String getOperatorKind() { |
| 55 | + return operatorKind; |
| 56 | + } |
| 57 | + |
| 58 | + public void setOperatorKind(String operatorKind) { |
| 59 | + this.operatorKind = operatorKind; |
| 60 | + } |
| 61 | + |
| 62 | + public String getOwnerTable() { |
| 63 | + return ownerTable; |
| 64 | + } |
| 65 | + |
| 66 | + public void setOwnerTable(String ownerTable) { |
| 67 | + this.ownerTable = ownerTable; |
| 68 | + } |
| 69 | + |
| 70 | + public String getFieldName() { |
| 71 | + return fieldName; |
| 72 | + } |
| 73 | + |
| 74 | + public void setFieldName(String fieldName) { |
| 75 | + this.fieldName = fieldName; |
| 76 | + } |
| 77 | + |
| 78 | + public String getCondition() { |
| 79 | + return condition; |
| 80 | + } |
| 81 | + |
| 82 | + public void setCondition(String condition) { |
| 83 | + this.condition = condition; |
| 84 | + } |
| 85 | + |
| 86 | + @Override |
| 87 | + public String toString() { |
| 88 | + return "PredicateInfo{" + |
| 89 | + "operatorName='" + operatorName + '\'' + |
| 90 | + ", operatorKind='" + operatorKind + '\'' + |
| 91 | + ", ownerTable='" + ownerTable + '\'' + |
| 92 | + ", fieldName='" + fieldName + '\'' + |
| 93 | + ", condition='" + condition + '\'' + |
| 94 | + '}'; |
| 95 | + } |
| 96 | + |
| 97 | + public static Builder builder() { |
| 98 | + return new Builder(); |
| 99 | + } |
| 100 | + |
| 101 | + |
| 102 | + public static class Builder { |
| 103 | + |
| 104 | + private String operatorName; |
| 105 | + private String operatorKind; |
| 106 | + private String ownerTable; |
| 107 | + private String fieldName; |
| 108 | + private String condition; |
| 109 | + |
| 110 | + public Builder setOperatorName(String operatorName) { |
| 111 | + this.operatorName = operatorName; |
| 112 | + return this; |
| 113 | + } |
| 114 | + |
| 115 | + public Builder setOperatorKind(String operatorKind) { |
| 116 | + this.operatorKind = operatorKind; |
| 117 | + return this; |
| 118 | + } |
| 119 | + |
| 120 | + public Builder setOwnerTable(String ownerTable) { |
| 121 | + this.ownerTable = ownerTable; |
| 122 | + return this; |
| 123 | + } |
| 124 | + |
| 125 | + public Builder setFieldName(String fieldName) { |
| 126 | + this.fieldName = fieldName; |
| 127 | + return this; |
| 128 | + } |
| 129 | + |
| 130 | + public Builder setCondition(String condition) { |
| 131 | + this.condition = condition; |
| 132 | + return this; |
| 133 | + } |
| 134 | + |
| 135 | + public PredicateInfo build() { |
| 136 | + return new PredicateInfo( |
| 137 | + operatorName, operatorKind, ownerTable, fieldName, condition); |
| 138 | + } |
| 139 | + } |
| 140 | + |
| 141 | + |
| 142 | +} |
0 commit comments