// Path: src/main/java/net/ucanaccess/converters/TypesMap.java
// public static enum AccessType{
// 		BYTE,
// 		COUNTER,
// 		CURRENCY, 
// 		DATETIME,
// 		DOUBLE,
// 		GUID,
// 		INTEGER,
// 		LONG,
// 		MEMO, 
// 		NUMERIC,
// 		OLE,
// 		SINGLE,
// 		TEXT,
// 		YESNO
// }
// 
// Path: src/main/java/net/ucanaccess/jdbc/UcanaccessSQLException.java
// public class UcanaccessSQLException extends SQLException {
// 	public enum ExceptionMessages{
// 		CONCURRENT_PROCESS_ACCESS,
// 		INVALID_CREATE_STATEMENT,
// 		INVALID_INTERVAL_VALUE,
// 		INVALID_JACKCESS_OPENER,
// 		INVALID_MONTH_NUMBER, 
// 		NOT_A_VALID_PASSWORD, 
// 		ONLY_IN_MEMORY_ALLOWED, 
// 		UNPARSABLE_DATE,
// 		COMPLEX_TYPE_UNSUPPORTED, 
// 		INVALID_PARAMETER,
// 		INVALID_TYPES_IN_COMBINATION,
// 		UNSUPPORTED_TYPE
// 	}
// 	private static final long serialVersionUID = -1432048647665807662L;
// 	private Throwable cause;
// 	public UcanaccessSQLException() {
// 	}
// 	
// 	public UcanaccessSQLException(ExceptionMessages reason) {
// 		super(Logger.getMessage(reason.name()));
// 	}
// 	
// 	public UcanaccessSQLException(String reason, String SQLState) {
// 		super(Logger.getMessage(reason), SQLState);
// 	}
// 	
// 	public UcanaccessSQLException(String reason, String SQLState, int vendorCode) {
// 		super(Logger.getMessage(reason), SQLState, vendorCode);
// 	}
// 	
// 	public UcanaccessSQLException(String reason, String sqlState,
// 			int vendorCode, Throwable cause) {
// 		super(Logger.getMessage(reason), sqlState, vendorCode, cause);
// 	}
// 	
// 	public UcanaccessSQLException(String reason, String sqlState, Throwable cause) {
// 		super(Logger.getMessage(reason), sqlState, cause);
// 	}
// 	
// 	public UcanaccessSQLException(String reason, Throwable cause) {
// 		super(Logger.getMessage(reason), cause);
// 	}
// 	
// 	public UcanaccessSQLException(Throwable cause) {
// 		super( explaneCause(cause));
// 		this.cause=cause;
// 	}
// 	
// 	public static String explaneCause(Throwable cause){
// 		if(cause instanceof SQLException){
// 			SQLException se=(SQLException)cause;
// 			if(se.getErrorCode()==-5562){
// 				return cause.getMessage()+" "+Logger.getMessage(ExceptionMessages.INVALID_TYPES_IN_COMBINATION.name());
// 			}
// 		}
// 		return cause.getMessage();
// 	}
// 
// 	public Throwable getCause() {
// 		return this.cause;
// 	}
// }
// 
// Path: src/main/java/net/ucanaccess/jdbc/UcanaccessSQLException.java
// public enum ExceptionMessages{
// 	CONCURRENT_PROCESS_ACCESS,
// 	INVALID_CREATE_STATEMENT,
// 	INVALID_INTERVAL_VALUE,
// 	INVALID_JACKCESS_OPENER,
// 	INVALID_MONTH_NUMBER, 
// 	NOT_A_VALID_PASSWORD, 
// 	ONLY_IN_MEMORY_ALLOWED, 
// 	UNPARSABLE_DATE,
// 	COMPLEX_TYPE_UNSUPPORTED, 
// 	INVALID_PARAMETER,
// 	INVALID_TYPES_IN_COMBINATION,
// 	UNSUPPORTED_TYPE
// }


import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import net.ucanaccess.converters.TypesMap.AccessType;
import net.ucanaccess.ext.FunctionType;
import net.ucanaccess.jdbc.UcanaccessSQLException;
import net.ucanaccess.jdbc.UcanaccessSQLException.ExceptionMessages;
import java.math.BigDecimal;
import java.math.MathContext;
import java.sql.Timestamp;
import java.text.DateFormatSymbols;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.ParseException;
import java.text.SimpleDateFormat;
	@FunctionType(functionName = "ATN", argumentTypes = { AccessType.DOUBLE }, returnType = AccessType.DOUBLE)
	public static double atn(double v) {
		return Math.atan(v);
	}

	@FunctionType(functionName = "CBOOL", argumentTypes = { AccessType.NUMERIC }, returnType = AccessType.YESNO)
	public static boolean cbool(BigDecimal value) {
		return cbool((Object) value);
	}

	@FunctionType(functionName = "CBOOL", argumentTypes = { AccessType.YESNO }, returnType = AccessType.YESNO)
	public static boolean cbool(Boolean value) {
		return cbool((Object) value);
	}

	private static boolean cbool(Object obj) {
		boolean r = (obj instanceof Boolean) ? (Boolean) obj
				: (obj instanceof String) ? Boolean.valueOf((String) obj)
						: (obj instanceof Number) ? ((Number) obj)
								.doubleValue() != 0 : false;
		return r;
	}

	@FunctionType(functionName = "CBOOL", argumentTypes = { AccessType.MEMO }, returnType = AccessType.YESNO)
	public static boolean cbool(String value) {
		return cbool((Object) value);
	}

	@FunctionType(functionName = "CCUR", argumentTypes = { AccessType.CURRENCY }, returnType = AccessType.CURRENCY)
	public static BigDecimal ccur(BigDecimal value)
// Path: src/main/java/net/ucanaccess/converters/TypesMap.java
// public static enum AccessType{
// 		BYTE,
// 		COUNTER,
// 		CURRENCY, 
// 		DATETIME,
// 		DOUBLE,
// 		GUID,
// 		INTEGER,
// 		LONG,
// 		MEMO, 
// 		NUMERIC,
// 		OLE,
// 		SINGLE,
// 		TEXT,
// 		YESNO
// }
// 
// Path: src/main/java/net/ucanaccess/jdbc/UcanaccessSQLException.java
// public class UcanaccessSQLException extends SQLException {
// 	public enum ExceptionMessages{
// 		CONCURRENT_PROCESS_ACCESS,
// 		INVALID_CREATE_STATEMENT,
// 		INVALID_INTERVAL_VALUE,
// 		INVALID_JACKCESS_OPENER,
// 		INVALID_MONTH_NUMBER, 
// 		NOT_A_VALID_PASSWORD, 
// 		ONLY_IN_MEMORY_ALLOWED, 
// 		UNPARSABLE_DATE,
// 		COMPLEX_TYPE_UNSUPPORTED, 
// 		INVALID_PARAMETER,
// 		INVALID_TYPES_IN_COMBINATION,
// 		UNSUPPORTED_TYPE
// 	}
// 	private static final long serialVersionUID = -1432048647665807662L;
// 	private Throwable cause;
// 	public UcanaccessSQLException() {
// 	}
// 	
// 	public UcanaccessSQLException(ExceptionMessages reason) {
// 		super(Logger.getMessage(reason.name()));
// 	}
// 	
// 	public UcanaccessSQLException(String reason, String SQLState) {
// 		super(Logger.getMessage(reason), SQLState);
// 	}
// 	
// 	public UcanaccessSQLException(String reason, String SQLState, int vendorCode) {
// 		super(Logger.getMessage(reason), SQLState, vendorCode);
// 	}
// 	
// 	public UcanaccessSQLException(String reason, String sqlState,
// 			int vendorCode, Throwable cause) {
// 		super(Logger.getMessage(reason), sqlState, vendorCode, cause);
// 	}
// 	
// 	public UcanaccessSQLException(String reason, String sqlState, Throwable cause) {
// 		super(Logger.getMessage(reason), sqlState, cause);
// 	}
// 	
// 	public UcanaccessSQLException(String reason, Throwable cause) {
// 		super(Logger.getMessage(reason), cause);
// 	}
// 	
// 	public UcanaccessSQLException(Throwable cause) {
// 		super( explaneCause(cause));
// 		this.cause=cause;
// 	}
// 	
// 	public static String explaneCause(Throwable cause){
// 		if(cause instanceof SQLException){
// 			SQLException se=(SQLException)cause;
// 			if(se.getErrorCode()==-5562){
// 				return cause.getMessage()+" "+Logger.getMessage(ExceptionMessages.INVALID_TYPES_IN_COMBINATION.name());
// 			}
// 		}
// 		return cause.getMessage();
// 	}
// 
// 	public Throwable getCause() {
// 		return this.cause;
// 	}
// }
// 
// Path: src/main/java/net/ucanaccess/jdbc/UcanaccessSQLException.java
// public enum ExceptionMessages{
// 	CONCURRENT_PROCESS_ACCESS,
// 	INVALID_CREATE_STATEMENT,
// 	INVALID_INTERVAL_VALUE,
// 	INVALID_JACKCESS_OPENER,
// 	INVALID_MONTH_NUMBER, 
// 	NOT_A_VALID_PASSWORD, 
// 	ONLY_IN_MEMORY_ALLOWED, 
// 	UNPARSABLE_DATE,
// 	COMPLEX_TYPE_UNSUPPORTED, 
// 	INVALID_PARAMETER,
// 	INVALID_TYPES_IN_COMBINATION,
// 	UNSUPPORTED_TYPE
// }


// Path: src/main/java/net/ucanaccess/converters/Functions.java
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import net.ucanaccess.converters.TypesMap.AccessType;
import net.ucanaccess.ext.FunctionType;
import net.ucanaccess.jdbc.UcanaccessSQLException;
import net.ucanaccess.jdbc.UcanaccessSQLException.ExceptionMessages;
import java.math.BigDecimal;
import java.math.MathContext;
import java.sql.Timestamp;
import java.text.DateFormatSymbols;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.ParseException;
import java.text.SimpleDateFormat;

	@FunctionType(functionName = "ATN", argumentTypes = { AccessType.DOUBLE }, returnType = AccessType.DOUBLE)
	public static double atn(double v) {
		return Math.atan(v);
	}

	@FunctionType(functionName = "CBOOL", argumentTypes = { AccessType.NUMERIC }, returnType = AccessType.YESNO)
	public static boolean cbool(BigDecimal value) {
		return cbool((Object) value);
	}

	@FunctionType(functionName = "CBOOL", argumentTypes = { AccessType.YESNO }, returnType = AccessType.YESNO)
	public static boolean cbool(Boolean value) {
		return cbool((Object) value);
	}

	private static boolean cbool(Object obj) {
		boolean r = (obj instanceof Boolean) ? (Boolean) obj
				: (obj instanceof String) ? Boolean.valueOf((String) obj)
						: (obj instanceof Number) ? ((Number) obj)
								.doubleValue() != 0 : false;
		return r;
	}

	@FunctionType(functionName = "CBOOL", argumentTypes = { AccessType.MEMO }, returnType = AccessType.YESNO)
	public static boolean cbool(String value) {
		return cbool((Object) value);
	}

	@FunctionType(functionName = "CCUR", argumentTypes = { AccessType.CURRENCY }, returnType = AccessType.CURRENCY)
	public static BigDecimal ccur(BigDecimal value)
			throws UcanaccessSQLException {