All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.vonce.sql.bean.Logic Maven / Gradle / Ivy

The newest version!
package cn.vonce.sql.bean;


import cn.vonce.sql.enumerate.SqlLogic;

import java.io.Serializable;

/**
 * 条件逻辑
 *
 * @param 
 */
public class Logic implements Serializable {

    private Condition condition;

    private Logic() {
    }

    protected Logic(Condition condition) {
        this.condition = condition;
    }

    /**
     * 并且
     *
     * @param
     * @return
     */
    public Condition and() {
        condition.setSqlLogic(SqlLogic.AND);
        return condition;
    }

    /**
     * 或者
     *
     * @param
     * @return
     */
    public Condition or() {
        condition.setSqlLogic(SqlLogic.OR);
        return condition;
    }

    /**
     * 返回Bean对象
     *
     * @return
     */
    public Action back() {
        return condition.getAction();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy