public ColumnConfig setDefaultValueBoolean ( String defaultValueBoolean ) { defaultValueBoolean = StringUtil . trimToNull ( defaultValueBoolean ) ; if ( ( defaultValueBoolean == null ) || "null" . equalsIgnoreCase ( defaultValueBoolean ) ) { this . defaultValueBoolean = null ; } else { if ( "true" . equalsIgnoreCase ( defaultValueBoolean ) || "1" . equals ( defaultValueBoolean ) ) { this . defaultValueBoolean = true ; } else if ( "false" . equalsIgnoreCase ( defaultValueBoolean ) || "0" . equals ( defaultValueBoolean ) ) { this . defaultValueBoolean = false ; } else { this . defaultValueComputed = new DatabaseFunction ( defaultValueBoolean ) ; } } return this ; }
Set the defaultValueBoolean based on a given string . If the passed value cannot be parsed as a date it is assumed to be a function that returns a boolean . If the string null or an empty string is passed it will set a null value . If 1 is passed defaultValueBoolean is set to true . If 0 is passed defaultValueBoolean is set to false