package it.integry.integrywmsnative.core.model;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class FiltroOrdineDTO {

    private String gestioneOrd;
    private String dataOrd;
    private int numOrd;

    public String getGestioneOrd() {
        return gestioneOrd;
    }

    public FiltroOrdineDTO setGestioneOrd(String gestioneOrd) {
        this.gestioneOrd = gestioneOrd;
        return this;
    }

    public String getDataOrdS() {
        return dataOrd;
    }

    public Date getDataOrdD() throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
        return sdf.parse(getDataOrdS());
    }

    public FiltroOrdineDTO setDataOrd(String dataOrd) {
        this.dataOrd = dataOrd;
        return this;
    }

    public FiltroOrdineDTO setDataOrd(Date dataOrd) {
        SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
        this.dataOrd = sdf.format(dataOrd);
        return this;
    }

    public int getNumOrd() {
        return numOrd;
    }

    public FiltroOrdineDTO setNumOrd(int numOrd) {
        this.numOrd = numOrd;
        return this;
    }
}
