Class IsNullComparisonStatement

java.lang.Object
com.invirgance.convirgance.jdbc.sql.IsNullComparisonStatement
All Implemented Interfaces:
ComparisonStatement, SQLStatement
Direct Known Subclasses:
IsNotNullComparisonStatement

public class IsNullComparisonStatement extends Object implements ComparisonStatement
Represents the SQL "IS NULL" comparison operator in conditions. This class creates SQL expressions that check whether a column or expression is NULL (contains no value) in database queries.

 DatabaseSchemaLayout layout = new DatabaseSchemaLayout(driver, getHSQLDataSource());
 
 Table table = layout.getCurrentSchema().getTable("customer");
 
 ExpressionStatement children = new ColumnExpressionStatement(layout, table.getColumn("children"));
 
 IsNullComparisonStatement statement = 
 new IsNullComparisonStatement(layout, children);
 
Author:
jbanes
  • Constructor Details

    • IsNullComparisonStatement

      public IsNullComparisonStatement(DatabaseSchemaLayout layout)
      Creates the statement using the provided database layout.
      Parameters:
      layout - The layout.
    • IsNullComparisonStatement

      public IsNullComparisonStatement(DatabaseSchemaLayout layout, ExpressionStatement expression)
      Creates the statement using the provided layout and expression.
      Parameters:
      layout - The layout.
      expression - The expression.
  • Method Details

    • getParent

      public SQLStatement getParent()
      Description copied from interface: SQLStatement
      If this statement is part of a larger statement, this returns the parent statement.
      Specified by:
      getParent in interface SQLStatement
      Returns:
      the parent statement
    • setParent

      public void setParent(SQLStatement parent)
      Specified by:
      setParent in interface SQLStatement
    • getExpression

      public ExpressionStatement getExpression()
      Returns the current expression that will be evaluated in the query.
      Returns:
      ExpressionStatement
    • setExpression

      public void setExpression(ExpressionStatement expression)
      Sets the expression to evaluate in the comparison.
      Parameters:
      expression - ExpressionStatement
    • render

      public SQLRenderer render(SQLRenderer renderer)
      Specified by:
      render in interface SQLStatement