Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 106 | espaco | 1 | package br.com.ec.domain.model.tipos; |
| 2 | |||
| 3 | public enum TipoUniversidadeConteudo { |
||
| 4 | |||
| 5 | TEXTO("T", "TEXTO"), |
||
| 6 | VIDEO("V", "VÍDEO"), |
||
| 7 | LINK("L", "LINK"), |
||
| 8 | ARQUIVO_PDF("P", "ARQUIVO EM PDF"); |
||
| 9 | |||
| 10 | private String tipo; |
||
| 11 | private String descricao; |
||
| 12 | |||
| 13 | private TipoUniversidadeConteudo(String tipo, String descricao) { |
||
| 14 | this.tipo = tipo; |
||
| 15 | this.descricao = descricao; |
||
| 16 | } |
||
| 17 | |||
| 18 | public String getDescricao() { |
||
| 19 | return descricao; |
||
| 20 | } |
||
| 21 | |||
| 22 | public String getValor() { |
||
| 23 | return tipo; |
||
| 24 | } |
||
| 25 | |||
| 26 | public static TipoUniversidadeConteudo parse(String tipo) { |
||
| 27 | for (TipoUniversidadeConteudo item : TipoUniversidadeConteudo.values()) { |
||
| 28 | if (item.getValor().equals(tipo)) { |
||
| 29 | return item; |
||
| 30 | } |
||
| 31 | } |
||
| 32 | return null; |
||
| 33 | } |
||
| 34 | |||
| 35 | } |