|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthenplus.AbstractCommand
henplus.commands.SQLCommand
public class SQLCommand
document me.
Field Summary |
---|
Fields inherited from interface henplus.Command |
---|
EXEC_FAILED, SUCCESS, SYNTAX_ERROR |
Constructor Summary | |
---|---|
protected |
SQLCommand(ListUserObjectsCommand tc)
|
|
SQLCommand(ListUserObjectsCommand tc,
PropertyRegistry registry)
|
Method Summary | |
---|---|
Iterator |
complete(CommandDispatcher disp,
String partialCommand,
String lastWord)
Returns a list of strings that are possible at this stage. |
int |
execute(SQLSession session,
String cmd,
String param)
execute the command given. |
String |
getColumnDelimiter()
|
String[] |
getCommandList()
returns the command-strings this command can handle. |
String |
getLongDescription(String cmd)
returns a longer string describing this action. |
int |
getRowLimit()
|
String |
getSynopsis(String cmd)
retuns a synopsis-string. |
boolean |
isComplete(String command)
complicated SQL statements are only complete with semicolon. |
boolean |
isShowFooter()
|
boolean |
isShowHeader()
|
boolean |
participateInCommandCompletion()
don't show the commands available in the toplevel command completion list .. |
void |
setColumnDelimiter(String value)
|
void |
setRowLimit(int rowLimit)
|
void |
setShowFooter(boolean b)
|
void |
setShowHeader(boolean b)
|
void |
shutdown()
shutdown this command. |
Methods inherited from class henplus.AbstractCommand |
---|
argumentCount, getOption, getOptions, getShortDescription, handleCommandline, registerOptions, requiresValidSession, setOptions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected SQLCommand(ListUserObjectsCommand tc)
public SQLCommand(ListUserObjectsCommand tc, PropertyRegistry registry)
Method Detail |
---|
public String[] getCommandList()
public boolean participateInCommandCompletion()
participateInCommandCompletion
in interface Command
participateInCommandCompletion
in class AbstractCommand
public boolean isComplete(String command)
isComplete
in interface Command
isComplete
in class AbstractCommand
command
- the partial command read so far given to decide by
the command whether it is complete or not.public void setColumnDelimiter(String value)
public String getColumnDelimiter()
public void setRowLimit(int rowLimit)
public int getRowLimit()
public void setShowHeader(boolean b)
public boolean isShowHeader()
public void setShowFooter(boolean b)
public boolean isShowFooter()
public int execute(SQLSession session, String cmd, String param)
session
- the SQLsession this command is executed from.cmd
- the command as string.param
- the rest parameters following the command.
public Iterator complete(CommandDispatcher disp, String partialCommand, String lastWord)
Command
complete
in interface Command
complete
in class AbstractCommand
disp
- the CommandDispatcher - you might want to access
other values through it.partialCommand
- The command typed so farlastWord
- the last word returned by readline.public void shutdown()
Command
shutdown
in interface Command
shutdown
in class AbstractCommand
public String getSynopsis(String cmd)
Command
export-xml <table> <filename>
help [command]
Should contain no newline, no leading spaces. This synopsis is printed in the detailed help of a command or if the execute()-method returned a SYNTAX_ERROR.
getSynopsis
in interface Command
getSynopsis
in class AbstractCommand
cmd
- the command the synopsis is for. This is one of the possible
commands returned by Command.getCommandList()
.public String getLongDescription(String cmd)
Command
getLongDescription
in interface Command
getLongDescription
in class AbstractCommand
cmd
- The command the long description is asked for. This
is one of the possible commands returned by
Command.getCommandList()
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |