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 TipoSituacaoVenda { |
||
| 4 | |||
| 5 | NOVO("N", "NOVO"), |
||
| 6 | CONFERIDO("C", "CONFERIDO"), |
||
| 7 | |||
| 8 | AGUARDANDO("R", "A RECEBER"), |
||
| 9 | AGUARDANDOCARTAO("A", "AGUARDANDO CARTÃO"), |
||
| 10 | FINALIZADO("F", "FINALIZADO"), |
||
| 11 | PENDENCIAS("P", "PENDÊNCIAS"); |
||
| 12 | |||
| 13 | private String tipo; |
||
| 14 | private String descricao; |
||
| 15 | |||
| 16 | private TipoSituacaoVenda(String tipo, String descricao) { |
||
| 17 | this.tipo = tipo; |
||
| 18 | this.descricao = descricao; |
||
| 19 | } |
||
| 20 | |||
| 21 | public String getDescricao() { |
||
| 22 | return descricao; |
||
| 23 | } |
||
| 24 | |||
| 25 | public String getValor() { |
||
| 26 | return tipo; |
||
| 27 | } |
||
| 28 | |||
| 29 | public static TipoSituacaoVenda parse(String tipo) { |
||
| 30 | for (TipoSituacaoVenda item : TipoSituacaoVenda.values()) { |
||
| 31 | if (item.getValor().equals(tipo)) { |
||
| 32 | return item; |
||
| 33 | } |
||
| 34 | } |
||
| 35 | return null; |
||
| 36 | } |
||
| 37 | |||
| 38 | } |