Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.javatools.db.sql
Class ParserUtils

java.lang.Object
  extended by oracle.javatools.db.sql.ParserUtils

public class ParserUtils
extends java.lang.Object

Since:
10.1.3

Nested Class Summary
static class ParserUtils.ExpressionType
           
 
Method Summary
static void checkErrors(PlsqlRoot root, java.lang.String sql)
          Deprecated. 
static java.util.Collection<java.lang.String[]> getColumnNames(SqlExpression sqlExpression)
          Deprecated. 
static java.util.Collection<java.lang.String[]> getColumnNames(SQLFragment sqlFragment)
           
static java.util.Collection<java.lang.String[]> getColumnNames(java.lang.String expression, ParserUtils.ExpressionType type)
          Deprecated. 
static java.util.Collection<java.lang.String[]> getColumnNames(java.lang.String expression, SQLFragmentExpressionBuilder.ExpressionType type, DBObjectProvider prov, Relation rel)
          Returns a Collection of names of the columns used in expression.
static java.lang.String getConstant(PlsqlNode node)
          Deprecated. 
static java.lang.String getHexToRawString(PlsqlNode node)
          Deprecated. 
static java.lang.String getString(PlsqlNode node)
          Deprecated. 
static boolean isAllowedExpression(PlsqlNode node, java.util.List validOperators)
          Deprecated. 
static boolean isAllowedStringType(PlsqlNode node, java.util.List validStringTypes)
          Deprecated. 
static boolean isConstant(PlsqlNode node)
          Deprecated. 
static boolean isDbObjectName(PlsqlNode node)
          Deprecated. 
static boolean isNull(PlsqlNode node)
          Deprecated. 
static PlsqlRoot parseQueryString(java.lang.String expression, int type)
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getHexToRawString

@Deprecated
public static java.lang.String getHexToRawString(PlsqlNode node)
Deprecated. 

Get hextoraw String. If this node is the hextoraw function, return the string argument, otherwise return null.


getString

@Deprecated
public static java.lang.String getString(PlsqlNode node)
Deprecated. 

Get a String constant. If this node is a String constant, return the string, otherwise, return null.


isAllowedExpression

@Deprecated
public static boolean isAllowedExpression(PlsqlNode node,
                                                     java.util.List validOperators)
Deprecated. 

Is this one of the allowed expression nodes


isAllowedStringType

@Deprecated
public static boolean isAllowedStringType(PlsqlNode node,
                                                     java.util.List validStringTypes)
Deprecated. 

Is this one of the allowed String nodes


isConstant

@Deprecated
public static boolean isConstant(PlsqlNode node)
Deprecated. 

Is this a non null string or numeric constant


isNull

@Deprecated
public static boolean isNull(PlsqlNode node)
Deprecated. 

Is this the value NULL


isDbObjectName

@Deprecated
public static boolean isDbObjectName(PlsqlNode node)
Deprecated. 

Is this a database object name.


getConstant

@Deprecated
public static java.lang.String getConstant(PlsqlNode node)
Deprecated. 

Returns the value of a string constant node(STRTCONS), or null if node isn't an instanceof SqlStrdef.


getColumnNames

public static java.util.Collection<java.lang.String[]> getColumnNames(java.lang.String expression,
                                                                      SQLFragmentExpressionBuilder.ExpressionType type,
                                                                      DBObjectProvider prov,
                                                                      Relation rel)
                                                               throws SQLQueryException
Returns a Collection of names of the columns used in expression. Expression is either a select list item SQLFragmentExpressionBuilder.ExpressionType.ITEM or a condition SQLFragmentExpressionBuilder.ExpressionType.CONDITION
Parameters:
expression - the arithmetic expression to be parsed for column names
type - an expression type defined in oracle.javatools.parser.plsql.syntax.SqlDriver
Returns:
a Collection of column names defined as arrays of String, or a non-null empty Collection if there are no column names.
Throws:
SQLQueryException - when there are errors in expression

getColumnNames

public static java.util.Collection<java.lang.String[]> getColumnNames(SQLFragment sqlFragment)

getColumnNames

@Deprecated
public static java.util.Collection<java.lang.String[]> getColumnNames(java.lang.String expression,
                                                                                 ParserUtils.ExpressionType type)
                                                               throws SQLQueryException
Deprecated. 

Deprecated. Use getColumnNames(String expression, ExpressionType type, DBObjectProvider prov, Relation rel) instread. Returns a Collection of names of the columns used in expression of SqlDriver type type. The names are stored as an array of name components. The meaning of the components depends upon the context in which the name is used. For example, the name A.B in a select list would mean table.column, but in a constraint or index context, it would mean column.attribute as table.column is invalid in such a context.

Parameters:
expression - the arithmetic expression to be parsed for column names
type - an expression type defined in oracle.javatools.parser.plsql.syntax.SqlDriver
Returns:
a Collection of column names defined as arrays of String, or a non-null empty Collection if there are no column names.
Throws:
SQLQueryException - when there are errors in expression

getColumnNames

@Deprecated
public static java.util.Collection<java.lang.String[]> getColumnNames(SqlExpression sqlExpression)
Deprecated. 

Deprecated, use getColumnNames( SQLFragment ) instead. Returns a Collection of names of the columns used in sqlExpression The names are stored as an array of name components. The meaning of the components depends upon the context in which the name is used. For example, the name A.B in a select list would mean table.column, but in a constraint or index context, it would mean column.attribute as table.column is invalid in such a context.

Parameters:
sqlExpression - the SqlExpression to be searched for column names
Returns:
a Collection of column names defined as arrays of String, or a non-null empty Collection if there are no column names.

checkErrors

@Deprecated
public static void checkErrors(PlsqlRoot root,
                                          java.lang.String sql)
                        throws SQLQueryException
Deprecated. 

Convert parser errors into a SQLQueryException

Parameters:
root -
sql -
Throws:
SQLQueryException

parseQueryString

@Deprecated
public static PlsqlRoot parseQueryString(java.lang.String expression,
                                                    int type)
                                  throws SQLQueryException
Deprecated. 

Parse an SQL expression

Parameters:
expression -
type - SqlDriver type eg SqlDriver.INPUT_AEX
Returns:
the operand tree
Throws:
SQLQueryException

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

Copyright © 1997, 2011, Oracle. All rights reserved.