Class ConditionalStatement.ConditionStatementBuilder
java.lang.Object
com.github.tadukoo.database.mysql.syntax.conditional.ConditionalStatement.ConditionStatementBuilder
- All Implemented Interfaces:
ConditionalStatement.Build
,ConditionalStatement.Column
,ConditionalStatement.Operator
,ConditionalStatement.Value
- Enclosing class:
- ConditionalStatement
public static class ConditionalStatement.ConditionStatementBuilder
extends Object
implements ConditionalStatement.Column, ConditionalStatement.Operator, ConditionalStatement.Value, ConditionalStatement.Build
A builder to create a
ConditionalStatement
. It takes the following parameters:
Parameter | Description | Required or Default |
---|---|---|
negated | Whether the statement is negated or not | Defaults to false |
column | A column reference to the column of the statement |
Required |
operator | The operator of the statement |
Required |
value | The value of the statement | Required |
- Version:
- Alpha v.0.3
- Author:
- Logan Ferree (Tadukoo)
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
Not allowed to instantiate outside ConditionalStatement -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newConditionalStatement
using the set parametersprivate void
Checks for any errors in the set parametersnegated()
Sets negated to true for the statementnegated
(boolean negated) operator
(SQLOperator operator)
-
Field Details
-
Constructor Details
-
ConditionStatementBuilder
private ConditionStatementBuilder()Not allowed to instantiate outside ConditionalStatement
-
-
Method Details
-
negated
- Specified by:
negated
in interfaceConditionalStatement.Column
- Parameters:
negated
- Whether the statement is negated or not- Returns:
- this, to continue building
-
negated
Sets negated to true for the statement- Specified by:
negated
in interfaceConditionalStatement.Column
- Returns:
- this, to continue building
-
column
- Specified by:
column
in interfaceConditionalStatement.Column
- Parameters:
column
- TheColumnRef
to the column of the statement- Returns:
- this, to continue building
-
operator
- Specified by:
operator
in interfaceConditionalStatement.Operator
- Parameters:
operator
- Theoperator
of the statement- Returns:
- this, to continue building
-
value
- Specified by:
value
in interfaceConditionalStatement.Value
- Parameters:
value
- The value of the statement- Returns:
- this, to continue building
-
checkForErrors
private void checkForErrors()Checks for any errors in the set parameters -
build
Builds a newConditionalStatement
using the set parameters- Specified by:
build
in interfaceConditionalStatement.Build
- Returns:
- The newly built
ConditionalStatement
-