Class InBuilder
java.lang.Object
org.apache.torque.sql.whereclausebuilder.AbstractWhereClausePsPartBuilder
org.apache.torque.sql.whereclausebuilder.InBuilder
- All Implemented Interfaces:
WhereClausePsPartBuilder
Builds a PreparedStatementPart from a WhereClauseExpression containing
a Like operator.
- Version:
- $Id: InBuilder.java 1867515 2019-09-25 15:02:03Z gk $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildPs(WhereClauseExpression whereClausePart, boolean ignoreCase, Query query, Adapter adapter) Takes a columnName and criteria and builds a SQL 'IN' expression taking into account the ignoreCase flag.booleanisApplicable(WhereClauseExpression whereClauseExpression, Adapter adapter) Returns whether this WhereClausePsPartBuilder is applicable for a given WhereClauseExpression.Methods inherited from class org.apache.torque.sql.whereclausebuilder.AbstractWhereClausePsPartBuilder
getObjectOrColumnPsPartBuilder, setObjectOrColumnPsPartBuilder
-
Constructor Details
-
InBuilder
public InBuilder()
-
-
Method Details
-
buildPs
public PreparedStatementPart buildPs(WhereClauseExpression whereClausePart, boolean ignoreCase, Query query, Adapter adapter) throws TorqueException Takes a columnName and criteria and builds a SQL 'IN' expression taking into account the ignoreCase flag.- Parameters:
whereClausePart- the part of the where clause to build. Can be modified in this method.ignoreCase- If true and columns represent Strings, the appropriate function defined for the database will be used to ignore differences in case.query- the query which is currently builtadapter- The adapter for the database for which the SQL should be created, not null.- Returns:
- the PreparedStatementPart for the WhereClauseExpression.
- Throws:
TorqueException- when rendering fails.
-
isApplicable
Returns whether this WhereClausePsPartBuilder is applicable for a given WhereClauseExpression.- Parameters:
whereClauseExpression- the WhereClauseExpression in question.adapter- The adapter for the database for which the SQL should be created, not null.- Returns:
- true if applicable, false otherwise.
-