Rev 533 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 533 | Rev 534 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | package br.com.ec.domain.model; |
1 | package br.com.ec.domain.model; |
| 2 | 2 | ||
| 3 | import java.beans.Transient; |
- | |
| 4 | import java.io.File; |
- | |
| 5 | import java.io.Serializable; |
3 | import java.io.Serializable; |
| 6 | 4 | ||
| 7 | import javax.faces.context.FacesContext; |
- | |
| 8 | import javax.persistence.Column; |
5 | import javax.persistence.Column; |
| 9 | import javax.persistence.Entity; |
6 | import javax.persistence.Entity; |
| 10 | import javax.persistence.GeneratedValue; |
7 | import javax.persistence.GeneratedValue; |
| 11 | import javax.persistence.GenerationType; |
8 | import javax.persistence.GenerationType; |
| 12 | import javax.persistence.Id; |
9 | import javax.persistence.Id; |
| 13 | import javax.persistence.JoinColumn; |
10 | import javax.persistence.JoinColumn; |
| 14 | import javax.persistence.ManyToOne; |
11 | import javax.persistence.ManyToOne; |
| 15 | import javax.persistence.Table; |
12 | import javax.persistence.Table; |
| 16 | import javax.servlet.ServletContext; |
- | |
| 17 | import javax.validation.constraints.NotNull; |
13 | import javax.validation.constraints.NotNull; |
| 18 | import javax.validation.constraints.Size; |
14 | import javax.validation.constraints.Size; |
| 19 | 15 | ||
| 20 | import org.hibernate.annotations.ForeignKey; |
16 | import org.hibernate.annotations.ForeignKey; |
| 21 | import org.hibernate.validator.constraints.NotEmpty; |
17 | import org.hibernate.validator.constraints.NotEmpty; |
| 22 | 18 | ||
| 23 | import br.com.ec.core.interfaces.Alterar; |
19 | import br.com.ec.core.interfaces.Alterar; |
| 24 | import br.com.ec.core.interfaces.Cadastrar; |
20 | import br.com.ec.core.interfaces.Cadastrar; |
| 25 | import br.com.ec.core.util.StringUtil; |
21 | import br.com.ec.core.util.StringUtil; |
| 26 | import br.com.ec.domain.shared.ConstantesSEC; |
- | |
| 27 | 22 | ||
| 28 | @Entity |
23 | @Entity |
| 29 | @Table(name="sec_estampa", schema="sc_sec") |
24 | @Table(name="sec_estampa", schema="sc_sec") |
| 30 | public class Estampa implements Serializable { |
25 | public class Estampa implements Serializable { |
| 31 | 26 | ||
| Line 79... | Line 74... | ||
| 79 | this.codigo = StringUtil.setarUpperCaseComTrim(codigo); |
74 | this.codigo = StringUtil.setarUpperCaseComTrim(codigo); |
| 80 | }
|
75 | }
|
| 81 | 76 | ||
| 82 | @Column(name="dsc_extensao") |
77 | @Column(name="dsc_extensao") |
| 83 | @Size(max = 6, message = "Limite de caracteres ultrapassado: Extensão da Estampa") |
78 | @Size(max = 6, message = "Limite de caracteres ultrapassado: Extensão da Estampa") |
| 84 | @NotEmpty(message="Obrigatório informar a extensão", groups={Cadastrar.class, Alterar.class}) |
- | |
| 85 | public String getExtensao() { |
79 | public String getExtensao() { |
| 86 | return extensao; |
80 | return extensao; |
| 87 | }
|
81 | }
|
| 88 | public void setExtensao(String extensao) { |
82 | public void setExtensao(String extensao) { |
| 89 | this.extensao = StringUtil.setarUpperCaseComTrim(extensao); |
- | |
| - | 83 | this.extensao = extensao; |
|
| 90 | }
|
84 | }
|
| 91 | 85 | ||
| 92 | @Column(name="val_estampa") |
86 | @Column(name="val_estampa") |
| 93 | @NotNull(message="Obrigatório informar o valor", groups={Cadastrar.class, Alterar.class}) |
87 | @NotNull(message="Obrigatório informar o valor", groups={Cadastrar.class, Alterar.class}) |
| 94 | public Double getValor() { |
88 | public Double getValor() { |