|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.objectweb.cjdbc.console.text.module.AbstractConsoleModule
org.objectweb.cjdbc.console.text.module.VirtualDatabaseConsole
C-JDBC Controller Virtual Database Console module.
| Field Summary | |
private java.sql.Connection |
connection
|
private int |
fetchsize
|
private java.lang.String |
login
|
private static int |
MAX_COLUMN_DISPLAY_WIDTH
Max column width when displaying a ResultSet. |
private int |
maxrows
|
private int |
timeout
Default query timeout. |
private java.lang.String |
url
|
| Fields inherited from class org.objectweb.cjdbc.console.text.module.AbstractConsoleModule |
commands, console, history, quit |
| Constructor Summary | |
VirtualDatabaseConsole(Console console)
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. |
java.lang.String |
getDescriptionString()
Text description of this module |
java.lang.String |
getPromptString()
Get the prompt string for this module |
void |
handlePrompt()
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. |
protected void |
loadCommands()
Loads the commands for this module |
void |
login(java.lang.String[] params)
Handles login in this module |
void |
quit()
Quit this module |
void |
showtables()
Display all tables of this virtual database |
| Methods inherited from class org.objectweb.cjdbc.console.text.module.AbstractConsoleModule |
getCommands, getConsole, getHashCommands, getHistory, handleCommandLine, loadCompletor, manageHistory |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final int MAX_COLUMN_DISPLAY_WIDTH
ResultSet.
private java.sql.Connection connection
private int timeout
private int fetchsize
private int maxrows
private java.lang.String login
private java.lang.String url
| Constructor Detail |
public VirtualDatabaseConsole(Console console)
VirtualDatabaseAdmin instance. Loads the
driver
console - console console| Method Detail |
public java.sql.Connection getConnection(java.lang.String url,
java.lang.String login,
java.lang.String password)
throws ConsoleException
url - the C-JDBC urllogin - the login to use to open the connectionpassword - the password to use to open the connection
ConsoleException - if login failed
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()
help in class AbstractConsoleModulepublic void handlePrompt()
handlePrompt in class AbstractConsoleModulepublic java.lang.String getDescriptionString()
AbstractConsoleModule
getDescriptionString in class AbstractConsoleModuleString description to displayAbstractConsoleModule.getDescriptionString()public java.lang.String getPromptString()
AbstractConsoleModule
getPromptString in class AbstractConsoleModuleString to place before promptAbstractConsoleModule.getPromptString()protected void loadCommands()
AbstractConsoleModule
loadCommands in class AbstractConsoleModuleAbstractConsoleModule.loadCommands()
public void login(java.lang.String[] params)
throws java.lang.Exception
AbstractConsoleModule
login in class AbstractConsoleModuleparams - parameters to use to login in this module
java.lang.Exception - if failsAbstractConsoleModule.login(java.lang.String[])public void quit()
AbstractConsoleModule
quit in class AbstractConsoleModuleAbstractConsoleModule.quit()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||