db.sql.api.cmd.struct.conditionChain.IConditionChain Maven / Gradle / Ivy
package db.sql.api.cmd.struct.conditionChain;
import db.sql.api.cmd.basic.ICondition;
import db.sql.api.cmd.executor.method.condition.IConditionMethods;
import db.sql.api.cmd.struct.Nested;
import java.util.function.Consumer;
public interface IConditionChain
extends IConditionMethods,
Nested,
IConditionChainAnd,
IConditionChainOr,
ICondition {
SELF setIgnoreEmpty(boolean bool);
SELF setIgnoreNull(boolean bool);
SELF setStringTrim(boolean bool);
boolean hasContent();
SELF newInstance();
@Override
default SELF andNested(Consumer consumer) {
SELF newSelf = newInstance();
this.and(newSelf, true);
consumer.accept(newSelf);
return (SELF) this;
}
@Override
default SELF orNested(Consumer consumer) {
SELF newSelf = newInstance();
this.or(newSelf, true);
consumer.accept(newSelf);
return (SELF) this;
}
}