|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.cjdbc.console.text.module.AbstractConsoleModule org.objectweb.cjdbc.console.text.module.VirtualDatabaseConsole
C-JDBC Controller Virtual Database Console module.
Nested Class Summary |
Nested classes inherited from class org.objectweb.cjdbc.console.text.module.AbstractConsoleModule |
AbstractConsoleModule.CommandDelimiter |
Field Summary | |
private java.sql.Connection |
connection
|
private int |
fetchsize
|
private java.lang.String |
login
|
private int |
maxrows
|
private java.util.Hashtable |
savePoints
contains a hash of |
private int |
timeout
Default query timeout. |
private java.lang.String |
url
|
Fields inherited from class org.objectweb.cjdbc.console.text.module.AbstractConsoleModule |
commands, console, consoleCompletor, history, quit |
Constructor Summary | |
VirtualDatabaseConsole(Console console)
Creates a new VirtualDatabaseAdmin instance. |
Method Summary | |
void |
addSavePoint(java.sql.Savepoint savePoint)
add a SavePoint |
java.sql.Connection |
createConnection(java.lang.String url,
java.lang.String login,
java.lang.String password)
Create a new connection from the driver. |
void |
execSQL(java.lang.String request,
boolean displayResult)
Executes a SQL statement. |
java.sql.Connection |
getConnection()
Get the JDBC connection used by the sql console. |
java.lang.String |
getDescriptionString()
Text description of this module |
int |
getFetchsize()
Get the fetchsize value |
java.lang.String |
getPromptString()
Get the prompt string for this module |
java.sql.Savepoint |
getSavePoint(java.lang.String name)
Get a SavePoint identified by its name |
int |
getTimeout()
Get the timeout value (in seconds) |
void |
handlePrompt()
Connects to a virtual database. |
void |
help()
Display help for this module |
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 |
setFetchsize(int fetchsize)
Set the fetchsize |
void |
setMaxrows(int maxrows)
Set the maxrows |
void |
setTimeout(int timeout)
Set the timeout value (in seconds) |
Methods inherited from class org.objectweb.cjdbc.console.text.module.AbstractConsoleModule |
findConsoleCommand, getCommands, getCompletor, getConsole, getHashCommands, getHistory, handleCommandLine, loadCompletor, loadHistory, manageHistory, reloadCompletor, storeHistory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.sql.Connection connection
private java.util.Hashtable savePoints
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 consoleMethod Detail |
public java.sql.Connection getConnection()
public java.sql.Connection createConnection(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 failedpublic 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 handlePrompt()
handlePrompt
in class AbstractConsoleModule
public java.lang.String getDescriptionString()
AbstractConsoleModule
getDescriptionString
in class AbstractConsoleModule
String
description to displayAbstractConsoleModule.getDescriptionString()
public java.lang.String getPromptString()
AbstractConsoleModule
getPromptString
in class AbstractConsoleModule
String
to place before promptAbstractConsoleModule.getPromptString()
public java.sql.Savepoint getSavePoint(java.lang.String name)
SavePoint
identified by its name
name
- name fo the SavePoint
SavePoint
or null
if no SavePoint
with
such a name has been previously addedpublic void addSavePoint(java.sql.Savepoint savePoint) throws java.sql.SQLException
SavePoint
savePoint
- the SavePoint
to add
java.sql.SQLException
- if the savePoint
is unnamedpublic int getTimeout()
public void setTimeout(int timeout)
timeout
- new timeout value (in seconds)public int getFetchsize()
public void setFetchsize(int fetchsize)
fetchsize
- new fetchsize valuepublic void setMaxrows(int maxrows)
maxrows
- new maxrows valueprotected void loadCommands()
AbstractConsoleModule
loadCommands
in class AbstractConsoleModule
AbstractConsoleModule.loadCommands()
public void login(java.lang.String[] params) throws java.lang.Exception
AbstractConsoleModule
login
in class AbstractConsoleModule
params
- parameters to use to login in this module
java.lang.Exception
- if failsAbstractConsoleModule.login(java.lang.String[])
public void quit()
AbstractConsoleModule
quit
in class AbstractConsoleModule
AbstractConsoleModule.quit()
public void help()
AbstractConsoleModule
help
in class AbstractConsoleModule
AbstractConsoleModule.help()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |