Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | package br.gov.al.saude.srv.model.enums; |
| 2 | |||
| 3 | import br.gov.al.saude.framework.core.generic.TipoEnum; |
||
| 4 | |||
| 5 | public enum TipoRemocao implements TipoEnum { |
||
| 6 | |||
| 7 | OFICIAL("L", "OFICIAL"), |
||
| 8 | OFICIOSA("A", "OFICIOSA"); |
||
| 9 | |||
| 10 | private final String value; |
||
| 11 | private String descricao; |
||
| 12 | |||
| 13 | private TipoRemocao(String value, String descricao) { |
||
| 14 | this.value = value; |
||
| 15 | this.descricao = descricao; |
||
| 16 | } |
||
| 17 | |||
| 18 | public String getDescricao() { |
||
| 19 | return descricao; |
||
| 20 | } |
||
| 21 | |||
| 22 | public String getValue() { |
||
| 23 | return value; |
||
| 24 | } |
||
| 25 | |||
| 26 | public static TipoRemocao parse(String tipo) { |
||
| 27 | for (TipoRemocao item : TipoRemocao.values()) { |
||
| 28 | if (item.getValue().equals(tipo)) { |
||
| 29 | return item; |
||
| 30 | } |
||
| 31 | } |
||
| 32 | return null; |
||
| 33 | } |
||
| 34 | |||
| 35 | } |