package com.sonic.daosupport.wrapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.google.common.collect.ImmutableListMultimap;

/**
 * 封装底层的查询实现
 * @author code
 */
public interface OperatorProcessor {

    /**
     * 组装所有查询条件
     * @param queryColumnMap
     * @param andOperator
     * @return
     */
    QueryWrapper assembleAllQueryWrapper(ImmutableListMultimap<String, CriteriaWrapper.QueryField> queryColumnMap, boolean andOperator);

    /**
     * TODO: 暂时不支持返回 LambdaQueryWrapper
     * 组装成 lambda 查询条件对象
     * @param queryColumnMap
     * @param andOperator
     * @return
     */
    LambdaQueryWrapper assembleAllLambdaQueryWrapper(ImmutableListMultimap<String, CriteriaWrapper.QueryField> queryColumnMap, boolean andOperator);

}
