Class Conditional
java.lang.Object
com.github.tadukoo.database.mysql.syntax.conditional.Conditional
Conditional represents a (potentially complex) conditional in MySQL
- Version:
- Alpha v.0.3
- Author:
- Logan Ferree (Tadukoo)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe Building part of building aConditionalstatic classConditional Builder is used to build aConditional.static interfaceThe First Condition part of building aConditionalstatic interfaceTheOperatorpart of building aConditionalstatic interfaceTheOperatoror building part of building aConditionalstatic interfaceThe Second Condition part of building aConditional -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConditionalThe firstConditionalinvolved (it may be null if aConditionalStatementis used instead)private final ConditionalStatementThe firstConditionalStatementinvolved (it may be null if aConditionalis used instead)private final SQLConjunctiveOperatorTheoperatorfor the conditional (it may be null if we have just one condition)private final ConditionalThe secondConditionalinvolved (it may be null if either aConditionalStatementis used instead or if there's only one condition)private final ConditionalStatementThe secondConditionalStatementinvolved (it may be null if either aConditionalis used instead or if there's only one condition) -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateConditional(Conditional firstCond, ConditionalStatement firstCondStmt, SQLConjunctiveOperator operator, Conditional secondCond, ConditionalStatement secondCondStmt) Constructs a new Conditional using the given parameters -
Method Summary
-
Field Details
-
firstCond
The firstConditionalinvolved (it may be null if aConditionalStatementis used instead) -
firstCondStmt
The firstConditionalStatementinvolved (it may be null if aConditionalis used instead) -
operator
Theoperatorfor the conditional (it may be null if we have just one condition) -
secondCond
The secondConditionalinvolved (it may be null if either aConditionalStatementis used instead or if there's only one condition) -
secondCondStmt
The secondConditionalStatementinvolved (it may be null if either aConditionalis used instead or if there's only one condition)
-
-
Constructor Details
-
Conditional
private Conditional(Conditional firstCond, ConditionalStatement firstCondStmt, SQLConjunctiveOperator operator, Conditional secondCond, ConditionalStatement secondCondStmt) Constructs a new Conditional using the given parameters- Parameters:
firstCond- The firstConditionalinvolvedfirstCondStmt- The firstConditionalStatementinvolvedoperator- Theoperatorfor the conditionalsecondCond- The secondConditionalinvolvedsecondCondStmt- The secondConditionalStatementinvolved
-
-
Method Details
-
builder
- Returns:
- A new
builderto use to build aConditional
-
getFirstCond
- Returns:
- The first
Conditionalinvolved (it may be null if aConditionalStatementis used instead)
-
getFirstCondStmt
- Returns:
- The first
ConditionalStatementinvolved (it may be null if aConditionalis used instead)
-
getOperator
- Returns:
- The
operatorfor the conditional (it may be null if we have just one condition)
-
getSecondCond
- Returns:
- The second
Conditionalinvolved (it may be null if either aConditionalStatementis used instead or if there's only one condition)
-
getSecondCondStmt
- Returns:
- The second
ConditionalStatementinvolved (it may be null if either aConditionalis used instead or if there's only one condition)
-
toString
-