Subversion Repositories Integrator Subversion

Rev

Rev 182 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 espaco 1
package br.com.ec.domain.model.tipos;
2
 
3
public enum TipoSituacaoPedidoResumido {
4
 
5
        NOVO("NO", "NOVO", "gray"),
6
        PEDIDO_EM_TRANSFERENCIA("PT", "PEDIDO EM TRANSFERÊNCIA", "blue"),
7
        AGUARDANDO_FINALIZACAO_CLIENTE("AF", "AGUARDANDO FINALIZAÇÃO PELO CLIENTE", "#3399CC");
8
 
9
        private String tipo;
10
        private String descricao;
11
        private String cor;
12
 
13
        private TipoSituacaoPedidoResumido(String tipo, String descricao, String cor) {
14
                this.tipo = tipo;
15
                this.descricao = descricao;
16
                this.cor = cor;
17
        }
18
 
19
        public String getDescricao() {
20
                return descricao;
21
        }
22
 
23
        public String getValor() {
24
                return tipo;
25
        }
26
 
27
        public String getCor() {
28
                return cor;
29
        }
30
 
31
        public static TipoSituacaoPedidoResumido parse(String tipo) {
32
                for (TipoSituacaoPedidoResumido item : TipoSituacaoPedidoResumido.values()) {
33
                        if (item.getValor().equals(tipo)) {
34
                                return item;
35
                        }
36
                }
37
                return null;
38
        }
39
 
40
}