Class DBCoalesceExpr

All Implemented Interfaces:
Unwrappable<DBColumnExpr>, ColumnExpr, DBPreparable

public class DBCoalesceExpr extends DBAbstractFuncExpr implements Unwrappable<DBColumnExpr>
  • Constructor Details

  • Method Details

    • isWrapper

      public boolean isWrapper()
      This is a transparent wrapper
      Specified by:
      isWrapper in interface Unwrappable<DBColumnExpr>
      Returns:
      true if its a wrapper or false otherwise
    • unwrap

      public DBColumnExpr unwrap()
      Description copied from interface: Unwrappable
      Unwrapps am object that is wrapped by this object If the object is not a wrapper then it must return itself (this)!
      Specified by:
      unwrap in interface Unwrappable<DBColumnExpr>
      Returns:
      the original object
    • getFunctionName

      protected String getFunctionName()
      Description copied from class: DBAbstractFuncExpr
      returns the name of the function
      Specified by:
      getFunctionName in class DBAbstractFuncExpr
      Returns:
      the function name
    • getName

      public String getName()
      Returns the column name.
      Specified by:
      getName in interface ColumnExpr
      Overrides:
      getName in class DBAbstractFuncExpr
      Returns:
      the column name
    • getEnumType

      public Class<Enum<?>> getEnumType()
      Returns the column enum type
      Specified by:
      getEnumType in interface ColumnExpr
      Overrides:
      getEnumType in class DBAbstractFuncExpr
      Returns:
      the enum type
    • equals

      public boolean equals(Object other)
      Returns true if other is equal to this expression
      Overrides:
      equals in class DBAbstractFuncExpr
    • prepareParams

      public void prepareParams(DBCommand cmd, DBExpr parent)
      Description copied from interface: DBPreparable
      Prepares an expression for a query This function is called by DBCommand in order to add values as query parameters instead of being literally included in the sql statement Please Note: This function is internally called. Do not call yourself!
      Specified by:
      prepareParams in interface DBPreparable
      Overrides:
      prepareParams in class DBAbstractFuncExpr
      Parameters:
      cmd - the command to which to add the parameters
      parent - the parent expression holding the value
    • addReferencedColumns

      public void addReferencedColumns(Set<DBColumn> list)
      Description copied from class: DBExpr
      Internal function to obtain all DBColumnExpr-objects used by this expression.
      Overrides:
      addReferencedColumns in class DBAbstractFuncExpr
      Parameters:
      list - list to which all used column expressions must be added
      See Also:
    • addSQL

      public void addSQL(DBSQLBuilder sql, long context)
      Description copied from class: DBExpr
      Used to build the SQL command. SQL for this expression must be appended to StringBuilder.
      Specified by:
      addSQL in class DBExpr
      Parameters:
      sql - the string buffer used to build the sql command
      context - context flag for this SQL-Command (see CTX_??? constants).