рефакторинг

This commit is contained in:
2025-02-18 16:21:20 +03:00
parent 9c0ed53d52
commit 0a123988b3
163 changed files with 938 additions and 367 deletions

View File

@@ -0,0 +1,29 @@
package _VisualDVM.ComponentsServer.BugReport;
import Common.Database.Tables.DBTable;
import Common.Visual.DataSetControlForm;
import _VisualDVM.ComponentsServer.BugReport.UI.BugReportsForm;
import javax.swing.*;
import java.util.Vector;
import java.util.stream.Collectors;
public class BugReportsDBTable extends DBTable<String, BugReport> {
public BugReportsDBTable() {
super(String.class, BugReport.class);
}
@Override
public String getSingleDescription() {
return "отчёт об ошибке";
}
@Override
public String getPluralDescription() {
return "отчёты об ошибках";
}
@Override
protected DataSetControlForm createUI(JPanel mountPanel) {
return new BugReportsForm(this, mountPanel);
}
public Vector<BugReport> getAllDrafts() throws Exception {
return Data.values().stream().filter(bugReport -> bugReport.state.equals(BugReportState.draft)).collect(Collectors.toCollection(Vector::new));
}
//-
}