Class CompoundCommand
- java.lang.Object
-
- com.sodius.mdw.metamodel.integrity.io.command.ExecutableCommandWrapper
-
- com.sodius.mdw.metamodel.integrity.io.command.CompoundCommand
-
- All Implemented Interfaces:
ExecutableCommand
public class CompoundCommand extends ExecutableCommandWrapper
A group of commands used to minimize the number of executions between a Java program and the Integrity server.
A compound command might be used to group the execution of nested commands, to minimize the communication between the Java program and the Integrity server and to improve performances.
This compound command will automatically decide which set of commands can be grouped together. For example, commands that modify the fields of the same
Item
can be grouped together for a unique execution.If nested commands cannot be grouped, they will be executed sequentially. So using a
CompoundCommand
even in that case would not introduce extra overhead.
-
-
Constructor Summary
Constructors Constructor Description CompoundCommand()
Instantiates an empty compound command.CompoundCommand(List<ExecutableCommand> commands)
Instantiates an command that wraps the specified list of commands.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(ExecutableCommand command)
Wraps a command in the compound command.void
addAll(List<ExecutableCommand> commands)
Wraps commands in the compound command.-
Methods inherited from class com.sodius.mdw.metamodel.integrity.io.command.ExecutableCommandWrapper
execute
-
-
-
-
Constructor Detail
-
CompoundCommand
public CompoundCommand()
Instantiates an empty compound command.
-
CompoundCommand
public CompoundCommand(List<ExecutableCommand> commands)
Instantiates an command that wraps the specified list of commands.- Parameters:
commands
- the commands to wrap in the compound command.
-
-
Method Detail
-
add
public void add(ExecutableCommand command)
Wraps a command in the compound command.- Parameters:
command
- the command to be wrapped.
-
addAll
public void addAll(List<ExecutableCommand> commands)
Wraps commands in the compound command.- Parameters:
commands
- the commands to be wrapped.
-
-