wt.query
Class ConstantExpression

java.lang.Object
  extended by wt.query.ConstantExpression
All Implemented Interfaces:
Externalizable, Serializable, ColumnExpression, 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:
Serialized Form

Field Summary
 
Fields inherited from interface wt.query.ColumnExpression
COLUMN_ALIAS
 
Constructor Summary
ConstantExpression(String a_value)
          Deprecated. as of R7.0, use newExpression(Object).
 
Method Summary
 String getColumnAlias()
          Gets the value of the attribute: columnAlias; Alias for the column expression.
 Object getValue()
          Gets the value of the attribute: value; Constant value.
 boolean isUseBind()
          Gets the value of the attribute: useBind; Indicates if bind parameters should be used for ConstantExpression when used in SearchConditions.
 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.
static ColumnExpression newExpression(Object a_value)
          Create a new Expression.
static ColumnExpression newExpression(Object a_value, String a_javaType)
          Create a new Expression.
 void setColumnAlias(String a_ColumnAlias)
          Sets the value of the attribute: columnAlias; Alias for the column expression.
 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.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstantExpression

public ConstantExpression(String a_value)
Deprecated. as of R7.0, use newExpression(Object).



Supported API: true

Parameters:
a_value - Specifies a String constant value.
Method Detail

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
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