Rev 721 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 297 | espaco | 1 | package br.com.ec.domain.dto; |
| 2 | |||
| 3 | public class ContaDTO { |
||
| 4 | |||
| 5 | private Long sequencial; |
||
| 6 | private CategoriaDTO categoria; |
||
| 7 | // private Venda venda; |
||
| 8 | // private Pessoa pessoa; |
||
| 721 | blopes | 9 | private LojaDTO loja; |
| 297 | espaco | 10 | // private ContaFormaPagamento formaDePagamento; |
| 11 | // private Vigencia vigencia; |
||
| 12 | |||
| 13 | // private String tipoFrequencia; |
||
| 14 | // private String tipoConta; |
||
| 15 | // private String observacao; |
||
| 16 | // private Boolean indicadorAtivo; |
||
| 17 | |||
| 18 | // private Compra compra; |
||
| 19 | |||
| 20 | public ContaDTO() {} |
||
| 730 | blopes | 21 | |
| 22 | public ContaDTO(Long sequencial, Long sequenciaCategoria, String descricaoCategoria) { |
||
| 23 | super(); |
||
| 24 | this.sequencial = sequencial; |
||
| 25 | this.categoria = new CategoriaDTO(sequenciaCategoria, descricaoCategoria); |
||
| 26 | } |
||
| 721 | blopes | 27 | |
| 28 | public ContaDTO(Long sequencial, Long sequenciaCategoria, String descricaoCategoria, Long sequencialLoja, String descricaoLoja) { |
||
| 29 | super(); |
||
| 30 | this.sequencial = sequencial; |
||
| 31 | this.categoria = new CategoriaDTO(sequenciaCategoria, descricaoCategoria); |
||
| 32 | this.loja = new LojaDTO(sequencialLoja, descricaoLoja); |
||
| 33 | } |
||
| 297 | espaco | 34 | |
| 721 | blopes | 35 | public Long getSequencial() { |
| 36 | return sequencial; |
||
| 37 | } |
||
| 38 | public void setSequencial(Long sequencial) { |
||
| 39 | this.sequencial = sequencial; |
||
| 40 | } |
||
| 297 | espaco | 41 | |
| 721 | blopes | 42 | public CategoriaDTO getCategoria() { |
| 43 | return categoria; |
||
| 44 | } |
||
| 45 | public void setCategoria(CategoriaDTO categoria) { |
||
| 46 | this.categoria = categoria; |
||
| 47 | } |
||
| 48 | |||
| 49 | public LojaDTO getLoja() { |
||
| 50 | return loja; |
||
| 51 | } |
||
| 52 | public void setLoja(LojaDTO loja) { |
||
| 53 | this.loja = loja; |
||
| 54 | } |
||
| 55 | |||
| 297 | espaco | 56 | @Override |
| 57 | public int hashCode() { |
||
| 58 | final int prime = 31; |
||
| 59 | int result = 1; |
||
| 60 | result = prime * result + ((sequencial == null) ? 0 : sequencial.hashCode()); |
||
| 61 | return result; |
||
| 62 | } |
||
| 63 | |||
| 64 | @Override |
||
| 65 | public boolean equals(Object obj) { |
||
| 66 | if (this == obj) |
||
| 67 | return true; |
||
| 68 | if (obj == null) |
||
| 69 | return false; |
||
| 70 | if (getClass() != obj.getClass()) |
||
| 71 | return false; |
||
| 72 | ContaDTO other = (ContaDTO) obj; |
||
| 73 | if (sequencial == null) { |
||
| 74 | if (other.sequencial != null) |
||
| 75 | return false; |
||
| 76 | } else if (!sequencial.equals(other.sequencial)) |
||
| 77 | return false; |
||
| 78 | return true; |
||
| 79 | } |
||
| 80 | |||
| 81 | } |