/** * 添加查询表达式. * * @param expressions */ public Condition add(Expression... expressions) { compositeExpression.add(expressions); isContruct = false; return this; }
/** * 构造表达式. * * @return */ private void contructExpress() { if (null != compositeExpression && compositeExpression.getExpressionList().size() > 0) { contructSQL = compositeExpression.contructExpression(paramValued); } isContruct = true; }
/** 构造条件语名是否为空. */ public boolean isEmpty() { if (null != compositeExpression && compositeExpression.getExpressionList().size() > 0) return false; return true; }
/** * 添加查询表达式.表达式之间使用OR连接, * * @param expressions */ public Condition or( Expression expression1, Expression expression2, Expression... moreExpressions) { compositeExpression.add(Restrict.or(expression1, expression2, moreExpressions)); isContruct = false; return this; }