промежуточный. часть большого рефакторинга, касательно проходов связанных с сервером. Обновлена публикация групп.
This commit is contained in:
@@ -5,6 +5,7 @@ import Repository.BugReport.BugReport;
|
||||
import Repository.BugReport.BugReportsDBTable;
|
||||
import Repository.SubscriberWorkspace.SubscriberWorkspaceDBTable;
|
||||
import Repository.Subscribes.SubsribersDBTable;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Vector;
|
||||
@@ -25,6 +26,10 @@ public class BugReportsDatabase extends SQLiteDatabase {
|
||||
public void Init() throws Exception {
|
||||
DeleteDrafts();
|
||||
}
|
||||
@Override
|
||||
public PassCode_2021 getSynchronizePassCode() {
|
||||
return PassCode_2021.SynchronizeBugReports;
|
||||
}
|
||||
public void DeleteDrafts() throws Exception {
|
||||
Vector<BugReport> drafts = bugReports.getAllDrafts();
|
||||
for (BugReport draft : drafts)
|
||||
|
||||
@@ -254,6 +254,12 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
DeleteAction(dbObject);
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
break;
|
||||
case DeleteObjectByPK:
|
||||
Print("Удалить объект по ключу");
|
||||
Pair<Class, Object> to_delete = (Pair<Class, Object>) request.object;
|
||||
DeleteAction(db.DeleteByPK(to_delete.getKey(), to_delete.getValue()));
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
break;
|
||||
case GetObjectCopyByPK:
|
||||
p = (Pair<Class, Object>) request.object;
|
||||
Print("Получить копию объекта класса " + p.getKey().toString() + " по ключу " + p.getValue());
|
||||
@@ -284,7 +290,7 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
//------------------------
|
||||
case PublishAIObject:
|
||||
dbObject = (DBObject) request.object;
|
||||
Print("Опубликовать объект с автоинкрементным ключом" + dbObject.getPK());
|
||||
Print("Опубликовать объект с автоинкрементным ключом");
|
||||
db.Insert(dbObject); //проверка не нужна,АИ гарантирует что ключ уникален.
|
||||
PublishAction(dbObject);
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
@@ -337,4 +343,5 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
}
|
||||
public void CopyAction(rDBObject src, rDBObject dst) throws Exception {
|
||||
}
|
||||
//--
|
||||
}
|
||||
|
||||
@@ -73,6 +73,7 @@ public enum ServerCode {
|
||||
Patch,
|
||||
EmailSapforAssembly,
|
||||
//-
|
||||
DeleteObjectByPK,
|
||||
DeleteAccountObjectByPK,
|
||||
//-
|
||||
OLD,
|
||||
|
||||
Reference in New Issue
Block a user