org.apache.torque.sql.whereclausebuilder
Class NullValueBuilder

java.lang.Object
  extended by org.apache.torque.sql.whereclausebuilder.AbstractWhereClausePsPartBuilder
      extended by org.apache.torque.sql.whereclausebuilder.NullValueBuilder
All Implemented Interfaces:
WhereClausePsPartBuilder

public class NullValueBuilder
extends AbstractWhereClausePsPartBuilder

Builds a PreparedStatementPart from a WhereClauseExpression which rhs is null and which has one of the comparison opertator =, <>, or !=, or which operator is SqlEnum.ISNULL or SqlEnum.ISNOTNULL

Version:
$Id: NullValueBuilder.java 1448414 2013-02-20 21:06:35Z tfischer $

Constructor Summary
NullValueBuilder()
           
 
Method Summary
 PreparedStatementPart buildPs(WhereClauseExpression whereClausePart, boolean ignoreCase, Adapter adapter)
          Builds a PreparedStatementPart from a WhereClauseExpression which rhs is null and which has one of the comparison opertator =, <>, or !=.
 boolean isApplicable(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullValueBuilder

public NullValueBuilder()
Method Detail

buildPs

public PreparedStatementPart buildPs(WhereClauseExpression whereClausePart,
                                     boolean ignoreCase,
                                     Adapter adapter)
                              throws TorqueException
Builds a PreparedStatementPart from a WhereClauseExpression which rhs is null and which has one of the comparison opertator =, <>, or !=.

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.
adapter - The adapter for the database for which the SQL should be created, not null.
Returns:
the rendered SQL for the WhereClauseExpression
Throws:
TorqueException - when rendering fails.

isApplicable

public boolean isApplicable(WhereClauseExpression whereClauseExpression,
                            Adapter adapter)
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.


Copyright © 2000-2013 The Apache Software Foundation. All Rights Reserved.