|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwareag.tamino.db.api.command.TCommandStatement
public class TCommandStatement
Class representing Tamino specific command statements. Each command statement consists of a sequence of TCommandItemPair objects. The first among these is a TCommand/TCommandValue instance pair whereas the others represent TCommandParameter/TCommandParameterValue pair instances. As a consequence Tamino specific commands do not have to be written as encoded string but rather as TCommandStatement instances. The following example depicts a scenario for a XQL statement:
// Instantiate the command statement for xql TCommandStatement commandStatement = new TCommandStatement( TCommand.XQL , new TCommandValue( "Telephone[Lastname=\"Mustermann\"]" ) ); commandStatement.addCommandParameter( TCommandParameter.SESSION_ID , new TCommandParameterValue("6") ); commandStatement.addCommandParameter( TCommandParameter.SESSION_KEY , new TCommandParameterValue("65132" ); System.out.println( "Statement:" commandStatement.toString() ); ... The output for this code snippet is: Statement: _xql(1,5)=Telephone[Lastname="Mustermann"]&_sessionid=6&_sessionkey=65132
Constructor Summary | |
---|---|
TCommandStatement()
Initializes an empty command statement. |
|
TCommandStatement(TCommand mainCommand,
TCommandValue mainCommandValue)
Initializes the command statement with the given main command and its corresponding value. |
Method Summary | |
---|---|
void |
addCommand(TCommand command,
TCommandValue commandValue)
Adds another command/value pair. |
void |
addCommandParameter(TCommandParameter commandParameter,
TCommandParameterValue commandParameterValue)
Adds a command parameter and its corresponding value to the statement. |
void |
clear()
Clears the command statements internal command/value and commandparameter/value representation. |
java.lang.Object |
clone()
Makes a clone of the command statement. |
TCommand |
getCommand()
Returns the main command which just is the first command that has been added. |
TCommandValue |
getCommandValue()
Returns the main command value which just is the first command value that has been added. |
java.util.Iterator<TCommandItemPair> |
getIterator()
Gets the iterator for the navigation over the TCommandItemPair instances stored within the TCommandStatement. |
boolean |
hasSessionState()
|
protected boolean |
isGiven()
Indicates if the command statement is currently given. |
void |
removeCommandParameter(TCommandItemPair key)
Removes a command parameter and its corresponding value to the statement. |
java.lang.String |
toString()
Gets the string representation of the command statement. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TCommandStatement()
public TCommandStatement(TCommand mainCommand, TCommandValue mainCommandValue)
command
- is the Tamino specific command verb abstraction.commandValue
- directly relates to the value for the command. Should be set according to the
Tamino documentation.Method Detail |
---|
public void addCommand(TCommand command, TCommandValue commandValue)
command
- is the Tamino specific command verb abstraction.commandValue
- directly relates to the value for the command. Should be set according to the
Tamino documentation.public void addCommandParameter(TCommandParameter commandParameter, TCommandParameterValue commandParameterValue)
commandParameter
- is the Tamino specific command parameter abstraction.commandParameterValue
- directly relates to the value for the command parameter. Should be set according to the
Tamino documentation.public void removeCommandParameter(TCommandItemPair key)
key
- is the Tamino specific command parameter and its value.public java.util.Iterator<TCommandItemPair> getIterator()
public TCommand getCommand()
public TCommandValue getCommandValue()
public java.lang.String toString()
toString
in class java.lang.Object
public void clear()
public java.lang.Object clone()
clone
in class java.lang.Object
protected boolean isGiven()
public boolean hasSessionState()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |