Subversion Repositories Integrator Subversion

Rev

Blame | Last modification | View Log | Download | RSS feed

package br.gov.al.saude.srv.model.enums;

import br.gov.al.saude.framework.core.generic.TipoEnum;

public enum TipoParentesco implements TipoEnum{
       
        CONJUGE("C", "CĂ´njuge"),
        FILHO("F", "Filho");
       
        private final String value;
        private String descricao;

        private TipoParentesco(String value, String descricao) {
                this.value = value;
                this.descricao = descricao;
        }
       
        public String getValue() {
                return this.value;
        }

        public String getDescricao() {
                return this.descricao;
        }
       
        public static TipoParentesco parse(String tipo) {
                for (TipoParentesco item : TipoParentesco.values()) {
                        if (item.getValue().equals(tipo)) {
                                return item;
                        }
                }
                return null;
        }
       
        @Override
        public String toString() {
                return this.getDescricao();
        }

}