Blame |
Last modification |
View Log
| Download
| RSS feed
package br.com.ec.domain.model.tipos;
public enum TipoPapelPessoa
{
CLIENTE_C
(1,
"CLIENTE"),
COLABORADOR_O
(2,
"COLABORADOR"),
FORNECEDOR_F
(3,
"FORNECEDOR"),
TECNICO_T
(4,
"TÉCNICO");
private Integer tipo
;
private String descricao
;
private TipoPapelPessoa
(Integer tipo,
String descricao
) {
this.
tipo = tipo
;
this.
descricao = descricao
;
}
public String getDescricao
() {
return descricao
;
}
public Integer getValor
() {
return tipo
;
}
public static TipoPapelPessoa parse
(Integer tipo
) {
for (TipoPapelPessoa item : TipoPapelPessoa.
values()) {
if (item.
getValor().
equals(tipo
)) {
return item
;
}
}
return null;
}
}