|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.objectweb.cjdbc.controller.console.VirtualDatabaseConsole
C-JDBC Controller Virtual Database Console module.
| Field Summary | |
static CommandCompletorInterface |
COMPLETOR
Command completor. |
private java.sql.Connection |
connection
|
private ConsoleHelperInterface |
helper
Interface to the console helper. |
private static int |
MAX_COLUMN_DISPLAY_WIDTH
Max column width when displaying a ResultSet. |
private int |
timeout
Default query timeout. |
| Constructor Summary | |
VirtualDatabaseConsole(ConsoleHelperInterface helper)
Creates a new VirtualDatabaseAdmin instance. |
|
| Method Summary | |
void |
callStoredProcedure(java.lang.String proc,
boolean displayResult)
Call a store procedure. |
private void |
displayPad(java.lang.String text,
int size)
|
void |
displayResultSet(java.sql.ResultSet rs)
Display the given ResultSet. |
private void |
displaySeparatorLine(int columnCount,
java.sql.ResultSetMetaData meta)
|
void |
execSQL(java.lang.String request,
boolean displayResult)
Executes a SQL statement. |
java.sql.Connection |
getConnection(java.lang.String url,
java.lang.String login,
java.lang.String password)
Gets a new connection from the driver. |
void |
handlePrompt(java.lang.String url)
Connects to a virtual database. |
void |
help()
Displays help message. |
void |
load(java.lang.String fileName)
Executes all the SQL requests contained in the specified file. |
void |
showtables()
Display all tables of this virtual database |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final CommandCompletorInterface COMPLETOR
private static final int MAX_COLUMN_DISPLAY_WIDTH
ResultSet.
private ConsoleHelperInterface helper
private java.sql.Connection connection
private int timeout
| Constructor Detail |
public VirtualDatabaseConsole(ConsoleHelperInterface helper)
VirtualDatabaseAdmin instance.
helper - console helper| Method Detail |
public java.sql.Connection getConnection(java.lang.String url,
java.lang.String login,
java.lang.String password)
url - the C-JDBC urllogin - the login to use to open the connectionpassword - the password to use to open the connection
private void displaySeparatorLine(int columnCount,
java.sql.ResultSetMetaData meta)
throws java.sql.SQLException
java.sql.SQLException
private void displayPad(java.lang.String text,
int size)
public void displayResultSet(java.sql.ResultSet rs)
throws java.sql.SQLException
ResultSet.
rs - the ResultSet to display
java.sql.SQLException - if an error occurs
public void callStoredProcedure(java.lang.String proc,
boolean displayResult)
proc - the stored procedure to calldisplayResult - true if the result must be printed on
the standard output
public void execSQL(java.lang.String request,
boolean displayResult)
request - the SQL request to executedisplayResult - true if the result must be printed on
the standard outputpublic void showtables()
public void load(java.lang.String fileName)
fileName - the file name to openpublic void help()
public void handlePrompt(java.lang.String url)
url - URL to connect
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||