package _VisualDVM.ProjectData.PredictorStatistic;
import Common.Database.Objects.DBObject;
import com.google.gson.annotations.Expose;
import com.sun.org.glassfish.gmbal.Description;

import java.util.Date;

import static _VisualDVM.ProjectData.SapforData.Variants.ParallelVariant.rankNaN;
import static _VisualDVM.ProjectData.SapforData.Variants.ParallelVariant.statNaN;
public class PredictorStatistics extends DBObject {
    @Description("PRIMARY KEY, UNIQUE")
    public String key = "";
    public long PredictionTime = 0;
    //json----------------------------------
    @Expose
    public long ParallelCount = statNaN;
    @Expose
    public long RemoteCount = statNaN;
    @Expose
    public long RedistributeCount = statNaN;
    @Expose
    public long IntervalCount = statNaN;
    @Expose
    public long PS_RemoteCount = statNaN;
    @Expose
    public long PS_ShadowCount = statNaN;
    @Expose
    public long PS_ReductionCount = statNaN;
    @Expose
    public long PS_AcrossCount = statNaN;
    @Expose
    public long TotalScore = rankNaN;
    ///---------------------------------------------
    @Description("DEFAULT ''")
    public String last_version = "";
    //-------------------------------------------
    @Description("IGNORE")
    public boolean loaded = true;
    //этот конструктор только для пустой статистики.
    public PredictorStatistics(String key_in) {
        key = key_in;
        loaded = false;
    }
    public PredictorStatistics() {
    }
    public Date getPredictionDate() {
        return new Date(PredictionTime);
    }
    @Override
    public Object getPK() {
        return key;
    }
}
