Project: stp

com.ibm.rational.stp.client.samples
Class ExecuteQuery

Object
  extended by com.ibm.rational.stp.client.samples.ExecuteQuery

public class ExecuteQuery
extends Object

Pick a query from a list of those available in a database and execute it. Display the result in a table.


Nested Class Summary
(package private) static interface ExecuteQuery.Viewer
          A simple interface for an object that will display a Record resource.
 
Field Summary
(package private) static CqRowData[] g_cell
          The result set made accessible to the GUI components for display
(package private) static String[] g_columns
          The column headings made accessible to the GUI components for display
 
Constructor Summary
ExecuteQuery()
           
 
Method Summary
static void main(String[] args)
          The main program for the ExecuteQuery example.
(package private) static void run(String title, CqProvider provider, ExecuteQuery.Viewer viewer)
          Asks the user to select a database and a query in that database and then executes the query, displaying the results in a table.
(package private) static
<U extends com.ibm.rational.wvcm.stp.StpResource>
javax.wvcm.ResourceList<U>
setUserFriendlyLocation(javax.wvcm.ResourceList<U> list)
           
(package private) static void showResults(String title, ExecuteQuery.Viewer viewer)
          Displays the result set (in g_cell) in a table.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

g_cell

static CqRowData[] g_cell
The result set made accessible to the GUI components for display


g_columns

static String[] g_columns
The column headings made accessible to the GUI components for display

Constructor Detail

ExecuteQuery

public ExecuteQuery()
Method Detail

run

static void run(String title,
                CqProvider provider,
                ExecuteQuery.Viewer viewer)
         throws javax.wvcm.WvcmException
Asks the user to select a database and a query in that database and then executes the query, displaying the results in a table.

Parameters:
title - The title string used in the initial dialog
provider - A javax.wvcm provider for accessing ClearQuest
viewer - A Viewer instance for displaying an individual row of the results set. May be null.
Throws:
javax.wvcm.WvcmException

showResults

static void showResults(String title,
                        ExecuteQuery.Viewer viewer)
Displays the result set (in g_cell) in a table.

Parameters:
title - The title string for the result set window
viewer - A Viewer instance to be used for a detailed display of a single resource of the result set. May be null, in which case the option to display a single resource is not presented.

setUserFriendlyLocation

static <U extends com.ibm.rational.wvcm.stp.StpResource> javax.wvcm.ResourceList<U> setUserFriendlyLocation(javax.wvcm.ResourceList<U> list)
                                                                                                 throws javax.wvcm.WvcmException
Throws:
javax.wvcm.WvcmException

main

public static void main(String[] args)
                 throws Exception
The main program for the ExecuteQuery example.

Parameters:
args - Not used.
Throws:
Exception - If a provider cannot be instantiated.

Generated Wed 1-Apr-2015 09:16 PM

Copyright © IBM 2015. All rights reserved.