Rev 500 | Rev 521 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 500 | Rev 516 | ||
|---|---|---|---|
| Line 4... | Line 4... | ||
| 4 | import java.util.Date; |
4 | import java.util.Date; |
| - | 5 | import java.util.Objects; |
|
| 5 | 6 | ||
| 6 | import javax.persistence.Transient; |
7 | import javax.persistence.Transient; |
| 7 | 8 | ||
| 8 | import br.com.ec.core.util.VerificadorUtil; |
9 | import br.com.ec.core.util.VerificadorUtil; |
| 9 | import br.com.ec.domain.model.Modelo; |
10 | import br.com.ec.domain.model.Modelo; |
| Line 131... | Line 132... | ||
| 131 | this.modeloDTO = modeloDTO; |
132 | this.modeloDTO = modeloDTO; |
| 132 | this.estilo = estilo; |
133 | this.estilo = estilo; |
| 133 | this.descricao = descricao; |
134 | this.descricao = descricao; |
| 134 | this.cor = cor; |
135 | this.cor = cor; |
| 135 | this.codigoEAN = codigoEAN; |
136 | this.codigoEAN = codigoEAN; |
| - | 137 | }
|
|
| - | 138 | ||
| - | 139 | public ProdutoDTO(Long sequencial, String codigo, String descricao) { |
|
| - | 140 | this.sequencial = sequencial; |
|
| - | 141 | this.codigo = codigo; |
|
| - | 142 | this.descricao = descricao; |
|
| - | 143 | }
|
|
| - | 144 | ||
| - | 145 | public ProdutoDTO(Long sequencial) { |
|
| - | 146 | this.sequencial = sequencial; |
|
| 136 | }
|
147 | }
|
| 137 | 148 | ||
| 138 | /*
|
149 | /*
|
| 139 | public static String CONSULTA_DTO_COMPLETA = "e.sequencial, e.notaFiscal.sequencial, e.produto.sequencial, "
|
150 | public static String CONSULTA_DTO_COMPLETA = "e.sequencial, e.notaFiscal.sequencial, e.produto.sequencial, "
|
| 140 | + "e.quantidade";
|
151 | + "e.quantidade";
|
| Line 348... | Line 359... | ||
| 348 | }
|
359 | }
|
| 349 | 360 | ||
| 350 | @Transient |
361 | @Transient |
| 351 | public String getDescricaoDaMarcaDoModelo() { |
362 | public String getDescricaoDaMarcaDoModelo() { |
| 352 | return VerificadorUtil.naoEstaNulo(getMarcaDTODoModelo())? getMarcaDTODoModelo().getDescricao() : ""; |
363 | return VerificadorUtil.naoEstaNulo(getMarcaDTODoModelo())? getMarcaDTODoModelo().getDescricao() : ""; |
| - | 364 | }
|
|
| - | 365 | ||
| - | 366 | @Override |
|
| - | 367 | public int hashCode() { |
|
| - | 368 | return Objects.hash(sequencial); |
|
| - | 369 | }
|
|
| - | 370 | ||
| - | 371 | @Override |
|
| - | 372 | public boolean equals(Object obj) { |
|
| - | 373 | if (this == obj) |
|
| - | 374 | return true; |
|
| - | 375 | if (obj == null) |
|
| - | 376 | return false; |
|
| - | 377 | if (getClass() != obj.getClass()) |
|
| - | 378 | return false; |
|
| - | 379 | ProdutoDTO other = (ProdutoDTO) obj; |
|
| - | 380 | return Objects.equals(sequencial, other.sequencial); |
|
| 353 | }
|
381 | }
|
| 354 | 382 | ||
| 355 | }
|
383 | }
|