package com.seeyon.apps.src_powerfeeinvoice.utils;

public class FormWhereCondition {
    private String display;
    private String fieldName; //字段名
    private Object value; //值
    private ClauseFactor clauseFactor; //条件因子 eq lt gt not_null null
    private ClauseFactor concatFactor = ClauseFactor.AND; //拼接因子
    private boolean startWithBracket = false; //是否以括号开头生成子条件
    private boolean endWithBracket = false; //是否以括号结尾结束子条件
    private String index;

    public FormWhereCondition() {
    }

    public String getDisplay() {
        return display;
    }

    public void setDisplay(String display) {
        this.display = display;
    }

    public static FormWhereCondition build() {
        return new FormWhereCondition();
    }

    public FormWhereCondition display(String display) {
        this.display = display;
        return this;
    }
    public FormWhereCondition value(Object value) {
        this.value = value;
        return this;
    }
    public FormWhereCondition clauseFactor(ClauseFactor clauseFactor) {
        this.clauseFactor = clauseFactor;
        return this;
    }
    public FormWhereCondition index(String index) {
        this.index = index;
        return this;
    }

    public FormWhereCondition startWithBracket(boolean startWithBracket) {
        this.startWithBracket = startWithBracket;
        return this;
    }

    public FormWhereCondition endWithBracket(boolean endWithBracket) {
        this.endWithBracket = endWithBracket;
        return this;
    }

    public FormWhereCondition concatFactor(ClauseFactor concatFactor) {
        this.concatFactor = concatFactor;
        return this;
    }


    public FormWhereCondition(Object value, ClauseFactor clauseFactor) {
        this.value = value;
        this.clauseFactor = clauseFactor;
    }

    public boolean isStartWithBracket() {
        return startWithBracket;
    }

    public void setStartWithBracket(boolean startWithBracket) {
        this.startWithBracket = startWithBracket;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }

    public ClauseFactor getClauseFactor() {
        return clauseFactor;
    }

    public void setClauseFactor(ClauseFactor clauseFactor) {
        this.clauseFactor = clauseFactor;
    }

    public ClauseFactor getConcatFactor() {
        return concatFactor;
    }

    public void setConcatFactor(ClauseFactor concatFactor) {
        this.concatFactor = concatFactor;
    }

    public String getIndex() {
        return index;
    }

    public void setIndex(String index) {
        this.index = index;
    }

    public boolean isEndWithBracket() {
        return endWithBracket;
    }

    public void setEndWithBracket(boolean endWithBracket) {
        this.endWithBracket = endWithBracket;
    }
}
