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
This class represents a constant in a SQL statement.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
- See Also:
-
Field Summary
Fields inherited from interface wt.query.ColumnExpression
COLUMN_ALIAS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the value of the attribute: columnAlias; Alias for the column expression.getValue()Gets the value of the attribute: value; Constant value.booleanGets the value of the attribute: useBind; Indicates if bind parameters should be used for ConstantExpression when used in SearchConditions.booleanGets the value of the attribute: useEscape; This attribute indicates if the constant expression should use an ESCAPE clause that specifies the '\' character.static ColumnExpressionnewExpression(Object a_value) Create a new Expression.static ColumnExpressionnewExpression(Object a_value, String a_javaType) Create a new Expression.voidsetColumnAlias(String a_ColumnAlias) Sets the value of the attribute: columnAlias; Alias for the column expression.voidsetUseBind(boolean a_UseBind) Sets the value of the attribute: useBind; Indicates if bind parameters should be used for ConstantExpression when used in SearchConditions.voidsetUseEscape(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.
-
Constructor Details
-
ConstantExpression
Supported API: true- Parameters:
a_value- Specifies the constant value.
-
-
Method Details
-
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
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
Create a new Expression.
Supported API: true- Parameters:
a_value- Specifies the constant value.- Returns:
- ColumnExpression
-
getColumnAlias
Gets the value of the attribute: columnAlias; Alias for the column expression.
Supported API: true- Specified by:
getColumnAliasin interfaceColumnExpression- Specified by:
getColumnAliasin interfaceOrderByExpression- Returns:
- String
-
setColumnAlias
Sets the value of the attribute: columnAlias; Alias for the column expression.
Supported API: true- Specified by:
setColumnAliasin interfaceColumnExpression- Parameters:
a_ColumnAlias-- Throws:
WTPropertyVetoException
-