Rev 507 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 507 | Rev 520 | ||
|---|---|---|---|
| Line 26... | Line 26... | ||
| 26 | import br.com.ec.core.generic.identidade.Identidade; |
26 | import br.com.ec.core.generic.identidade.Identidade; |
| 27 | import br.com.ec.core.interfaces.Alterar; |
27 | import br.com.ec.core.interfaces.Alterar; |
| 28 | import br.com.ec.core.interfaces.Cadastrar; |
28 | import br.com.ec.core.interfaces.Cadastrar; |
| 29 | import br.com.ec.core.util.DataUtils; |
29 | import br.com.ec.core.util.DataUtils; |
| 30 | import br.com.ec.core.util.VerificadorUtil; |
30 | import br.com.ec.core.util.VerificadorUtil; |
| - | 31 | import br.com.ec.domain.dto.LojaDTO; |
|
| - | 32 | import br.com.ec.domain.dto.TransferenciaDTO; |
|
| 31 | import br.com.ec.domain.dto.TransferenciaProdutoDTO; |
33 | import br.com.ec.domain.dto.TransferenciaProdutoDTO; |
| 32 | import br.com.ec.domain.model.tipos.TipoProduto; |
34 | import br.com.ec.domain.model.tipos.TipoProduto; |
| - | 35 | import br.com.ec.domain.shared.ConstantesSEC; |
|
| 33 | 36 | ||
| 34 | @Entity |
37 | @Entity |
| 35 | @Table(name="sec_transferencia", schema="sc_sec") |
38 | @Table(name="sec_transferencia", schema="sc_sec") |
| 36 | public class Transferencia implements Serializable, Identidade { |
39 | public class Transferencia implements Serializable, Identidade { |
| 37 | 40 | ||
| Line 48... | Line 51... | ||
| 48 | private Usuario usuarioTransportador; |
51 | private Usuario usuarioTransportador; |
| 49 | private Usuario usuarioReceptor; |
52 | private Usuario usuarioReceptor; |
| 50 | 53 | ||
| 51 | private List<TransferenciaProduto> listaProdutos; |
54 | private List<TransferenciaProduto> listaProdutos; |
| 52 | private List<TransferenciaProdutoDTO> produtosDTO; |
55 | private List<TransferenciaProdutoDTO> produtosDTO; |
| - | 56 | ||
| - | 57 | public Transferencia() {} |
|
| - | 58 | ||
| - | 59 | public Transferencia(TransferenciaDTO transferenciaDTO) { |
|
| - | 60 | this.sequencial = transferenciaDTO.getSequencial(); |
|
| - | 61 | this.lojaSaida = new Loja(transferenciaDTO.sequencialDaLojaSaida()); |
|
| - | 62 | this.lojaEntrada = new Loja(transferenciaDTO.sequencialDaLojaEntrada()); |
|
| - | 63 | this.dataSolicitacao = transferenciaDTO.getDataSolicitacao(); |
|
| - | 64 | this.conferido = transferenciaDTO.getConferido(); |
|
| - | 65 | this.dataFinalizacao = transferenciaDTO.getDataFinalizacao(); |
|
| - | 66 | }
|
|
| 53 | 67 | ||
| 54 | @Override |
68 | @Override |
| 55 | @Transient |
69 | @Transient |
| 56 | public Object getId() { |
70 | public Object getId() { |
| 57 | return this.getSequencial(); |
71 | return this.getSequencial(); |