Files
VisualSapfor/src/Visual_DVM_2021/Passes/All/CloneSapforSettings.java

36 lines
1.3 KiB
Java

package Visual_DVM_2021.Passes.All;
import Common.Current;
import Common.Database.DBObject;
import Common.Global;
import Common.Utils.Vector_;
import Repository.Server.ServerCode;
import Repository.Server.ServerExchangeUnit_2021;
import TestingSystem.Common.TestingServer;
import TestingSystem.SAPFOR.SapforSettings.SapforSettings;
import TestingSystem.SAPFOR.SapforSettingsCommand.SapforSettingsCommand;
import Visual_DVM_2021.Passes.PassCode_2021;
import Visual_DVM_2021.Passes.Server.CloneServerObject;
import java.util.Vector;
public class CloneSapforSettings extends CloneServerObject<TestingServer, SapforSettings> {
public CloneSapforSettings() {
super(Global.testingServer, SapforSettings.class);
}
@Override
protected Current currentName() {
return Current.SapforSettings;
}
@Override
protected void ServerAction() throws Exception {
super.ServerAction();
Vector<PassCode_2021> codes = src.getCodes();
Vector<DBObject> new_commands = new Vector<>();
for (PassCode_2021 code : codes) {
SapforSettingsCommand command = new SapforSettingsCommand();
command.sapforsettings_id = (int) pk;
command.passCode = code;
new_commands.add(command);
}
Command(new ServerExchangeUnit_2021(ServerCode.PublishObjects,null, new_commands));
}
}