group.flyfish.fluent.query.SimpleCondition Maven / Gradle / Ivy
package group.flyfish.fluent.query;
import group.flyfish.fluent.utils.sql.EntityNameUtils;
import group.flyfish.fluent.utils.sql.SFunction;
import org.springframework.lang.Nullable;
import org.springframework.util.ObjectUtils;
import java.util.Collection;
import java.util.Collections;
import java.util.function.Function;
/**
* 查询条件
*
* @author wangyu
*/
class SimpleCondition implements Condition {
private final SFunction, ?> target;
private final Function callback;
private Object value;
private ConditionCandidate candidate;
public SimpleCondition(SFunction, ?> target, SimpleQuery query) {
this(target, query::and);
}
public SimpleCondition(SFunction, ?> target, Function callback) {
this.target = target;
this.callback = callback;
}
@Override
@Nullable
public Collection