be.SIRAPRISE.client
Class DmlUpdateCommand
java.lang.Object
be.SIRAPRISE.client.DmlCommand
be.SIRAPRISE.client.DmlAssignmentCommand
be.SIRAPRISE.client.DmlSingleAssignmentCommand
be.SIRAPRISE.client.DmlUpdateCommand
public final class DmlUpdateCommand
- extends DmlSingleAssignmentCommand
A DmlUpdateCommand is the command that will replace a tuple with another one in the named relvar (in the target database to which this command will be sent) for the object passed to the constructor. The replaced tuple is determined by the object's getPreUpdateState() return object (which must be of the same class as the object itself), the replacing tuple by the object itself. The command will fail if the replaced tuple is not present in the named relvar, or if the replacing tuple is already present.
- Author:
- Erwin Smout
Field Summary |
static byte |
ASSIGNMENTTYPE
The byte code identifying the 'UPDATE' assignment type within the messages system |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ASSIGNMENTTYPE
public static final byte ASSIGNMENTTYPE
- The byte code identifying the 'UPDATE' assignment type within the messages system
- See Also:
- Constant Field Values
DmlUpdateCommand
public DmlUpdateCommand(java.lang.String relvarName,
UpdatableDBObject o)
throws NoUpdatesException
- Creates the command object. See the DmlAssignmentCommand doc for an explanation of how the relvar's heading and the object's class must correspond to one another.
- Parameters:
relvarName
- The name of the relvar in which a tuple for the object is to be added.o
- The object for which a tuple is to be added in the named relvar
- Throws:
NoUpdatesException
- if no attribute value changes at all are detected
java.lang.IllegalArgumentException
- If relvarName or o are null, or if relvarName is the zero-length string, or the getPreUpdateState() method of o returns either null or an object that is not of the same class as o.
getCommand
public java.lang.String getCommand()
- Description copied from class:
DmlCommand
- Gets the command text
- Specified by:
getCommand
in class DmlCommand
- Returns:
- the command text
getServerCommand
public ServerCommand getServerCommand()
- Description copied from class:
DmlCommand
- Gets the ServerCommand object representing this dml command
- Specified by:
getServerCommand
in class DmlCommand
- Returns:
- the ServerCommand object representing this dml command
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object