package com.bcxin.risk.report.enums;

public enum QuestionType {

	//开放问题 原可选问题
	UNFIXED {public String getValue(){return "0";} public String getName(){return "开放问题";}}, 
	
	FIXED {public String getValue(){return "1";} public String getName(){return "固定问题";}},

	SUPPLEMENT{public String getValue(){return "2";} public String getName(){return "补充问题";}},
	
	CARRYOVER{public String getValue(){return "3";} public String getName(){return "遗留问题";}};
    
    public abstract String getValue();
    
    public abstract String getName();
    
    public static QuestionType convertName(String name){
    	if(name.equals("UNFIXED"))
    		return QuestionType.UNFIXED;
    	else if(name.equals("FIXED"))
    		return QuestionType.FIXED;
    	else if(name.equals("SUPPLEMENT"))
    		return QuestionType.SUPPLEMENT;
    	else if(name.equals("CARRYOVER"))
        		return QuestionType.CARRYOVER;
    	return null;
    }
}
