|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.query.KeywordExpression
This class represents an expression that evaluates to a SQL keyword that
can be used in a SQL statement. There is no special significance to
the values represented by this class. When the value evaluates to a
string representation it is not quoted and cannot be replaced with a
bind parameter.
Supported API: true
Extendable: false
Field Summary | |
private boolean |
advancedQueryEnabled
|
static KeywordExpression |
BIND_PARAMETER
Constant keyword expression representing a SQL bind parameter. |
private static String |
CLASSNAME
|
static KeywordExpression |
COLUMN_WILDCARD
Constant keyword expression representing all columns. |
private String |
columnAlias
|
private Class |
javaType
|
static KeywordExpression |
NULL
Constant keyword expression representing SQL NULL. |
private static String |
RESOURCE
|
static KeywordExpression |
ROWNUM
Deprecated. as of R8.0, this keyword is not standard on all datastores. |
private String |
value
|
Fields inherited from interface wt.query.ColumnExpression |
ADVANCED_QUERY, ADVANCED_QUERY_ENABLED, COLUMN_ALIAS, JAVA_TYPE |
Fields inherited from interface wt.query.Expression |
FROM_COUNT |
Constructor Summary | |
private |
KeywordExpression()
|
|
KeywordExpression(String a_value)
Deprecated. Use newKeywordExpression(KeywordExpression) |
private |
KeywordExpression(String a_value,
Class a_javaType)
|
Method Summary | |
Object |
getBindParameter()
Gets the value of the attribute: bindParameter; Returns a bind parameter for this expression (if supported). |
List |
getClassAttributes()
Supported API: false |
String |
getColumnAlias()
Gets the value of the attribute: columnAlias; Alias for the column expression. |
String |
getExpression(boolean a_useBind,
Vector a_tableInfos,
Vector a_aliases,
boolean a_outerJoin)
Return string representation of this expression. |
int |
getFromCount()
Gets the value of the attribute: fromCount; Number of from index values that this expression requires Supported API: false |
Class |
getJavaType()
Gets the value of the attribute: javaType; The java type of this expression. |
String |
getValue()
Gets the value of the attribute: value; Keyword string representation. |
boolean |
isAdvancedQuery()
Gets the value of the attribute: advancedQuery; Indicates if the expression uses advanced query capabilities. |
boolean |
isAdvancedQueryEnabled()
Gets the value of the attribute: advancedQueryEnabled; Indicates if advanced query capabilities are enabled. |
static boolean |
isEqual(KeywordExpression k1,
KeywordExpression k2)
|
static List |
list(boolean a_internalUseOnly,
boolean a_advancedQuery)
Returns a list of available keywords. |
static KeywordExpression |
newKeywordExpression(KeywordExpression a_keyword)
Creates a new KeywordExpression from the specified KeywordExpression constant. |
static KeywordExpression |
newKeywordExpression(KeywordExpression a_keyword,
Class a_javaType)
Creates a new KeywordExpression from the specified KeywordExpression constant and type. |
void |
setAdvancedQueryEnabled(boolean a_AdvancedQueryEnabled)
Sets the value of the attribute: advancedQueryEnabled; Indicates if advanced query capabilities are enabled. |
void |
setColumnAlias(String a_ColumnAlias)
Sets the value of the attribute: columnAlias; Alias for the column expression. |
int |
setFromAlias(String[] a_aliases,
int a_offset)
This method sets the FROM clause alias for this expression. |
String |
toString()
|
int |
validate(TableExpression[] a_tableExpressions,
int a_offset)
This method validates this expression against the specified table expression. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private String value
public static final KeywordExpression ROWNUM
public static final KeywordExpression COLUMN_WILDCARD
public static final KeywordExpression NULL
public static final KeywordExpression BIND_PARAMETER
private Class javaType
private String columnAlias
private transient boolean advancedQueryEnabled
Constructor Detail |
private KeywordExpression()
public KeywordExpression(String a_value)
a_value
- Specifies the keyword.private KeywordExpression(String a_value, Class a_javaType)
a_value
- Specifies the keyword.a_javaType
- Java type for this keywordMethod Detail |
public String getValue()
public Class getJavaType() throws WTException
getJavaType
in interface ColumnExpression
WTException
public static KeywordExpression newKeywordExpression(KeywordExpression a_keyword)
a_keyword
- Specifies the keyword.
public static KeywordExpression newKeywordExpression(KeywordExpression a_keyword, Class a_javaType) throws WTException
a_keyword
- Specifies the keyword.a_javaType
- Specifies the type of the Keyword expression.
WTException
public String getColumnAlias()
getColumnAlias
in interface ColumnExpression
public void setColumnAlias(String a_ColumnAlias) throws WTPropertyVetoException
setColumnAlias
in interface ColumnExpression
a_ColumnAlias
-
WTPropertyVetoException
public boolean isAdvancedQuery() throws WTException
isAdvancedQuery
in interface ColumnExpression
WTException
public boolean isAdvancedQueryEnabled()
isAdvancedQueryEnabled
in interface ColumnExpression
public void setAdvancedQueryEnabled(boolean a_AdvancedQueryEnabled)
setAdvancedQueryEnabled
in interface ColumnExpression
a_AdvancedQueryEnabled
- public int getFromCount()
getFromCount
in interface Expression
public int validate(TableExpression[] a_tableExpressions, int a_offset) throws QueryException
validate
in interface Expression
a_tableExpressions
- Table expression to validate against.a_offset
- Offset index into the TableExpression array for the next valid TableExpression
QueryException
public int setFromAlias(String[] a_aliases, int a_offset)
setFromAlias
in interface Expression
a_aliases
- Array of aliases for expressionsa_offset
- Offset index into the alias array for the next valid alias
public Object getBindParameter() throws WTException
getBindParameter
in interface RelationalExpression
WTException
public String getExpression(boolean a_useBind, Vector a_tableInfos, Vector a_aliases, boolean a_outerJoin) throws QueryException
getExpression
in interface RelationalExpression
a_useBind
- Indicates that bind variables should be used for this expression.a_tableInfos
- a_aliases
- a_outerJoin
- Indicates that outer join syntax should be used for this expression.
QueryException
public List getClassAttributes()
getClassAttributes
in interface RelationalExpression
public static List list(boolean a_internalUseOnly, boolean a_advancedQuery)
a_internalUseOnly
- indicates if keywords suitable for internal
use only should be included
public static boolean isEqual(KeywordExpression k1, KeywordExpression k2)
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |