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
-
Method Summary
Modifier and TypeMethodDescriptionaddCondition
(I_CmsQueryFragment fragment) Adds an operand to the boolean expression.static CmsSqlBooleanClause
makeAnd
(I_CmsQueryFragment... fragments) Creates a boolean "AND" expression.static CmsSqlBooleanClause
makeOr
(I_CmsQueryFragment... fragments) Creates a boolean "OR" expression.void
visit
(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_CmsQueryFragment
Generates the SQL and parameters and sends them to the statement builder .- Specified by:
visit
in interfaceI_CmsQueryFragment
- Parameters:
builder
- the statement builder- See Also:
-