Package org.apache.torque.sql
Klasse WhereClauseExpression
java.lang.Object
org.apache.torque.sql.WhereClauseExpression
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 -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
Returns the value on the left hand side of the operator of the expression.Returns the value on the operator of the expression.Object[]
Returns the values for the placeholders in the verbatim sql condition.Returns the value on the right hand side of the operator of the expression.getSql()
Returns the verbatim sql for this expression, if any.int
hashCode()
boolean
Returns whether this expression represents a verbatim sql condition.void
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
Sets the value on the right hand side of the operator of the expression.toString()
-
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
Returns the value on the left hand side of the operator of the expression.- Gibt zurück:
- the lValue.
-
setLValue
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
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
Sets the value on the operator of the expression.- Parameter:
operator
- the value to set, or null fo no operator.
-
getRValue
Returns the value on the right hand side of the operator of the expression.- Gibt zurück:
- the rValue, or null.
-
setRValue
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
Returns the verbatim sql for this expression, if any.- Gibt zurück:
- the verbatim sql for this expression, or null if not given.
-
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() -
equals
-
toString
-