public class TCommandStatement
extends java.lang.Object
implements java.lang.Cloneable
// 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 and Description |
---|
TCommandStatement()
Initializes an empty command statement.
|
TCommandStatement(TCommand mainCommand,
TCommandValue mainCommandValue)
Initializes the command statement with the given main command and its corresponding value.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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.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()
Copyright (c) 2017 Software AG. All Rights Reserved.