промежуточный. переходный момент в рефакторинге багов. нужен для патча.
This commit is contained in:
8
.idea/workspace.xml
generated
8
.idea/workspace.xml
generated
@@ -7,8 +7,12 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UserAccount.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UserAccount.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReport/BugReport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReport/BugReport.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReport/UI/BugReportsForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReport/UI/BugReportsForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReportRecipient/BugReportRecipient.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReportRecipient/BugReportRecipient.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReportSetting/BugReportSetting.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReportSetting/BugReportSetting.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReportsDatabase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReportsDatabase.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package _VisualDVM.ComponentsServer.BugReport;
|
||||
import Common.CommonConstants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Objects.rDBObject;
|
||||
import Common.Utils.TextLog;
|
||||
@@ -18,6 +19,10 @@ import java.nio.file.Paths;
|
||||
import java.util.Date;
|
||||
import java.util.Vector;
|
||||
public class BugReport extends rDBObject {
|
||||
//---
|
||||
@Description("DEFAULT '-1'")
|
||||
public int id_ = CommonConstants.Nan;
|
||||
//---
|
||||
public String project_version = "";
|
||||
public long visualiser_version = -1;
|
||||
public long sapfor_version = -1;
|
||||
@@ -62,6 +67,7 @@ public class BugReport extends rDBObject {
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
super.SynchronizeFields(src);
|
||||
BugReport b = (BugReport) src;
|
||||
id_ = b.id_;
|
||||
change_date = b.change_date;
|
||||
description = b.description;
|
||||
comment = b.comment;
|
||||
|
||||
@@ -100,6 +100,12 @@ public class BugReportsForm extends DataSetControlForm<BugReport> {
|
||||
public Class getRendererClass() {
|
||||
return RendererStatusEnum.class;
|
||||
}
|
||||
},
|
||||
new ColumnInfo<BugReport>("id_") {
|
||||
@Override
|
||||
public Object getFieldAt(BugReport object) {
|
||||
return object.id_;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
package _VisualDVM.ComponentsServer.BugReportRecipient;
|
||||
import Common.CommonConstants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Objects.iDBObject;
|
||||
import _VisualDVM.ComponentsServer.BugReport.BugReport;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
public class BugReportRecipient extends iDBObject {
|
||||
public String bugreport_id = "";
|
||||
public String email = "";
|
||||
@Description("DEFAULT '-1'")
|
||||
public int bugreport_id_ = CommonConstants.Nan;
|
||||
public BugReportRecipient() {
|
||||
}
|
||||
public BugReportRecipient(BugReport bugReport, String email_in) {
|
||||
@@ -20,5 +24,6 @@ public class BugReportRecipient extends iDBObject {
|
||||
BugReportRecipient src_ = (BugReportRecipient) src;
|
||||
bugreport_id = src_.bugreport_id;
|
||||
email = src_.email;
|
||||
bugreport_id_ = src_.bugreport_id_;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
package _VisualDVM.ComponentsServer.BugReportSetting;
|
||||
import Common.CommonConstants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Objects.iDBObject;
|
||||
import _VisualDVM.ComponentsServer.BugReport.BugReport;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
public class BugReportSetting extends iDBObject {
|
||||
public String bugreport_id = "";
|
||||
public String name = "";
|
||||
public String value = "";
|
||||
@Description("DEFAULT '-1'")
|
||||
public int bugreport_id_ = CommonConstants.Nan;
|
||||
public BugReportSetting() {
|
||||
}
|
||||
public BugReportSetting(BugReport bugReport, String name_in, Object value_in) {
|
||||
@@ -23,5 +27,6 @@ public class BugReportSetting extends iDBObject {
|
||||
bugreport_id = src_.bugreport_id;
|
||||
name = src_.name;
|
||||
value = src_.value;
|
||||
bugreport_id_ = src_.bugreport_id_;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,13 @@ import _VisualDVM.ComponentsServer.BugReport.BugReport;
|
||||
import _VisualDVM.ComponentsServer.BugReport.BugReportsDBTable;
|
||||
import _VisualDVM.ComponentsServer.BugReportRecipient.BugReportRecipient;
|
||||
import _VisualDVM.ComponentsServer.BugReportRecipient.BugReportRecipientsDBTable;
|
||||
import _VisualDVM.ComponentsServer.BugReportSetting.BugReportSetting;
|
||||
import _VisualDVM.ComponentsServer.BugReportSetting.BugReportSettingsDBTable;
|
||||
import _VisualDVM.ComponentsServer.Recipient.RecipientsDataSet;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Comparator;
|
||||
import java.util.Vector;
|
||||
public class BugReportsDatabase extends SQLiteDatabase {
|
||||
public BugReportsDBTable bugReports;
|
||||
@@ -27,6 +29,8 @@ public class BugReportsDatabase extends SQLiteDatabase {
|
||||
@Override
|
||||
public void Init() throws Exception {
|
||||
DeleteDrafts();
|
||||
//--
|
||||
Patch();
|
||||
}
|
||||
@Override
|
||||
public PassCode getSynchronizePassCode() {
|
||||
@@ -58,5 +62,33 @@ public class BugReportsDatabase extends SQLiteDatabase {
|
||||
}
|
||||
}
|
||||
public void Patch() throws Exception {
|
||||
int i = 0;
|
||||
Vector<BugReport> sortedBugs = new Vector<>(bugReports.Data.values());
|
||||
sortedBugs.sort(new Comparator<BugReport>() {
|
||||
@Override
|
||||
public int compare(BugReport o1, BugReport o2) {
|
||||
return Long.compare(o1.date,o2.date);
|
||||
}
|
||||
});
|
||||
//--
|
||||
for (BugReport bugReport: sortedBugs){
|
||||
bugReport.id_ = i;
|
||||
++i;
|
||||
Update(bugReport);
|
||||
}
|
||||
//--
|
||||
for (BugReport bugReport: sortedBugs){
|
||||
Vector<BugReportSetting> bugSettings = getVectorByFK(bugReport, BugReportSetting.class);
|
||||
Vector<BugReportRecipient> bugReportRecipients = getVectorByFK(bugReport, BugReportRecipient.class);
|
||||
for (BugReportSetting setting: bugSettings){
|
||||
setting.bugreport_id_ = bugReport.id_;
|
||||
Update(setting);
|
||||
}
|
||||
for (BugReportRecipient recipient: bugReportRecipients){
|
||||
recipient.bugreport_id_ = bugReport.id_;
|
||||
Update(recipient);
|
||||
}
|
||||
}
|
||||
//--
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class Constants {
|
||||
public static final int MailSocketPort = 465;
|
||||
//
|
||||
//7998 отладочный порт. теперь.
|
||||
public static final int ComponentsServerPort = 7995; //7795
|
||||
public static final int ComponentsServerPort = 7998; //7795
|
||||
public static final int TestingServerPort = 7996; //7996
|
||||
public static final int SocketTimeout = 0;
|
||||
//-
|
||||
|
||||
Reference in New Issue
Block a user