Subversion Repositories Integrator Subversion

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
470 blopes 1
package br.com.ec.domain.model.tipos;
2
 
3
public enum TipoInscricaoEstadual {
4
 
5
        CONTRIBUINTE_ICMS_1("C", "CONTRIBUINTE ICMS", "1"),
6
        CONTRIBUINTE_ISENTO_2("I", "CONTRIBUINTE ISENTO", "2"),
7
        NAO_CONTRIBUINTE_9("N", "NÃO CONTRIBUINTE", "3");
8
 
9
        private String tipo;
10
        private String descricao;
11
        private String nomenclaturaNotaFiscal;
12
 
13
        private TipoInscricaoEstadual(String tipo, String descricao, String nomenclaturaNotaFiscal) {
14
                this.tipo = tipo;
15
                this.descricao = descricao;
16
                this.nomenclaturaNotaFiscal = nomenclaturaNotaFiscal;
17
        }
18
 
19
        public String getDescricao() {
20
                return descricao;
21
        }
22
 
23
        public String getValor() {
24
                return tipo;
25
        }
26
 
27
        public String getNomenclaturaNotaFiscal() {
28
                return nomenclaturaNotaFiscal;
29
        }
30
 
31
        public static TipoInscricaoEstadual parse(String tipo) {
32
                for (TipoInscricaoEstadual item : TipoInscricaoEstadual.values()) {
33
                        if (item.getValor().equals(tipo)) {
34
                                return item;
35
                        }
36
                }
37
                return null;
38
        }
39
 
40
}