• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wmixvideo / nfe / #9221

24 Jun 2025 01:09AM UTC coverage: 51.423% (+0.6%) from 50.829%
#9221

push

web-flow
Merge 0ce3effce into bb9f583b3

14003 of 27231 relevant lines covered (51.42%)

0.51 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

82.14
/src/main/java/com/fincatto/documentofiscal/nfe400/classes/nota/NFInfoReferenciada.java
1
package com.fincatto.documentofiscal.nfe400.classes.nota;
2

3
import org.simpleframework.xml.Element;
4

5
import com.fincatto.documentofiscal.DFBase;
6
import com.fincatto.documentofiscal.validadores.DFStringValidador;
7

8
public class NFInfoReferenciada extends DFBase {
1✔
9
    private static final long serialVersionUID = -2843595557163782224L;
10

11
    @Element(name = "refNFe", required = false)
12
    private String chaveAcesso;
13

14
    @Element(name = "refNF", required = false)
15
    private NFInfoModelo1Por1AReferenciada modelo1por1Referenciada;
16

17
    @Element(name = "refNFP", required = false)
18
    private NFInfoProdutorRuralReferenciada infoNFProdutorRuralReferenciada;
19

20
    @Element(name = "refCTe", required = false)
21
    private String chaveAcessoCTReferenciada;
22

23
    @Element(name = "refECF", required = false)
24
    private NFInfoCupomFiscalReferenciado cupomFiscalReferenciado;
25

26
    public void setChaveAcesso(final String chaveAcesso) {
27
        if (this.modelo1por1Referenciada != null || this.infoNFProdutorRuralReferenciada != null || this.chaveAcessoCTReferenciada != null || this.cupomFiscalReferenciado != null) {
1✔
28
            throw new IllegalStateException("Nao pode setar chave de acesso caso modelo 1 por 1 referenciada esteja setado");
1✔
29
        }
30
        DFStringValidador.exatamente44N(chaveAcesso, "Chave de Acesso");
1✔
31
        this.chaveAcesso = chaveAcesso;
1✔
32
    }
1✔
33

34
    public void setModelo1por1Referenciada(final NFInfoModelo1Por1AReferenciada modelo1por1Referenciada) {
35
        if (this.chaveAcesso != null || this.infoNFProdutorRuralReferenciada != null || this.chaveAcessoCTReferenciada != null || this.cupomFiscalReferenciado != null) {
1✔
36
            throw new IllegalStateException("Nao pode setar modelo 1 por 1 referenciada caso a chave de acesso esteja setada");
1✔
37
        }
38
        this.modelo1por1Referenciada = modelo1por1Referenciada;
1✔
39
    }
1✔
40

41
    public void setChaveAcessoCTReferenciada(final String chaveAcessoCTReferenciada) {
42
        if (this.modelo1por1Referenciada != null || this.chaveAcesso != null || this.infoNFProdutorRuralReferenciada != null || this.cupomFiscalReferenciado != null) {
1✔
43
            throw new IllegalStateException("Nao pode setar chave de acesso de conhecimento de transporte referenciada caso a chave de acesso esteja setada");
1✔
44
        }
45
        DFStringValidador.exatamente44N(chaveAcessoCTReferenciada, "Chave Acesso CT Referenciada");
1✔
46
        this.chaveAcessoCTReferenciada = chaveAcessoCTReferenciada;
1✔
47
    }
1✔
48

49
    public void setInfoNFProdutorRuralReferenciada(final NFInfoProdutorRuralReferenciada infoNFProdutorRuralReferenciada) {
50
        if (this.modelo1por1Referenciada != null || this.chaveAcesso != null || this.cupomFiscalReferenciado != null || this.chaveAcessoCTReferenciada != null) {
1✔
51
            throw new IllegalStateException("Nao pode setar nota de produtor rural referenciada caso a chave de acesso esteja setada");
1✔
52
        }
53
        this.infoNFProdutorRuralReferenciada = infoNFProdutorRuralReferenciada;
1✔
54
    }
1✔
55

56
    public void setCupomFiscalReferenciado(final NFInfoCupomFiscalReferenciado cupomFiscalReferenciado) {
57
        if (this.modelo1por1Referenciada != null || this.chaveAcesso != null || this.chaveAcessoCTReferenciada != null || this.infoNFProdutorRuralReferenciada != null) {
1✔
58
            throw new IllegalStateException("Nao pode setar cupom fiscal referenciado caso a chave de acesso esteja setada");
1✔
59
        }
60
        this.cupomFiscalReferenciado = cupomFiscalReferenciado;
1✔
61
    }
1✔
62

63
    public String getChaveAcesso() {
64
        return this.chaveAcesso;
×
65
    }
66

67
    public NFInfoModelo1Por1AReferenciada getModelo1por1Referenciada() {
68
        return this.modelo1por1Referenciada;
×
69
    }
70

71
    public NFInfoProdutorRuralReferenciada getInfoNFProdutorRuralReferenciada() {
72
        return this.infoNFProdutorRuralReferenciada;
×
73
    }
74

75
    public String getChaveAcessoCTReferenciada() {
76
        return this.chaveAcessoCTReferenciada;
×
77
    }
78

79
    public NFInfoCupomFiscalReferenciado getCupomFiscalReferenciado() {
80
        return this.cupomFiscalReferenciado;
×
81
    }
82
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc