package SapforTestingSystem.SapforTasksPackage;
import Common.Constants;
import Common.Database.DBObject;
import Common.Database.nDBObject;
import TestingSystem.TasksPackage.TasksPackageState;
import com.sun.org.glassfish.gmbal.Description;
public class SapforTasksPackage extends nDBObject {
    @Description("DEFAULT ''")
    public String testsNames = "";//имена тестов через ; для отображения
    //---
    public int sapforId = Constants.Nan;
    public String sapfor_version = "?"; //тестируемая версия SAPFOR
    public long sapfor_build_date = 0;
    public String sapfor_drv = "";
    public String sapfor_process_name = "";
    //---
    public String workspace = ""; //домашняя папка
    //---
    public int tasksCount = 0; //Общее число задач
    //---
    public int needsEmail = 0;
    public long StartDate = 0; //дата начала выполнения
    public long ChangeDate = 0;//дата окончания выполнения
    //-
    public int kernels = 1; //количество потоков.
    @Description("DEFAULT 'TestsSynchronize'")
    public TasksPackageState state = TasksPackageState.TestsSynchronize;

    @Description("DEFAULT ''")
    public String testsIds = "";
    @Description("DEFAULT ''")
    public String configurationsIds = "";
    @Description("DEFAULT ''")
    public String summary = "";
    // допустимые состояния
    //Queued
    //PackageStart
    //RunningExecution
    //Done
    //Aborted
    @Override
    public void SynchronizeFields(DBObject src) {
        super.SynchronizeFields(src);
        SapforTasksPackage p = (SapforTasksPackage) src;
        sapforId = p.sapforId;
        testsNames = p.testsNames;
        sapfor_version = p.sapfor_version;
        sapfor_build_date = p.sapfor_build_date;
        workspace = p.workspace;
        tasksCount = p.tasksCount;
        StartDate = p.StartDate;
        ChangeDate = p.ChangeDate;
        kernels = p.kernels;
        sapfor_process_name = p.sapfor_process_name;
        state = p.state;
        needsEmail = p.needsEmail;
    }
}
