return "null";
}
String returnValue;
TypeConverter converter = TypeConverterFactory.getInstance().findTypeConverter(database);
BooleanType booleanType = converter.getBooleanType();
if (value instanceof String) {
String trim = StringUtils.trim((String) value);
if ("T".equals(trim)) {
return booleanType.getTrueBooleanValue();
} else if ("F".equals(trim) || StringUtils.isEmpty((String) value) || "0".equals(trim)) {
return booleanType.getFalseBooleanValue();
} else {
throw new UnexpectedLiquibaseException("Unknown boolean value: " + value);
}
} else if (value instanceof Integer) {
if (Integer.valueOf(1).equals(value)) {
returnValue = booleanType.getTrueBooleanValue();
} else {
returnValue = booleanType.getFalseBooleanValue();
}
} else if (value instanceof Long) {
if (Long.valueOf(1).equals(value)) {
returnValue = booleanType.getTrueBooleanValue();
} else {
returnValue = booleanType.getFalseBooleanValue();
}
} else if (((Boolean) value)) {
returnValue = booleanType.getTrueBooleanValue();
} else {
returnValue = booleanType.getFalseBooleanValue();
}
return returnValue;
}