2025-02-18 16:21:20 +03:00
|
|
|
|
package _VisualDVM.ComponentsServer.BugReport;
|
2024-10-07 00:58:29 +03:00
|
|
|
|
import Common.Database.Tables.DBTable;
|
2024-10-08 00:39:13 +03:00
|
|
|
|
import Common.Visual.DataSetControlForm;
|
2025-02-18 16:21:20 +03:00
|
|
|
|
import _VisualDVM.ComponentsServer.BugReport.UI.BugReportsForm;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
|
|
|
|
|
|
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
|
2024-10-22 19:17:01 +03:00
|
|
|
|
public String getSingleDescription() {
|
|
|
|
|
|
return "отчёт об ошибке";
|
|
|
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public String getPluralDescription() {
|
|
|
|
|
|
return "отчёты об ошибках";
|
|
|
|
|
|
}
|
|
|
|
|
|
@Override
|
2024-10-17 20:04:16 +03:00
|
|
|
|
protected DataSetControlForm createUI(JPanel mountPanel) {
|
2024-10-20 17:27:58 +03:00
|
|
|
|
return new BugReportsForm(this, mountPanel);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public Vector<BugReport> getAllDrafts() throws Exception {
|
|
|
|
|
|
return Data.values().stream().filter(bugReport -> bugReport.state.equals(BugReportState.draft)).collect(Collectors.toCollection(Vector::new));
|
|
|
|
|
|
}
|
2024-10-20 13:34:38 +03:00
|
|
|
|
//-
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|