package it.integry.integrywmsnative.core.model;

import java.math.BigDecimal;
import java.util.List;

import it.integry.integrywmsnative.core.utility.UtilityString;

/**
 * Created by GiuseppeS on 06/03/2018.
 */

public class MtbAart extends EntityBase {

    private String codMart;
    private String descrizione;
    private String untMis;
    private String barCode;
    private BigDecimal pesoKg;
    private BigDecimal qtaCnf;
    private String codAliq;
    private String codScoArt;
    private String codTcolUi;
    private String codTcolUl;
    private String articoloComposto;
    private String esposizioneComp;
    private String descrizioneEstesa;
    private String codUltForn;
    private String dataUltCar;
    private BigDecimal valUltCar;
    private String codUltClie;
    private String dataUltScar;
    private BigDecimal valUltScar;
    private String tipoCodice;
    private String note;
    private String posizione;
    private BigDecimal colliPedana;
    private String untMis2;
    private BigDecimal rapConv2;
    private String flagInclListino;
    private String untMis3;
    private BigDecimal rapConv3;
    private String codMartStat;
    private String codMcon;
    private String codMgrp;
    private String codMsfa;
    private String codMsgr;
    private String codMstp;
    private String codMtip;
    private String descrizioneStat;
    private String flagStato;
    private BigDecimal cambioDiviCar;
    private BigDecimal cambioDiviScar;
    private Integer ggScadPartita;
    private BigDecimal volumeMc;
    private String flagEsponiPrz;
    private String dataUltVar;
    private BigDecimal percSfrido;
    private String codBarreImb;
    private String flagCalcPrz;
    private String esposizioneCompAcq;
    private String flagCalcPrzAcq;
    private String diacod;
    private String plu;
    private String partIvaProd;
    private String ragSocProd;
    private String flagRapConvVariabile;
    private String flagMovArtMag;
    private String flagTracciabilita;
    private BigDecimal taraKg;
    private BigDecimal colliStrato;
    private String flagQtaCnfFissa;
    private String flagColliPedanaFisso;
    private String codCconCosti;
    private String codCconRicavi;
    private String codDgrpArt;
    private String codDiviCar;
    private String codDiviScar;
    private String codEcrCat;
    private String codEcrMcat;
    private String codEcrRep;
    private String codEcrStipo;
    private String codEcrTipo;
    private String codGrpBolla;
    private String ingredienti;
    private String idArtEqui;
    private String descrCassa;
    private String codNcIntracee;
    private String marchio;
    private Integer sezione;
    private UntMisRifPesoEnum untMisRifPeso;
    
    private BigDecimal qtaEsistente;
    private BigDecimal qtaImpegnata;
    private BigDecimal numCnfEsistente;
    private BigDecimal numCnfImpegnata;

    private List<MtbUntMis> mtbUntMis;


    public enum UntMisRifPesoEnum {
        C,
        M;
    }



    public MtbAart() {
        this.type = "mtb_aart";
    }

    public boolean isFlagTracciabilitaBoolean() {
        return flagTracciabilita != null && flagTracciabilita.equalsIgnoreCase("S");
    }

    public boolean isFlagQtaCnfFissaBoolean() {
        return "S".equalsIgnoreCase(flagQtaCnfFissa);
    }




    public String getCodMart() {
        return codMart;
    }

    public MtbAart setCodMart(String codMart) {
        this.codMart = codMart;
        return this;
    }

    public String getDescrizione() {
        return descrizione;
    }

    public MtbAart setDescrizione(String descrizione) {
        this.descrizione = descrizione;
        return this;
    }

    public String getUntMis() {
        return untMis;
    }

    public MtbAart setUntMis(String untMis) {
        this.untMis = untMis;
        return this;
    }

    public String getBarCode() {
        return barCode;
    }

    public MtbAart setBarCode(String barCode) {
        this.barCode = barCode;
        return this;
    }

    public BigDecimal getPesoKg() {
        return pesoKg;
    }

    public MtbAart setPesoKg(BigDecimal pesoKg) {
        this.pesoKg = pesoKg;
        return this;
    }

    public BigDecimal getQtaCnf() {
        return qtaCnf;
    }

    public MtbAart setQtaCnf(BigDecimal qtaCnf) {
        this.qtaCnf = qtaCnf;
        return this;
    }

    public String getCodAliq() {
        return codAliq;
    }

    public MtbAart setCodAliq(String codAliq) {
        this.codAliq = codAliq;
        return this;
    }

    public String getCodScoArt() {
        return codScoArt;
    }

    public MtbAart setCodScoArt(String codScoArt) {
        this.codScoArt = codScoArt;
        return this;
    }

    public String getCodTcolUi() {
        return codTcolUi;
    }

    public MtbAart setCodTcolUi(String codTcolUi) {
        this.codTcolUi = codTcolUi;
        return this;
    }

    public String getCodTcolUl() {
        return codTcolUl;
    }

    public MtbAart setCodTcolUl(String codTcolUl) {
        this.codTcolUl = codTcolUl;
        return this;
    }

    public String getArticoloComposto() {
        return articoloComposto;
    }

    public MtbAart setArticoloComposto(String articoloComposto) {
        this.articoloComposto = articoloComposto;
        return this;
    }

    public String getEsposizioneComp() {
        return esposizioneComp;
    }

    public MtbAart setEsposizioneComp(String esposizioneComp) {
        this.esposizioneComp = esposizioneComp;
        return this;
    }

    public String getDescrizioneEstesa() {
        return descrizioneEstesa;
    }

    public MtbAart setDescrizioneEstesa(String descrizioneEstesa) {
        this.descrizioneEstesa = descrizioneEstesa;
        return this;
    }

    public String getCodUltForn() {
        return codUltForn;
    }

    public MtbAart setCodUltForn(String codUltForn) {
        this.codUltForn = codUltForn;
        return this;
    }

    public String getDataUltCar() {
        return dataUltCar;
    }

    public MtbAart setDataUltCar(String dataUltCar) {
        this.dataUltCar = dataUltCar;
        return this;
    }

    public BigDecimal getValUltCar() {
        return valUltCar;
    }

    public MtbAart setValUltCar(BigDecimal valUltCar) {
        this.valUltCar = valUltCar;
        return this;
    }

    public String getCodUltClie() {
        return codUltClie;
    }

    public MtbAart setCodUltClie(String codUltClie) {
        this.codUltClie = codUltClie;
        return this;
    }

    public String getDataUltScar() {
        return dataUltScar;
    }

    public MtbAart setDataUltScar(String dataUltScar) {
        this.dataUltScar = dataUltScar;
        return this;
    }

    public BigDecimal getValUltScar() {
        return valUltScar;
    }

    public MtbAart setValUltScar(BigDecimal valUltScar) {
        this.valUltScar = valUltScar;
        return this;
    }

    public String getTipoCodice() {
        return tipoCodice;
    }

    public MtbAart setTipoCodice(String tipoCodice) {
        this.tipoCodice = tipoCodice;
        return this;
    }

    public String getNote() {
        return note;
    }

    public MtbAart setNote(String note) {
        this.note = note;
        return this;
    }

    public String getPosizione() {
        return posizione;
    }

    public MtbAart setPosizione(String posizione) {
        this.posizione = posizione;
        return this;
    }

    public BigDecimal getColliPedana() {
        return colliPedana;
    }

    public MtbAart setColliPedana(BigDecimal colliPedana) {
        this.colliPedana = colliPedana;
        return this;
    }

    public String getUntMis2() {
        return untMis2;
    }

    public MtbAart setUntMis2(String untMis2) {
        this.untMis2 = untMis2;
        return this;
    }

    public BigDecimal getRapConv2() {
        return rapConv2;
    }

    public MtbAart setRapConv2(BigDecimal rapConv2) {
        this.rapConv2 = rapConv2;
        return this;
    }

    public String getFlagInclListino() {
        return flagInclListino;
    }

    public MtbAart setFlagInclListino(String flagInclListino) {
        this.flagInclListino = flagInclListino;
        return this;
    }

    public String getUntMis3() {
        return untMis3;
    }

    public MtbAart setUntMis3(String untMis3) {
        this.untMis3 = untMis3;
        return this;
    }

    public BigDecimal getRapConv3() {
        return rapConv3;
    }

    public MtbAart setRapConv3(BigDecimal rapConv3) {
        this.rapConv3 = rapConv3;
        return this;
    }

    public String getCodMartStat() {
        return codMartStat;
    }

    public MtbAart setCodMartStat(String codMartStat) {
        this.codMartStat = codMartStat;
        return this;
    }

    public String getCodMcon() {
        return codMcon;
    }

    public MtbAart setCodMcon(String codMcon) {
        this.codMcon = codMcon;
        return this;
    }

    public String getCodMgrp() {
        return codMgrp;
    }

    public MtbAart setCodMgrp(String codMgrp) {
        this.codMgrp = codMgrp;
        return this;
    }

    public String getCodMsfa() {
        return codMsfa;
    }

    public MtbAart setCodMsfa(String codMsfa) {
        this.codMsfa = codMsfa;
        return this;
    }

    public String getCodMsgr() {
        return codMsgr;
    }

    public MtbAart setCodMsgr(String codMsgr) {
        this.codMsgr = codMsgr;
        return this;
    }

    public String getCodMstp() {
        return codMstp;
    }

    public MtbAart setCodMstp(String codMstp) {
        this.codMstp = codMstp;
        return this;
    }

    public String getCodMtip() {
        return codMtip;
    }

    public MtbAart setCodMtip(String codMtip) {
        this.codMtip = codMtip;
        return this;
    }

    public String getDescrizioneStat() {
        return descrizioneStat;
    }

    public MtbAart setDescrizioneStat(String descrizioneStat) {
        this.descrizioneStat = descrizioneStat;
        return this;
    }

    public String getFlagStato() {
        return flagStato;
    }

    public MtbAart setFlagStato(String flagStato) {
        this.flagStato = flagStato;
        return this;
    }

    public BigDecimal getCambioDiviCar() {
        return cambioDiviCar;
    }

    public MtbAart setCambioDiviCar(BigDecimal cambioDiviCar) {
        this.cambioDiviCar = cambioDiviCar;
        return this;
    }

    public BigDecimal getCambioDiviScar() {
        return cambioDiviScar;
    }

    public MtbAart setCambioDiviScar(BigDecimal cambioDiviScar) {
        this.cambioDiviScar = cambioDiviScar;
        return this;
    }

    public Integer getGgScadPartita() {
        return ggScadPartita;
    }

    public MtbAart setGgScadPartita(Integer ggScadPartita) {
        this.ggScadPartita = ggScadPartita;
        return this;
    }

    public BigDecimal getVolumeMc() {
        return volumeMc;
    }

    public MtbAart setVolumeMc(BigDecimal volumeMc) {
        this.volumeMc = volumeMc;
        return this;
    }

    public String getFlagEsponiPrz() {
        return flagEsponiPrz;
    }

    public MtbAart setFlagEsponiPrz(String flagEsponiPrz) {
        this.flagEsponiPrz = flagEsponiPrz;
        return this;
    }

    public String getDataUltVar() {
        return dataUltVar;
    }

    public MtbAart setDataUltVar(String dataUltVar) {
        this.dataUltVar = dataUltVar;
        return this;
    }

    public BigDecimal getPercSfrido() {
        return percSfrido;
    }

    public MtbAart setPercSfrido(BigDecimal percSfrido) {
        this.percSfrido = percSfrido;
        return this;
    }

    public String getCodBarreImb() {
        return codBarreImb;
    }

    public MtbAart setCodBarreImb(String codBarreImb) {
        this.codBarreImb = codBarreImb;
        return this;
    }

    public String getFlagCalcPrz() {
        return flagCalcPrz;
    }

    public MtbAart setFlagCalcPrz(String flagCalcPrz) {
        this.flagCalcPrz = flagCalcPrz;
        return this;
    }

    public String getEsposizioneCompAcq() {
        return esposizioneCompAcq;
    }

    public MtbAart setEsposizioneCompAcq(String esposizioneCompAcq) {
        this.esposizioneCompAcq = esposizioneCompAcq;
        return this;
    }

    public String getFlagCalcPrzAcq() {
        return flagCalcPrzAcq;
    }

    public MtbAart setFlagCalcPrzAcq(String flagCalcPrzAcq) {
        this.flagCalcPrzAcq = flagCalcPrzAcq;
        return this;
    }

    public String getDiacod() {
        return diacod;
    }

    public MtbAart setDiacod(String diacod) {
        this.diacod = diacod;
        return this;
    }

    public String getPlu() {
        return plu;
    }

    public MtbAart setPlu(String plu) {
        this.plu = plu;
        return this;
    }

    public String getPartIvaProd() {
        return partIvaProd;
    }

    public MtbAart setPartIvaProd(String partIvaProd) {
        this.partIvaProd = partIvaProd;
        return this;
    }

    public String getRagSocProd() {
        return ragSocProd;
    }

    public MtbAart setRagSocProd(String ragSocProd) {
        this.ragSocProd = ragSocProd;
        return this;
    }

    public String getFlagRapConvVariabile() {
        return flagRapConvVariabile;
    }

    public boolean getFlagRapConvVariabileBoolean() {
        return !UtilityString.isNullOrEmpty(flagRapConvVariabile) && flagRapConvVariabile.equalsIgnoreCase("S");
    }

    public MtbAart setFlagRapConvVariabile(String flagRapConvVariabile) {
        this.flagRapConvVariabile = flagRapConvVariabile;
        return this;
    }

    public String getFlagMovArtMag() {
        return flagMovArtMag;
    }

    public MtbAart setFlagMovArtMag(String flagMovArtMag) {
        this.flagMovArtMag = flagMovArtMag;
        return this;
    }

    public String getFlagTracciabilita() {
        return flagTracciabilita;
    }

    public MtbAart setFlagTracciabilita(String flagTracciabilita) {
        this.flagTracciabilita = flagTracciabilita;
        return this;
    }

    public BigDecimal getTaraKg() {
        return taraKg;
    }

    public MtbAart setTaraKg(BigDecimal taraKg) {
        this.taraKg = taraKg;
        return this;
    }

    public BigDecimal getColliStrato() {
        return colliStrato;
    }

    public MtbAart setColliStrato(BigDecimal colliStrato) {
        this.colliStrato = colliStrato;
        return this;
    }

    public String getFlagQtaCnfFissa() {
        return flagQtaCnfFissa;
    }

    public MtbAart setFlagQtaCnfFissa(String flagQtaCnfFissa) {
        this.flagQtaCnfFissa = flagQtaCnfFissa;
        return this;
    }

    public String getFlagColliPedanaFisso() {
        return flagColliPedanaFisso;
    }

    public MtbAart setFlagColliPedanaFisso(String flagColliPedanaFisso) {
        this.flagColliPedanaFisso = flagColliPedanaFisso;
        return this;
    }

    public String getCodCconCosti() {
        return codCconCosti;
    }

    public MtbAart setCodCconCosti(String codCconCosti) {
        this.codCconCosti = codCconCosti;
        return this;
    }

    public String getCodCconRicavi() {
        return codCconRicavi;
    }

    public MtbAart setCodCconRicavi(String codCconRicavi) {
        this.codCconRicavi = codCconRicavi;
        return this;
    }

    public String getCodDgrpArt() {
        return codDgrpArt;
    }

    public MtbAart setCodDgrpArt(String codDgrpArt) {
        this.codDgrpArt = codDgrpArt;
        return this;
    }

    public String getCodDiviCar() {
        return codDiviCar;
    }

    public MtbAart setCodDiviCar(String codDiviCar) {
        this.codDiviCar = codDiviCar;
        return this;
    }

    public String getCodDiviScar() {
        return codDiviScar;
    }

    public MtbAart setCodDiviScar(String codDiviScar) {
        this.codDiviScar = codDiviScar;
        return this;
    }

    public String getCodEcrCat() {
        return codEcrCat;
    }

    public MtbAart setCodEcrCat(String codEcrCat) {
        this.codEcrCat = codEcrCat;
        return this;
    }

    public String getCodEcrMcat() {
        return codEcrMcat;
    }

    public MtbAart setCodEcrMcat(String codEcrMcat) {
        this.codEcrMcat = codEcrMcat;
        return this;
    }

    public String getCodEcrRep() {
        return codEcrRep;
    }

    public MtbAart setCodEcrRep(String codEcrRep) {
        this.codEcrRep = codEcrRep;
        return this;
    }

    public String getCodEcrStipo() {
        return codEcrStipo;
    }

    public MtbAart setCodEcrStipo(String codEcrStipo) {
        this.codEcrStipo = codEcrStipo;
        return this;
    }

    public String getCodEcrTipo() {
        return codEcrTipo;
    }

    public MtbAart setCodEcrTipo(String codEcrTipo) {
        this.codEcrTipo = codEcrTipo;
        return this;
    }

    public String getCodGrpBolla() {
        return codGrpBolla;
    }

    public MtbAart setCodGrpBolla(String codGrpBolla) {
        this.codGrpBolla = codGrpBolla;
        return this;
    }

    public String getIngredienti() {
        return ingredienti;
    }

    public MtbAart setIngredienti(String ingredienti) {
        this.ingredienti = ingredienti;
        return this;
    }

    public String getIdArtEqui() {
        return idArtEqui;
    }

    public MtbAart setIdArtEqui(String idArtEqui) {
        this.idArtEqui = idArtEqui;
        return this;
    }

    public String getDescrCassa() {
        return descrCassa;
    }

    public MtbAart setDescrCassa(String descrCassa) {
        this.descrCassa = descrCassa;
        return this;
    }

    public String getCodNcIntracee() {
        return codNcIntracee;
    }

    public MtbAart setCodNcIntracee(String codNcIntracee) {
        this.codNcIntracee = codNcIntracee;
        return this;
    }

    public String getMarchio() {
        return marchio;
    }

    public MtbAart setMarchio(String marchio) {
        this.marchio = marchio;
        return this;
    }

    public Integer getSezione() {
        return sezione;
    }

    public MtbAart setSezione(Integer sezione) {
        this.sezione = sezione;
        return this;
    }

    public List<MtbUntMis> getMtbUntMis() {
        return mtbUntMis;
    }

    public MtbAart setMtbUntMis(List<MtbUntMis> mtbUntMis) {
        this.mtbUntMis = mtbUntMis;
        return this;
    }

    public UntMisRifPesoEnum getUntMisRifPeso() {
        return untMisRifPeso;
    }

    public MtbAart setUntMisRifPeso(UntMisRifPesoEnum untMisRifPeso) {
        this.untMisRifPeso = untMisRifPeso;
        return this;
    }

    public BigDecimal getQtaEsistente() {
        return qtaEsistente;
    }

    public MtbAart setQtaEsistente(BigDecimal qtaEsistente) {
        this.qtaEsistente = qtaEsistente;
        return this;
    }

    public BigDecimal getQtaImpegnata() {
        return qtaImpegnata;
    }

    public MtbAart setQtaImpegnata(BigDecimal qtaImpegnata) {
        this.qtaImpegnata = qtaImpegnata;
        return this;
    }

    public BigDecimal getNumCnfEsistente() {
        return numCnfEsistente;
    }

    public MtbAart setNumCnfEsistente(BigDecimal numCnfEsistente) {
        this.numCnfEsistente = numCnfEsistente;
        return this;
    }

    public BigDecimal getNumCnfImpegnata() {
        return numCnfImpegnata;
    }

    public MtbAart setNumCnfImpegnata(BigDecimal numCnfImpegnata) {
        this.numCnfImpegnata = numCnfImpegnata;
        return this;
    }


    public MtbUntMis getFirstUntMis() {
        return getMtbUntMis() != null && !getMtbUntMis().isEmpty() ? getMtbUntMis().get(0) : null;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MtbAart mtbAart = (MtbAart) o;

        if (!getCodMart().equals(mtbAart.getCodMart())) return false;
        if (getDescrizione() != null ? !getDescrizione().equals(mtbAart.getDescrizione()) : mtbAart.getDescrizione() != null)
            return false;
        if (getUntMis() != null ? !getUntMis().equals(mtbAart.getUntMis()) : mtbAart.getUntMis() != null)
            return false;
        if (getBarCode() != null ? !getBarCode().equals(mtbAart.getBarCode()) : mtbAart.getBarCode() != null)
            return false;
        if (getPesoKg() != null ? !getPesoKg().equals(mtbAart.getPesoKg()) : mtbAart.getPesoKg() != null)
            return false;
        if (getQtaCnf() != null ? !getQtaCnf().equals(mtbAart.getQtaCnf()) : mtbAart.getQtaCnf() != null)
            return false;
        if (getCodAliq() != null ? !getCodAliq().equals(mtbAart.getCodAliq()) : mtbAart.getCodAliq() != null)
            return false;
        if (getCodScoArt() != null ? !getCodScoArt().equals(mtbAart.getCodScoArt()) : mtbAart.getCodScoArt() != null)
            return false;
        if (getCodTcolUi() != null ? !getCodTcolUi().equals(mtbAart.getCodTcolUi()) : mtbAart.getCodTcolUi() != null)
            return false;
        if (getCodTcolUl() != null ? !getCodTcolUl().equals(mtbAart.getCodTcolUl()) : mtbAart.getCodTcolUl() != null)
            return false;
        if (getArticoloComposto() != null ? !getArticoloComposto().equals(mtbAart.getArticoloComposto()) : mtbAart.getArticoloComposto() != null)
            return false;
        if (getEsposizioneComp() != null ? !getEsposizioneComp().equals(mtbAart.getEsposizioneComp()) : mtbAart.getEsposizioneComp() != null)
            return false;
        if (getDescrizioneEstesa() != null ? !getDescrizioneEstesa().equals(mtbAart.getDescrizioneEstesa()) : mtbAart.getDescrizioneEstesa() != null)
            return false;
        if (getCodUltForn() != null ? !getCodUltForn().equals(mtbAart.getCodUltForn()) : mtbAart.getCodUltForn() != null)
            return false;
        if (getDataUltCar() != null ? !getDataUltCar().equals(mtbAart.getDataUltCar()) : mtbAart.getDataUltCar() != null)
            return false;
        if (getValUltCar() != null ? !getValUltCar().equals(mtbAart.getValUltCar()) : mtbAart.getValUltCar() != null)
            return false;
        if (getCodUltClie() != null ? !getCodUltClie().equals(mtbAart.getCodUltClie()) : mtbAart.getCodUltClie() != null)
            return false;
        if (getDataUltScar() != null ? !getDataUltScar().equals(mtbAart.getDataUltScar()) : mtbAart.getDataUltScar() != null)
            return false;
        if (getValUltScar() != null ? !getValUltScar().equals(mtbAart.getValUltScar()) : mtbAart.getValUltScar() != null)
            return false;
        if (getTipoCodice() != null ? !getTipoCodice().equals(mtbAart.getTipoCodice()) : mtbAart.getTipoCodice() != null)
            return false;
        if (getNote() != null ? !getNote().equals(mtbAart.getNote()) : mtbAart.getNote() != null)
            return false;
        if (getPosizione() != null ? !getPosizione().equals(mtbAart.getPosizione()) : mtbAart.getPosizione() != null)
            return false;
        if (getColliPedana() != null ? !getColliPedana().equals(mtbAart.getColliPedana()) : mtbAart.getColliPedana() != null)
            return false;
        if (getUntMis2() != null ? !getUntMis2().equals(mtbAart.getUntMis2()) : mtbAart.getUntMis2() != null)
            return false;
        if (getRapConv2() != null ? !getRapConv2().equals(mtbAart.getRapConv2()) : mtbAart.getRapConv2() != null)
            return false;
        if (getFlagInclListino() != null ? !getFlagInclListino().equals(mtbAart.getFlagInclListino()) : mtbAart.getFlagInclListino() != null)
            return false;
        if (getUntMis3() != null ? !getUntMis3().equals(mtbAart.getUntMis3()) : mtbAart.getUntMis3() != null)
            return false;
        if (getRapConv3() != null ? !getRapConv3().equals(mtbAart.getRapConv3()) : mtbAart.getRapConv3() != null)
            return false;
        if (getCodMartStat() != null ? !getCodMartStat().equals(mtbAart.getCodMartStat()) : mtbAart.getCodMartStat() != null)
            return false;
        if (getCodMcon() != null ? !getCodMcon().equals(mtbAart.getCodMcon()) : mtbAart.getCodMcon() != null)
            return false;
        if (getCodMgrp() != null ? !getCodMgrp().equals(mtbAart.getCodMgrp()) : mtbAart.getCodMgrp() != null)
            return false;
        if (getCodMsfa() != null ? !getCodMsfa().equals(mtbAart.getCodMsfa()) : mtbAart.getCodMsfa() != null)
            return false;
        if (getCodMsgr() != null ? !getCodMsgr().equals(mtbAart.getCodMsgr()) : mtbAart.getCodMsgr() != null)
            return false;
        if (getCodMstp() != null ? !getCodMstp().equals(mtbAart.getCodMstp()) : mtbAart.getCodMstp() != null)
            return false;
        if (getCodMtip() != null ? !getCodMtip().equals(mtbAart.getCodMtip()) : mtbAart.getCodMtip() != null)
            return false;
        if (getDescrizioneStat() != null ? !getDescrizioneStat().equals(mtbAart.getDescrizioneStat()) : mtbAart.getDescrizioneStat() != null)
            return false;
        if (getFlagStato() != null ? !getFlagStato().equals(mtbAart.getFlagStato()) : mtbAart.getFlagStato() != null)
            return false;
        if (getCambioDiviCar() != null ? !getCambioDiviCar().equals(mtbAart.getCambioDiviCar()) : mtbAart.getCambioDiviCar() != null)
            return false;
        if (getCambioDiviScar() != null ? !getCambioDiviScar().equals(mtbAart.getCambioDiviScar()) : mtbAart.getCambioDiviScar() != null)
            return false;
        if (getGgScadPartita() != null ? !getGgScadPartita().equals(mtbAart.getGgScadPartita()) : mtbAart.getGgScadPartita() != null)
            return false;
        if (getVolumeMc() != null ? !getVolumeMc().equals(mtbAart.getVolumeMc()) : mtbAart.getVolumeMc() != null)
            return false;
        if (getFlagEsponiPrz() != null ? !getFlagEsponiPrz().equals(mtbAart.getFlagEsponiPrz()) : mtbAart.getFlagEsponiPrz() != null)
            return false;
        if (getDataUltVar() != null ? !getDataUltVar().equals(mtbAart.getDataUltVar()) : mtbAart.getDataUltVar() != null)
            return false;
        if (getPercSfrido() != null ? !getPercSfrido().equals(mtbAart.getPercSfrido()) : mtbAart.getPercSfrido() != null)
            return false;
        if (getCodBarreImb() != null ? !getCodBarreImb().equals(mtbAart.getCodBarreImb()) : mtbAart.getCodBarreImb() != null)
            return false;
        if (getFlagCalcPrz() != null ? !getFlagCalcPrz().equals(mtbAart.getFlagCalcPrz()) : mtbAart.getFlagCalcPrz() != null)
            return false;
        if (getEsposizioneCompAcq() != null ? !getEsposizioneCompAcq().equals(mtbAart.getEsposizioneCompAcq()) : mtbAart.getEsposizioneCompAcq() != null)
            return false;
        if (getFlagCalcPrzAcq() != null ? !getFlagCalcPrzAcq().equals(mtbAart.getFlagCalcPrzAcq()) : mtbAart.getFlagCalcPrzAcq() != null)
            return false;
        if (getDiacod() != null ? !getDiacod().equals(mtbAart.getDiacod()) : mtbAart.getDiacod() != null)
            return false;
        if (getPlu() != null ? !getPlu().equals(mtbAart.getPlu()) : mtbAart.getPlu() != null)
            return false;
        if (getPartIvaProd() != null ? !getPartIvaProd().equals(mtbAart.getPartIvaProd()) : mtbAart.getPartIvaProd() != null)
            return false;
        if (getRagSocProd() != null ? !getRagSocProd().equals(mtbAart.getRagSocProd()) : mtbAart.getRagSocProd() != null)
            return false;
        if (getFlagRapConvVariabile() != null ? !getFlagRapConvVariabile().equals(mtbAart.getFlagRapConvVariabile()) : mtbAart.getFlagRapConvVariabile() != null)
            return false;
        if (getFlagMovArtMag() != null ? !getFlagMovArtMag().equals(mtbAart.getFlagMovArtMag()) : mtbAart.getFlagMovArtMag() != null)
            return false;
        if (getFlagTracciabilita() != null ? !getFlagTracciabilita().equals(mtbAart.getFlagTracciabilita()) : mtbAart.getFlagTracciabilita() != null)
            return false;
        if (getTaraKg() != null ? !getTaraKg().equals(mtbAart.getTaraKg()) : mtbAart.getTaraKg() != null)
            return false;
        if (getColliStrato() != null ? !getColliStrato().equals(mtbAart.getColliStrato()) : mtbAart.getColliStrato() != null)
            return false;
        if (getFlagQtaCnfFissa() != null ? !getFlagQtaCnfFissa().equals(mtbAart.getFlagQtaCnfFissa()) : mtbAart.getFlagQtaCnfFissa() != null)
            return false;
        if (getFlagColliPedanaFisso() != null ? !getFlagColliPedanaFisso().equals(mtbAart.getFlagColliPedanaFisso()) : mtbAart.getFlagColliPedanaFisso() != null)
            return false;
        if (getCodCconCosti() != null ? !getCodCconCosti().equals(mtbAart.getCodCconCosti()) : mtbAart.getCodCconCosti() != null)
            return false;
        if (getCodCconRicavi() != null ? !getCodCconRicavi().equals(mtbAart.getCodCconRicavi()) : mtbAart.getCodCconRicavi() != null)
            return false;
        if (getCodDgrpArt() != null ? !getCodDgrpArt().equals(mtbAart.getCodDgrpArt()) : mtbAart.getCodDgrpArt() != null)
            return false;
        if (getCodDiviCar() != null ? !getCodDiviCar().equals(mtbAart.getCodDiviCar()) : mtbAart.getCodDiviCar() != null)
            return false;
        if (getCodDiviScar() != null ? !getCodDiviScar().equals(mtbAart.getCodDiviScar()) : mtbAart.getCodDiviScar() != null)
            return false;
        if (getCodEcrCat() != null ? !getCodEcrCat().equals(mtbAart.getCodEcrCat()) : mtbAart.getCodEcrCat() != null)
            return false;
        if (getCodEcrMcat() != null ? !getCodEcrMcat().equals(mtbAart.getCodEcrMcat()) : mtbAart.getCodEcrMcat() != null)
            return false;
        if (getCodEcrRep() != null ? !getCodEcrRep().equals(mtbAart.getCodEcrRep()) : mtbAart.getCodEcrRep() != null)
            return false;
        if (getCodEcrStipo() != null ? !getCodEcrStipo().equals(mtbAart.getCodEcrStipo()) : mtbAart.getCodEcrStipo() != null)
            return false;
        if (getCodEcrTipo() != null ? !getCodEcrTipo().equals(mtbAart.getCodEcrTipo()) : mtbAart.getCodEcrTipo() != null)
            return false;
        if (getCodGrpBolla() != null ? !getCodGrpBolla().equals(mtbAart.getCodGrpBolla()) : mtbAart.getCodGrpBolla() != null)
            return false;
        if (getIngredienti() != null ? !getIngredienti().equals(mtbAart.getIngredienti()) : mtbAart.getIngredienti() != null)
            return false;
        if (getIdArtEqui() != null ? !getIdArtEqui().equals(mtbAart.getIdArtEqui()) : mtbAart.getIdArtEqui() != null)
            return false;
        if (getDescrCassa() != null ? !getDescrCassa().equals(mtbAart.getDescrCassa()) : mtbAart.getDescrCassa() != null)
            return false;
        if (getCodNcIntracee() != null ? !getCodNcIntracee().equals(mtbAart.getCodNcIntracee()) : mtbAart.getCodNcIntracee() != null)
            return false;
        if (getMarchio() != null ? !getMarchio().equals(mtbAart.getMarchio()) : mtbAart.getMarchio() != null)
            return false;
        if (getSezione() != null ? !getSezione().equals(mtbAart.getSezione()) : mtbAart.getSezione() != null)
            return false;
        if (getUntMisRifPeso() != mtbAart.getUntMisRifPeso()) return false;
        if (getQtaEsistente() != null ? !getQtaEsistente().equals(mtbAart.getQtaEsistente()) : mtbAart.getQtaEsistente() != null)
            return false;
        if (getQtaImpegnata() != null ? !getQtaImpegnata().equals(mtbAart.getQtaImpegnata()) : mtbAart.getQtaImpegnata() != null)
            return false;
        if (getNumCnfEsistente() != null ? !getNumCnfEsistente().equals(mtbAart.getNumCnfEsistente()) : mtbAart.getNumCnfEsistente() != null)
            return false;
        if (getNumCnfImpegnata() != null ? !getNumCnfImpegnata().equals(mtbAart.getNumCnfImpegnata()) : mtbAart.getNumCnfImpegnata() != null)
            return false;
        return getMtbUntMis() != null ? getMtbUntMis().equals(mtbAart.getMtbUntMis()) : mtbAart.getMtbUntMis() == null;
    }

    @Override
    public int hashCode() {
        int result = getCodMart().hashCode();
        result = 31 * result + (getDescrizione() != null ? getDescrizione().hashCode() : 0);
        result = 31 * result + (getUntMis() != null ? getUntMis().hashCode() : 0);
        result = 31 * result + (getBarCode() != null ? getBarCode().hashCode() : 0);
        result = 31 * result + (getPesoKg() != null ? getPesoKg().hashCode() : 0);
        result = 31 * result + (getQtaCnf() != null ? getQtaCnf().hashCode() : 0);
        result = 31 * result + (getCodAliq() != null ? getCodAliq().hashCode() : 0);
        result = 31 * result + (getCodScoArt() != null ? getCodScoArt().hashCode() : 0);
        result = 31 * result + (getCodTcolUi() != null ? getCodTcolUi().hashCode() : 0);
        result = 31 * result + (getCodTcolUl() != null ? getCodTcolUl().hashCode() : 0);
        result = 31 * result + (getArticoloComposto() != null ? getArticoloComposto().hashCode() : 0);
        result = 31 * result + (getEsposizioneComp() != null ? getEsposizioneComp().hashCode() : 0);
        result = 31 * result + (getDescrizioneEstesa() != null ? getDescrizioneEstesa().hashCode() : 0);
        result = 31 * result + (getCodUltForn() != null ? getCodUltForn().hashCode() : 0);
        result = 31 * result + (getDataUltCar() != null ? getDataUltCar().hashCode() : 0);
        result = 31 * result + (getValUltCar() != null ? getValUltCar().hashCode() : 0);
        result = 31 * result + (getCodUltClie() != null ? getCodUltClie().hashCode() : 0);
        result = 31 * result + (getDataUltScar() != null ? getDataUltScar().hashCode() : 0);
        result = 31 * result + (getValUltScar() != null ? getValUltScar().hashCode() : 0);
        result = 31 * result + (getTipoCodice() != null ? getTipoCodice().hashCode() : 0);
        result = 31 * result + (getNote() != null ? getNote().hashCode() : 0);
        result = 31 * result + (getPosizione() != null ? getPosizione().hashCode() : 0);
        result = 31 * result + (getColliPedana() != null ? getColliPedana().hashCode() : 0);
        result = 31 * result + (getUntMis2() != null ? getUntMis2().hashCode() : 0);
        result = 31 * result + (getRapConv2() != null ? getRapConv2().hashCode() : 0);
        result = 31 * result + (getFlagInclListino() != null ? getFlagInclListino().hashCode() : 0);
        result = 31 * result + (getUntMis3() != null ? getUntMis3().hashCode() : 0);
        result = 31 * result + (getRapConv3() != null ? getRapConv3().hashCode() : 0);
        result = 31 * result + (getCodMartStat() != null ? getCodMartStat().hashCode() : 0);
        result = 31 * result + (getCodMcon() != null ? getCodMcon().hashCode() : 0);
        result = 31 * result + (getCodMgrp() != null ? getCodMgrp().hashCode() : 0);
        result = 31 * result + (getCodMsfa() != null ? getCodMsfa().hashCode() : 0);
        result = 31 * result + (getCodMsgr() != null ? getCodMsgr().hashCode() : 0);
        result = 31 * result + (getCodMstp() != null ? getCodMstp().hashCode() : 0);
        result = 31 * result + (getCodMtip() != null ? getCodMtip().hashCode() : 0);
        result = 31 * result + (getDescrizioneStat() != null ? getDescrizioneStat().hashCode() : 0);
        result = 31 * result + (getFlagStato() != null ? getFlagStato().hashCode() : 0);
        result = 31 * result + (getCambioDiviCar() != null ? getCambioDiviCar().hashCode() : 0);
        result = 31 * result + (getCambioDiviScar() != null ? getCambioDiviScar().hashCode() : 0);
        result = 31 * result + (getGgScadPartita() != null ? getGgScadPartita().hashCode() : 0);
        result = 31 * result + (getVolumeMc() != null ? getVolumeMc().hashCode() : 0);
        result = 31 * result + (getFlagEsponiPrz() != null ? getFlagEsponiPrz().hashCode() : 0);
        result = 31 * result + (getDataUltVar() != null ? getDataUltVar().hashCode() : 0);
        result = 31 * result + (getPercSfrido() != null ? getPercSfrido().hashCode() : 0);
        result = 31 * result + (getCodBarreImb() != null ? getCodBarreImb().hashCode() : 0);
        result = 31 * result + (getFlagCalcPrz() != null ? getFlagCalcPrz().hashCode() : 0);
        result = 31 * result + (getEsposizioneCompAcq() != null ? getEsposizioneCompAcq().hashCode() : 0);
        result = 31 * result + (getFlagCalcPrzAcq() != null ? getFlagCalcPrzAcq().hashCode() : 0);
        result = 31 * result + (getDiacod() != null ? getDiacod().hashCode() : 0);
        result = 31 * result + (getPlu() != null ? getPlu().hashCode() : 0);
        result = 31 * result + (getPartIvaProd() != null ? getPartIvaProd().hashCode() : 0);
        result = 31 * result + (getRagSocProd() != null ? getRagSocProd().hashCode() : 0);
        result = 31 * result + (getFlagRapConvVariabile() != null ? getFlagRapConvVariabile().hashCode() : 0);
        result = 31 * result + (getFlagMovArtMag() != null ? getFlagMovArtMag().hashCode() : 0);
        result = 31 * result + (getFlagTracciabilita() != null ? getFlagTracciabilita().hashCode() : 0);
        result = 31 * result + (getTaraKg() != null ? getTaraKg().hashCode() : 0);
        result = 31 * result + (getColliStrato() != null ? getColliStrato().hashCode() : 0);
        result = 31 * result + (getFlagQtaCnfFissa() != null ? getFlagQtaCnfFissa().hashCode() : 0);
        result = 31 * result + (getFlagColliPedanaFisso() != null ? getFlagColliPedanaFisso().hashCode() : 0);
        result = 31 * result + (getCodCconCosti() != null ? getCodCconCosti().hashCode() : 0);
        result = 31 * result + (getCodCconRicavi() != null ? getCodCconRicavi().hashCode() : 0);
        result = 31 * result + (getCodDgrpArt() != null ? getCodDgrpArt().hashCode() : 0);
        result = 31 * result + (getCodDiviCar() != null ? getCodDiviCar().hashCode() : 0);
        result = 31 * result + (getCodDiviScar() != null ? getCodDiviScar().hashCode() : 0);
        result = 31 * result + (getCodEcrCat() != null ? getCodEcrCat().hashCode() : 0);
        result = 31 * result + (getCodEcrMcat() != null ? getCodEcrMcat().hashCode() : 0);
        result = 31 * result + (getCodEcrRep() != null ? getCodEcrRep().hashCode() : 0);
        result = 31 * result + (getCodEcrStipo() != null ? getCodEcrStipo().hashCode() : 0);
        result = 31 * result + (getCodEcrTipo() != null ? getCodEcrTipo().hashCode() : 0);
        result = 31 * result + (getCodGrpBolla() != null ? getCodGrpBolla().hashCode() : 0);
        result = 31 * result + (getIngredienti() != null ? getIngredienti().hashCode() : 0);
        result = 31 * result + (getIdArtEqui() != null ? getIdArtEqui().hashCode() : 0);
        result = 31 * result + (getDescrCassa() != null ? getDescrCassa().hashCode() : 0);
        result = 31 * result + (getCodNcIntracee() != null ? getCodNcIntracee().hashCode() : 0);
        result = 31 * result + (getMarchio() != null ? getMarchio().hashCode() : 0);
        result = 31 * result + (getSezione() != null ? getSezione().hashCode() : 0);
        result = 31 * result + (getUntMisRifPeso() != null ? getUntMisRifPeso().hashCode() : 0);
        result = 31 * result + (getQtaEsistente() != null ? getQtaEsistente().hashCode() : 0);
        result = 31 * result + (getQtaImpegnata() != null ? getQtaImpegnata().hashCode() : 0);
        result = 31 * result + (getNumCnfEsistente() != null ? getNumCnfEsistente().hashCode() : 0);
        result = 31 * result + (getNumCnfImpegnata() != null ? getNumCnfImpegnata().hashCode() : 0);
        result = 31 * result + (getMtbUntMis() != null ? getMtbUntMis().hashCode() : 0);
        return result;
    }
}
