Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | package br.com.ec.domain.model; |
| 2 | |||
| 3 | import java.io.Serializable; |
||
| 4 | |||
| 5 | import javax.persistence.Column; |
||
| 6 | import javax.persistence.Entity; |
||
| 7 | import javax.persistence.GeneratedValue; |
||
| 8 | import javax.persistence.GenerationType; |
||
| 9 | import javax.persistence.Id; |
||
| 10 | import javax.persistence.Table; |
||
| 11 | |||
| 12 | import br.edu.cesmac.core.util.StringUtil; |
||
| 13 | |||
| 14 | @Entity |
||
| 15 | @Table(name="sec_perfil", schema="sc_sec") |
||
| 16 | public class Perfil implements Serializable { |
||
| 17 | |||
| 18 | private static final long serialVersionUID = 1L; |
||
| 19 | |||
| 20 | private Long codigo; |
||
| 21 | private String descricao; |
||
| 22 | |||
| 23 | public Perfil(){} |
||
| 24 | |||
| 25 | public Perfil(long codigo) { |
||
| 26 | this.codigo = codigo; |
||
| 27 | } |
||
| 28 | |||
| 29 | @Id |
||
| 30 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
||
| 31 | @Column(name="cod_perfil", nullable=false) |
||
| 32 | public Long getCodigo() { |
||
| 33 | return codigo; |
||
| 34 | } |
||
| 35 | public void setCodigo(Long codigo) { |
||
| 36 | this.codigo = codigo; |
||
| 37 | } |
||
| 38 | |||
| 39 | @Column(name="dsc_perfil") |
||
| 40 | public String getDescricao() { |
||
| 41 | return descricao; |
||
| 42 | } |
||
| 43 | public void setDescricao(String descricao) { |
||
| 44 | this.descricao = StringUtil.setarUpperCase(descricao); |
||
| 45 | } |
||
| 46 | |||
| 47 | } |