рефакторинг удаления пакета

This commit is contained in:
2023-11-18 02:37:56 +03:00
parent f52139a8b5
commit 022ece9c49
4 changed files with 38 additions and 48 deletions

View File

@@ -0,0 +1,23 @@
package Visual_DVM_2021.Passes.Server;
import Common.Current;
import Common.Database.Database;
import Common.Database.riDBObject;
import Common.Global;
import Repository.Server.ServerCode;
import Repository.Server.ServerExchangeUnit_2021;
import TestingSystem.Common.TestingServer;
import javafx.util.Pair;
public class DeleteServerAccountObject<D extends riDBObject> extends DeleteServerObject<TestingServer, D> {
public DeleteServerAccountObject(Class<D> d_in) {
super(Global.testingServer, d_in);
}
@Override
protected Database getDb() {
return Global.testingServer.account_db;
}
@Override
protected void ServerAction() throws Exception {
Command(new ServerExchangeUnit_2021(ServerCode.DeleteAccountObjectByPK, Current.getAccount().email,
new Pair<>(target.getClass(), target.getPK())));
}
}

View File

@@ -1,6 +1,5 @@
package Visual_DVM_2021.Passes.Server;
import Common.Constants;
import Common.Current;
import Common.Database.DBObject;
import Common.Database.iDBObject;
import Common.Global;
@@ -136,10 +135,4 @@ public abstract class RepositoryPass<S extends RepositoryServer, T> extends Pass
Command(new ServerExchangeUnit_2021(ServerCode.DeleteObjectByPK, "",
new Pair<>(object.getClass(), object.getPK())));
}
//-------------------------------------------
//--- ОБЪЕКТЫ БАЗЫ ПОЛЬЗОВАТЕЛЯ
public void DeleteAccountObject(DBObject object) throws Exception {
Command(new ServerExchangeUnit_2021(ServerCode.DeleteAccountObjectByPK, Current.getAccount().email,
new Pair<>(object.getClass(), object.getPK())));
}
}