This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Nf { | |
Integer numero; | |
List<Item> itens; | |
Cliente cliente; | |
public Nf(Integer numero){ | |
this.numero = numero; | |
itens = new ArrayList<Item>(); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nf nf = new Nf(1); | |
nf.setCliente(new Cliente("Eder")); | |
nf.adicionarItem(new Item("Caneta", 1)); | |
nf.adicionarItem(new Item("Lápis", 2)); | |
nf.gerarNf(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Nf { | |
Integer numero; | |
List<Item> itens; | |
Cliente cliente; | |
public Nf(Integer numero){ | |
this.numero = numero; | |
itens = new ArrayList<Item>(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Nf(1).paraCliente("Eder") | |
.com(1, "Caneta") | |
.com(2, "Lápis") | |
.gerarNf(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Nf(1).com(1, "Caneta") | |
.paraCliente("Eder") | |
.com(2, "Lápis") | |
.gerarNf(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Nf(1).com(1, "Caneta") | |
.com(2, "Lápis") | |
.gerarNf(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Nf { | |
Cliente cliente; | |
List<Item> itens; | |
Integer numero; | |
public Nf(final Integer pNumero) { | |
numero = pNumero; | |
itens = new ArrayList<Item>(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nf.emitirNf() | |
.numero(1) | |
.paraCliente("Eder") | |
.com(1, "Caneta") | |
.eCom(2, "Lápis") | |
.eCom(1, "Borracha") | |
.gerarNf(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GerenciadorContexto { | |
private static final ThreadLocal<IParametrosProcesso> contexto = | |
new ThreadLocal<IParametrosProcesso>(); | |
public static IParametrosProcesso getParametros() { | |
return contexto.get(); | |
} | |
public static void setParametros( | |
final IParametrosProcesso pParametros) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//... | |
IParametrosProcesso parametros = new Parametro(cnpj, 2016, 01); | |
GerenciadorContexto.setParametros(parametros); | |
//... |
OlderNewer