Class ConditionPart
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.ConditionPart
A single SQL condition, such as
"price > ?", with the values for its ? parameters.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcollectParameterValues(List<Object> values) Appends the values for this part's?parameters to the list in order; adds nothing by default.voidcollectSqlFragment(CodeWriter writer) Writes this part's SQL to the writer; used bySqlPart.getSqlFragment()and by enclosing parts.intReturns the number of conditions (ConditionParts) in this part's subtree.booleanReturns true if at least one parameter value was given.Object[]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
add, add, addFirst, addFirst, getPartsMethods inherited from class com.northconcepts.datapipeline.jdbc.sql.SqlPart
getParameterValues, getSqlFragment, isPretty, printSqlParts, setPretty, toString
-
Constructor Details
-
ConditionPart
-
-
Method Details
-
getStatement
-
getValues
-
getHasValue
public boolean getHasValue()Returns true if at least one parameter value was given. -
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
-
getConditionCount
public int getConditionCount()Description copied from class:QueryCriteriaPartReturns the number of conditions (ConditionParts) in this part's subtree.- Overrides:
getConditionCountin 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
-
collectParameterValues
Description copied from class:SqlPartAppends the values for this part's?parameters to the list in order; adds nothing by default.- Overrides:
collectParameterValuesin classQueryCriteriaPart
-