Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

oracle.ide.db.panels.sql
Class SQLQueryEditDialog

java.lang.Object
  extended by oracle.ide.db.panels.sql.SQLQueryEditDialog
All Implemented Interfaces:
java.util.Comparator

public final class SQLQueryEditDialog
extends java.lang.Object
implements java.util.Comparator

Dialog launcher for editing SQL queries.


Field Summary
static java.lang.String HELP_FROM_INFO
           
static java.lang.String HELP_GROUPBY_INFO
           
static java.lang.String HELP_HAVING_INFO
           
static java.lang.String HELP_JOIN_INFO
          Deprecated. - we no longer use the "FK Joins" panel.
static java.lang.String HELP_ORDERBY_INFO
           
static java.lang.String HELP_PICKER
           
static java.lang.String HELP_QUERY_INFO
           
static java.lang.String HELP_SELECT_INFO
           
static java.lang.String HELP_WHERE_INFO
           
 
Constructor Summary
SQLQueryEditDialog()
          Creates a new launcher for an edit dialog for sql queries.
SQLQueryEditDialog(boolean materializedView)
          Creates a new launcher for an edit dialog for sql queries.
SQLQueryEditDialog(java.lang.String[] helpIDs)
          Creates a new launcher with custom help IDs for the panels.
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Dummy Comparator implementation that always returns equal.
 SQLQuery editQuery(SQLQuery query, DBObjectProvider provider, Schema defaultSchema)
          Edits the given query.
 SQLQuery editQuery(SQLQuery query, SQLFragment defaultObject, DBObjectProvider provider, Schema defaultSchema)
          Edits the given query.
 java.lang.String editQuery(java.lang.String sqlText, DBObjectProvider provider, Schema defaultSchema)
          Edits the given query sql text.
 Navigable getMasterNavigable()
          Returns a master Navigable object that has all the required child naviagables for editing a query.
 Navigable[] getNavigables()
          Returns a set of Navigable objects for the pages required to edit a SQLQuery.
static java.lang.String[] getStartPage(SQLFragment child, boolean incMaster)
          Returns the appropriate start page path for editing the given child of a query.
 Step[] getSteps()
          Returns a set of Step objects for the pages required to creating a SQLQuery.
static boolean isAvailable(DBObjectProvider pro)
          Returns true if the SQLQueryEditDialog support the given provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

HELP_PICKER

public static final java.lang.String HELP_PICKER
See Also:
Constant Field Values

HELP_SELECT_INFO

public static final java.lang.String HELP_SELECT_INFO
See Also:
Constant Field Values

HELP_FROM_INFO

public static final java.lang.String HELP_FROM_INFO
See Also:
Constant Field Values

HELP_WHERE_INFO

public static final java.lang.String HELP_WHERE_INFO
See Also:
Constant Field Values

HELP_GROUPBY_INFO

public static final java.lang.String HELP_GROUPBY_INFO
See Also:
Constant Field Values

HELP_HAVING_INFO

public static final java.lang.String HELP_HAVING_INFO
See Also:
Constant Field Values

HELP_ORDERBY_INFO

public static final java.lang.String HELP_ORDERBY_INFO
See Also:
Constant Field Values

HELP_QUERY_INFO

public static final java.lang.String HELP_QUERY_INFO
See Also:
Constant Field Values

HELP_JOIN_INFO

@Deprecated
public static final java.lang.String HELP_JOIN_INFO
Deprecated. - we no longer use the "FK Joins" panel.
See Also:
Constant Field Values
Constructor Detail

SQLQueryEditDialog

public SQLQueryEditDialog()
Creates a new launcher for an edit dialog for sql queries.


SQLQueryEditDialog

public SQLQueryEditDialog(boolean materializedView)
Creates a new launcher for an edit dialog for sql queries.

Parameters:
materializedView - if building query for a MV, the Ordre By panel will not be shown.

SQLQueryEditDialog

public SQLQueryEditDialog(java.lang.String[] helpIDs)
Creates a new launcher with custom help IDs for the panels.

Method Detail

getNavigables

public Navigable[] getNavigables()
Returns a set of Navigable objects for the pages required to edit a SQLQuery.


getMasterNavigable

public Navigable getMasterNavigable()
Returns a master Navigable object that has all the required child naviagables for editing a query.


getSteps

public Step[] getSteps()
Returns a set of Step objects for the pages required to creating a SQLQuery.


editQuery

public java.lang.String editQuery(java.lang.String sqlText,
                                  DBObjectProvider provider,
                                  Schema defaultSchema)
                           throws SQLQueryException
Edits the given query sql text. Throws a SQLQueryException if the query text does not parse as a valid SQL query.

Parameters:
sqlText - the query text to edit
provider - the provider to use
defaultSchema - the default schema for the query (can be null).
Returns:
String the edited query
Throws:
SQLQueryException

editQuery

public SQLQuery editQuery(SQLQuery query,
                          DBObjectProvider provider,
                          Schema defaultSchema)
                   throws SQLQueryException
Edits the given query. Throws a SQLQueryException if the query text does not parse as a valid SQL query.

Parameters:
query - the query to edit
provider - the provider to use
defaultSchema - the default schema for the query.
Returns:
the edited query
Throws:
SQLQueryException

editQuery

public SQLQuery editQuery(SQLQuery query,
                          SQLFragment defaultObject,
                          DBObjectProvider provider,
                          Schema defaultSchema)
                   throws SQLQueryException
Edits the given query. Throws a SQLQueryException if the query text does not parse as a valid SQL query.

Parameters:
query - the query to edit
defaultObject - the default object within the query to start the edit with
provider - the provider to use
defaultSchema - the default schema for the query
Returns:
the edited query
Throws:
SQLQueryException

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Dummy Comparator implementation that always returns equal.

Specified by:
compare in interface java.util.Comparator

getStartPage

public static final java.lang.String[] getStartPage(SQLFragment child,
                                                    boolean incMaster)
Returns the appropriate start page path for editing the given child of a query. Supports SelectObject, FromObject, WhereObject, GroupByObject and OrderByObject.

Parameters:
child - the child of the query whose page we require.
incMaster - whether the master panel is inculded in the path.

isAvailable

public static boolean isAvailable(DBObjectProvider pro)
Returns true if the SQLQueryEditDialog support the given provider. Currently we only support Oracle SQL and therefore can only support providers on Oracle databases.


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

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