Package org.apache.torque.sql

# Klasse WhereClauseExpression

java.lang.Object
org.apache.torque.sql.WhereClauseExpression

public class WhereClauseExpression extends Object
The raw values for a part of the where clause of a SQL statement, either of the form lValue operator rValue, e.g. author.author_id = 1, or in form of a custom sql query with sql and replacement values.

Version:
  $Id: WhereClauseExpression.java 1917245 2024-04-21 14:06:23Z tv $

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `WhereClauseExpression(Object lValue, SqlEnum operator, Object rValue, String sql, Object[] preparedStatementReplacements)`
  Constructor.

- ## Methodenübersicht

  Modifizierer und Typ
  Methode
  Beschreibung
  `boolean`
  `equals(Object obj)`
  `Object`
  `getLValue()`
  Returns the value on the left hand side of the operator of the expression.
  `SqlEnum`
  `getOperator()`
  Returns the value on the operator of the expression.
  `Object[]`
  `getPreparedStatementReplacements()`
  Returns the values for the placeholders in the verbatim sql condition.
  `Object`
  `getRValue()`
  Returns the value on the right hand side of the operator of the expression.
  `String`
  `getSql()`
  Returns the verbatim sql for this expression, if any.
  `int`
  `hashCode()`
  `boolean`
  `isVerbatimSqlCondition()`
  Returns whether this expression represents a verbatim sql condition.
  `void`
  `setLValue(Object lValue)`
  Sets the value on the left hand side of the operator of the expression.
  `void`
  `setOperator(SqlEnum operator)`
  Sets the value on the operator of the expression.
  `void`
  `setRValue(Object rValue)`
  Sets the value on the right hand side of the operator of the expression.
  `String`
  `toString()`

  ### Von Klasse geerbte Methoden java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Konstruktordetails

  - ### WhereClauseExpression

    public WhereClauseExpression(Object lValue, SqlEnum operator, Object rValue, String sql, Object[] preparedStatementReplacements)
    Constructor.
    Parameter:
      `lValue` - The value on the left hand side of the operator of the expression. The value represents the name of a database column.
      `operator` - the operator. Either this parameter or sql must be not null.
      `rValue` - The value on the right hand side of the operator of the expression. The value represents the name of a database column.
      `sql` - a verbatim sql condition. Either this parameter or operator must be not null.
      `preparedStatementReplacements` - Values for the placeholders in the verbatim sql condition.

- ## Methodendetails

  - ### getLValue

    public Object getLValue()
    Returns the value on the left hand side of the operator of the expression.
    Gibt zurück:
      the lValue.

  - ### setLValue

    public void setLValue(Object lValue)
    Sets the value on the left hand side of the operator of the expression. The value represents the name of a database column.
    Parameter:
      `lValue` - the value to set, not null or empty.
    Löst aus:
      `IllegalArgumentException` - if lValue is null or empty.

  - ### getOperator

    public SqlEnum getOperator()
    Returns the value on the operator of the expression.
    Gibt zurück:
      the operator, or null if this Expression represents a verbatim sql expression.

  - ### setOperator

    public void setOperator(SqlEnum operator)
    Sets the value on the operator of the expression.
    Parameter:
      `operator` - the value to set, or null fo no operator.

  - ### getRValue

    public Object getRValue()
    Returns the value on the right hand side of the operator of the expression.
    Gibt zurück:
      the rValue, or null.

  - ### setRValue

    public void setRValue(Object rValue)
    Sets the value on the right hand side of the operator of the expression.
    Parameter:
      `rValue` - the value to set, or null for the empty String.

  - ### getSql

    public String getSql()
    Returns the verbatim sql for this expression, if any.
    Gibt zurück:
      the verbatim sql for this expression, or null if not given.

  - ### getPreparedStatementReplacements

    public Object[] getPreparedStatementReplacements()
    Returns the values for the placeholders in the verbatim sql condition.
    Gibt zurück:
      the placeholder values, or null.

  - ### isVerbatimSqlCondition

    public boolean isVerbatimSqlCondition()
    Returns whether this expression represents a verbatim sql condition.
    Gibt zurück:
      true if this Criterion represents a verbatim sql condition, false if the sql is computed from lValue, comparison and rValue.

  - ### hashCode

    public int hashCode()
    Setzt außer Kraft:
      `hashCode` in Klasse `Object`

  - ### equals

    public boolean equals(Object obj)
    Setzt außer Kraft:
      `equals` in Klasse `Object`

  - ### toString

    public String toString()
    Setzt außer Kraft:
      `toString` in Klasse `Object`