Rev 299 | Go to most recent revision | Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 265 | espaco | 1 | package br.com.ec.domain.dto; |
| 2 | |||
| 3 | import javax.persistence.Transient; |
||
| 4 | |||
| 5 | import br.com.ec.core.util.VerificadorUtil; |
||
| 6 | import br.com.ec.web.converters.FormatarUtil; |
||
| 7 | |||
| 8 | public class PessoaDTO { |
||
| 9 | |||
| 10 | private Long sequencial; |
||
| 11 | private String nome; |
||
| 12 | private String tipoPessoa; |
||
| 13 | private String cpfCnpj; |
||
| 14 | |||
| 15 | public PessoaDTO() {} |
||
| 16 | |||
| 17 | public PessoaDTO(Long sequencial, String nome, String tipoPessoa, String cpfCnpj) { |
||
| 18 | this.sequencial = sequencial; |
||
| 19 | this.nome = nome; |
||
| 20 | this.tipoPessoa = tipoPessoa; |
||
| 21 | this.cpfCnpj = cpfCnpj; |
||
| 22 | } |
||
| 23 | |||
| 24 | public Long getSequencial() { |
||
| 25 | return sequencial; |
||
| 26 | } |
||
| 27 | public void setSequencial(Long sequencial) { |
||
| 28 | this.sequencial = sequencial; |
||
| 29 | } |
||
| 30 | |||
| 31 | public String getNome() { |
||
| 32 | return nome; |
||
| 33 | } |
||
| 34 | public void setNome(String nome) { |
||
| 35 | this.nome = nome; |
||
| 36 | } |
||
| 37 | |||
| 38 | public String getTipoPessoa() { |
||
| 39 | return tipoPessoa; |
||
| 40 | } |
||
| 41 | public void setTipoPessoa(String tipoPessoa) { |
||
| 42 | this.tipoPessoa = tipoPessoa; |
||
| 43 | } |
||
| 44 | |||
| 45 | public String getCpfCnpj() { |
||
| 46 | return cpfCnpj; |
||
| 47 | } |
||
| 48 | public void setCpfCnpj(String cpfCnpj) { |
||
| 49 | this.cpfCnpj = cpfCnpj; |
||
| 50 | } |
||
| 51 | @Transient |
||
| 52 | public String getCpfCnpjFormatado() { |
||
| 53 | return VerificadorUtil.naoEstaNulo(getCpfCnpj())? FormatarUtil.retornarCpfCnpjFormatado(getCpfCnpj()) : ""; |
||
| 54 | } |
||
| 55 | |||
| 56 | } |