Package wt.query

Class ConstantExpression

java.lang.Object
wt.query.ConstantExpression
All Implemented Interfaces:
Externalizable, Serializable, ColumnExpression, wt.query.Expression, OrderByExpression, RelationalExpression
Direct Known Subclasses:
DateExpression

public class ConstantExpression extends Object implements ColumnExpression, Externalizable
This class represents a constant in a SQL statement.

Supported API: true

Extendable: false
See Also:
  • Constructor Details

    • ConstantExpression

      public ConstantExpression(Object a_value)


      Supported API: true
      Parameters:
      a_value - Specifies the constant value.
  • Method Details

    • getValue

      public Object getValue()
      Gets the value of the attribute: value; Constant value.

      Supported API: true
      Returns:
      Object
    • isUseEscape

      public boolean isUseEscape()
      Gets the value of the attribute: useEscape; This attribute indicates if the constant expression should use an ESCAPE clause that specifies the '\' character. This attribute only applies to String constants.

      Supported API: true
      Returns:
      boolean
    • setUseEscape

      public void setUseEscape(boolean a_UseEscape)
      Sets the value of the attribute: useEscape; This attribute indicates if the constant expression should use an ESCAPE clause that specifies the '\' character. This attribute only applies to String constants.

      Supported API: true
      Parameters:
      a_UseEscape -
    • isUseBind

      public boolean isUseBind()
      Gets the value of the attribute: useBind; Indicates if bind parameters should be used for ConstantExpression when used in SearchConditions. If it is false, it does not respect the setting on the QuerySpec level; if it is true, it should respect the setting on the QuerySpec level.

      Supported API: true
      Returns:
      boolean
    • setUseBind

      public void setUseBind(boolean a_UseBind)
      Sets the value of the attribute: useBind; Indicates if bind parameters should be used for ConstantExpression when used in SearchConditions. If it is false, it does not respect the setting on the QuerySpec level; if it is true, it should respect the setting on the QuerySpec level.

      Supported API: true
      Parameters:
      a_UseBind -
    • newExpression

      public static ColumnExpression newExpression(Object a_value, String a_javaType)
      Create a new Expression.

      Supported API: true
      Parameters:
      a_value - Specifies the constant value.
      a_javaType - Specifies the Java type that this constant should be treated as.
      Returns:
      ColumnExpression
    • newExpression

      public static ColumnExpression newExpression(Object a_value)
      Create a new Expression.

      Supported API: true
      Parameters:
      a_value - Specifies the constant value.
      Returns:
      ColumnExpression
    • getColumnAlias

      public String getColumnAlias()
      Gets the value of the attribute: columnAlias; Alias for the column expression.

      Supported API: true
      Specified by:
      getColumnAlias in interface ColumnExpression
      Specified by:
      getColumnAlias in interface OrderByExpression
      Returns:
      String
    • setColumnAlias

      public void setColumnAlias(String a_ColumnAlias) throws WTPropertyVetoException
      Sets the value of the attribute: columnAlias; Alias for the column expression.

      Supported API: true
      Specified by:
      setColumnAlias in interface ColumnExpression
      Parameters:
      a_ColumnAlias -
      Throws:
      WTPropertyVetoException