Перенос.

This commit is contained in:
2023-09-17 22:13:42 +03:00
parent dd2e0ca7e0
commit 629d8b8477
1239 changed files with 61161 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
package Repository;
import Common.Database.SQLITE.SQLiteDatabase;
import Common.Global;
import Repository.BugReport.BugReport;
import Repository.BugReport.BugReportsDBTable;
import Repository.SubscriberWorkspace.SubscriberWorkspaceDBTable;
import Repository.Subscribes.SubsribersDBTable;
import java.nio.file.Paths;
import java.util.Vector;
public class BugReportsDatabase extends SQLiteDatabase {
public BugReportsDBTable bugReports;
public SubsribersDBTable subscribers;
public SubscriberWorkspaceDBTable workspaces; //рабочие пространства для машин.
public BugReportsDatabase() {
super(Paths.get(System.getProperty("user.dir"), "Data", Global.properties.BugReportsDBName).toFile());
}
@Override
protected void initAllTables() throws Exception {
addTable(bugReports = new BugReportsDBTable());
addTable(subscribers = new SubsribersDBTable());
addTable(workspaces = new SubscriberWorkspaceDBTable());
}
@Override
public void Init() throws Exception {
DeleteDrafts();
}
public void DeleteDrafts() throws Exception {
Vector<BugReport> drafts = bugReports.getAllDrafts();
for (BugReport draft : drafts)
Delete(draft);
}
}