no message
This commit is contained in:
36
src/SapforTestingSystem/SapforTask/MatchState.java
Normal file
36
src/SapforTestingSystem/SapforTask/MatchState.java
Normal file
@@ -0,0 +1,36 @@
|
||||
package SapforTestingSystem.SapforTask;
|
||||
import Common.Current;
|
||||
import Common.UI.StatusEnum;
|
||||
import Common.UI.Themes.VisualiserFonts;
|
||||
|
||||
import java.awt.*;
|
||||
public enum MatchState implements StatusEnum {
|
||||
Unknown,
|
||||
Match,
|
||||
NotMatch;
|
||||
public String getDescription() {
|
||||
switch (this) {
|
||||
case Unknown:
|
||||
return "неизвестно";
|
||||
case Match:
|
||||
return "да";
|
||||
case NotMatch:
|
||||
return "нет";
|
||||
default:
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public Font getFont() {
|
||||
switch (this) {
|
||||
case Unknown:
|
||||
return Current.getTheme().Fonts.get(VisualiserFonts.UnknownState);
|
||||
case Match:
|
||||
return Current.getTheme().Fonts.get(VisualiserFonts.GoodState);
|
||||
case NotMatch:
|
||||
return Current.getTheme().Fonts.get(VisualiserFonts.BadState);
|
||||
default:
|
||||
return StatusEnum.super.getFont();
|
||||
}
|
||||
}
|
||||
}
|
||||
16
src/SapforTestingSystem/SapforTask/SapforTaskResult.java
Normal file
16
src/SapforTestingSystem/SapforTask/SapforTaskResult.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package SapforTestingSystem.SapforTask;
|
||||
import Common.Database.DBObject;
|
||||
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage_2023;
|
||||
public class SapforTaskResult extends DBObject {
|
||||
public SapforTasksPackage_2023 sapforTasksPackage;
|
||||
public SapforTask_2023 task;
|
||||
public MatchState match_state = MatchState.Unknown;
|
||||
@Override
|
||||
public Object getPK() {
|
||||
return task.test_description;
|
||||
}
|
||||
public SapforTaskResult(SapforTasksPackage_2023 package_in, SapforTask_2023 task_in) {
|
||||
sapforTasksPackage = package_in;
|
||||
task = task_in;
|
||||
}
|
||||
}
|
||||
55
src/SapforTestingSystem/SapforTask/SapforTask_2023.java
Normal file
55
src/SapforTestingSystem/SapforTask/SapforTask_2023.java
Normal file
@@ -0,0 +1,55 @@
|
||||
package SapforTestingSystem.SapforTask;
|
||||
import Common.Database.DBObject;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.Tasks.TaskState;
|
||||
import SapforTestingSystem.Json.SapforVersion_json;
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
|
||||
import java.util.Vector;
|
||||
public class SapforTask_2023 extends DBObject {
|
||||
//------------------------------------>>
|
||||
@Description("PRIMARY KEY, UNIQUE")
|
||||
@Expose
|
||||
public long id = Utils.Nan;
|
||||
@Description("DEFAULT '-1'")
|
||||
@Expose
|
||||
public int sapfortaskspackage_2023_id = Utils.Nan;
|
||||
//------------------------------------->>
|
||||
@Description("DEFAULT ''")
|
||||
@Expose
|
||||
public String test_description = "";
|
||||
//-------------------------------------->>
|
||||
@Description("IGNORE")
|
||||
@Expose
|
||||
public Vector<SapforVersion_json> versions = new Vector<>();
|
||||
@Description("IGNORE")
|
||||
@Expose
|
||||
public Vector<SapforVersion_json> variants = new Vector<>();
|
||||
//-------------------------------------->>
|
||||
@Description("DEFAULT 'Inactive'")
|
||||
@Expose
|
||||
public TaskState state = TaskState.Inactive;
|
||||
@Description("DEFAULT '0'")
|
||||
@Expose
|
||||
public int versions_tree_built = 0;
|
||||
//-----------
|
||||
public SapforTask_2023() {
|
||||
}
|
||||
public SapforTask_2023(SapforTask_2023 src) {
|
||||
this.SynchronizeFields(src);
|
||||
}
|
||||
@Override
|
||||
public Object getPK() {
|
||||
return id;
|
||||
}
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject object) {
|
||||
super.SynchronizeFields(object);
|
||||
SapforTask_2023 t = (SapforTask_2023) object;
|
||||
id = t.id;
|
||||
sapfortaskspackage_2023_id = t.sapfortaskspackage_2023_id;
|
||||
test_description = t.test_description;
|
||||
state = t.state;
|
||||
}
|
||||
}
|
||||
56
src/SapforTestingSystem/SapforTask/SapforTasksDBTable.java
Normal file
56
src/SapforTestingSystem/SapforTask/SapforTasksDBTable.java
Normal file
@@ -0,0 +1,56 @@
|
||||
package SapforTestingSystem.SapforTask;
|
||||
import Common.Current;
|
||||
import Common.Database.DBTable;
|
||||
import Common.UI.DataSetControlForm;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
import static Common.UI.Tables.TableRenderers.RendererStatusEnum;
|
||||
public class SapforTasksDBTable extends DBTable<Long, SapforTask_2023> {
|
||||
public SapforTasksDBTable() {
|
||||
super(Long.class, SapforTask_2023.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "задача";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "задачи";
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforTask;
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI() {
|
||||
return new DataSetControlForm(this) {
|
||||
@Override
|
||||
protected void AdditionalInitColumns() {
|
||||
columns.get(2).setRenderer(RendererStatusEnum);
|
||||
}
|
||||
@Override
|
||||
public void MouseAction2() throws Exception {
|
||||
Pass_2021.passes.get(PassCode_2021.OpenSapforTest).Do();
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"Тест",
|
||||
"Статус"
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(SapforTask_2023 object, int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 1:
|
||||
return object.test_description;
|
||||
case 2:
|
||||
return object.state;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user