package com.its.wthr.process;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class DbmsJobData {

    private long    start;
    private int     type;
    private boolean isHistory;
    private Object  data;
    private int     count;

    public DbmsJobData(int type, boolean isHistory, Object data, int count) {
        this.start     = System.nanoTime();
        this.type      = type;
        this.isHistory = isHistory;
        this.data      = data;
        this.count     = count;
    }

    @Override
    public String toString() {
        String typeName = DbmsJobType.getTypeName(this.type);
        String sHistory = this.isHistory ? "History: Yes." : "History: No.";
        return typeName + ", " + sHistory + ", " + this.count + " EA.";
    }

}
