Package org.opencms.db
Class CmsSqlBooleanClause
java.lang.Object
org.opencms.db.CmsSqlBooleanClause
- All Implemented Interfaces:
I_CmsQueryFragment
Class for generating an SQL boolean expression.
- Since:
- 8.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCondition(I_CmsQueryFragment fragment) Adds an operand to the boolean expression.static CmsSqlBooleanClausemakeAnd(I_CmsQueryFragment... fragments) Creates a boolean "AND" expression.static CmsSqlBooleanClausemakeOr(I_CmsQueryFragment... fragments) Creates a boolean "OR" expression.voidvisit(CmsStatementBuilder builder) Generates the SQL and parameters and sends them to the statement builder .
-
Constructor Details
-
CmsSqlBooleanClause
Creates a new boolean clause.- Parameters:
operator- the boolean operator
-
-
Method Details
-
makeAnd
Creates a boolean "AND" expression.- Parameters:
fragments- the operands of the "AND"- Returns:
- the combined expression
-
makeOr
Creates a boolean "OR" expression.- Parameters:
fragments- the operands of the "OR"- Returns:
- the combined expressiong
-
addCondition
Adds an operand to the boolean expression.- Parameters:
fragment- the operand- Returns:
- this object instance
-
visit
Description copied from interface:I_CmsQueryFragmentGenerates the SQL and parameters and sends them to the statement builder .- Specified by:
visitin interfaceI_CmsQueryFragment- Parameters:
builder- the statement builder- See Also:
-