/**
 * Copyright &copy; 2012-2013 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 */
package cn.com.qmth.stmms.common.utils.fieldtype;

/**
 * 字段类型转换
 * @author ThinkGem
 * @version 2013-03-10
 */
public class BooleanType {

	/**
	 * 获取对象值（导入）
	 */
	public static Boolean getValue(String val) {
		if("true".equals(val) || "TRUE".equals(val) || "是".equals(val)){
			return true;
		}else{
			return false;
		}
	}

	/**
	 * 设置对象值（导出）
	 */
	public static String setValue(Boolean val) {
		if(val){
			return "true";
		}else{
			return "false";
		}
	}
}
