Class ConjunctivePart
java.lang.Object
com.northconcepts.datapipeline.jdbc.sql.SqlPart
com.northconcepts.datapipeline.jdbc.sql.select.QueryPart
com.northconcepts.datapipeline.jdbc.sql.select.QueryCriteriaPart
com.northconcepts.datapipeline.jdbc.sql.select.ConjunctivePart
Base class for parts that join their child parts with an operator such as AND or OR, parenthesizing each child when
more than one applies.
-
Constructor Summary
ConstructorsConstructorDescriptionConjunctivePart(String operator) Creates a part that joins its children with the given SQL operator, such as"AND". -
Method Summary
Modifier and TypeMethodDescriptionadd(QueryCriteriaPart part) Appends a condition and its parameter values as a child part.addFirst(QueryCriteriaPart part) Inserts a condition and its parameter values as the first child part.voidcollectSqlFragment(CodeWriter writer) Writes this part's SQL to the writer; used bySqlPart.getSqlFragment()and by enclosing parts.longReturns the number of child parts that render SQL.getParts()Returns the live list of child parts.booleanReturns true if this part renders any SQL; parts that do not, such as an emptyAndPart, are skipped.Methods inherited from class com.northconcepts.datapipeline.jdbc.sql.select.QueryCriteriaPart
collectParameterValues, getConditionCountMethods inherited from class com.northconcepts.datapipeline.jdbc.sql.SqlPart
getParameterValues, getSqlFragment, isPretty, printSqlParts, setPretty, toString
-
Constructor Details
-
ConjunctivePart
Creates a part that joins its children with the given SQL operator, such as"AND".
-
-
Method Details
-
isApplicable
public boolean isApplicable()Description copied from class:QueryCriteriaPartReturns true if this part renders any SQL; parts that do not, such as an emptyAndPart, are skipped.- Specified by:
isApplicablein classQueryCriteriaPart
-
getApplicableChildCount
public long getApplicableChildCount()Returns the number of child parts that render SQL. -
getParts
Description copied from class:QueryCriteriaPartReturns the live list of child parts.- Overrides:
getPartsin classQueryCriteriaPart
-
add
Description copied from class:QueryCriteriaPartAppends a condition and its parameter values as a child part.- Overrides:
addin classQueryCriteriaPart
-
addFirst
Description copied from class:QueryCriteriaPartInserts a condition and its parameter values as the first child part.- Overrides:
addFirstin classQueryCriteriaPart
-
add
- Overrides:
addin classQueryCriteriaPart
-
addFirst
- Overrides:
addFirstin classQueryCriteriaPart
-
collectSqlFragment
Description copied from class:SqlPartWrites this part's SQL to the writer; used bySqlPart.getSqlFragment()and by enclosing parts.- Specified by:
collectSqlFragmentin classSqlPart
-