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 TipoReposicaoMinima { |
||
| 4 | |||
| 5 | REPOR_1X(new Integer(1), "REPOSIÇÃO 1X"), |
||
| 6 | REPOR_2X(new Integer(2), "REPOSIÇÃO 2X"), |
||
| 7 | REPOR_3X(new Integer(3), "REPOSIÇÃO 3X"); |
||
| 8 | |||
| 9 | private Integer tipo; |
||
| 10 | private String descricao; |
||
| 11 | |||
| 12 | private TipoReposicaoMinima(Integer tipo, String descricao) { |
||
| 13 | this.tipo = tipo; |
||
| 14 | this.descricao = descricao; |
||
| 15 | } |
||
| 16 | |||
| 17 | public String getDescricao() { |
||
| 18 | return descricao; |
||
| 19 | } |
||
| 20 | |||
| 21 | public Integer getValor() { |
||
| 22 | return tipo; |
||
| 23 | } |
||
| 24 | |||
| 25 | public static TipoReposicaoMinima parse(String tipo) { |
||
| 26 | for (TipoReposicaoMinima item : TipoReposicaoMinima.values()) { |
||
| 27 | if (item.getValor().equals(tipo)) { |
||
| 28 | return item; |
||
| 29 | } |
||
| 30 | } |
||
| 31 | return null; |
||
| 32 | } |
||
| 33 | |||
| 34 | } |