public static Constant defaultInstance ( Type type ) { switch ( type . getSqlType ( ) ) { case ( INTEGER ) : return defaultInteger ; case ( BIGINT ) : return defaultBigInt ; case ( DOUBLE ) : return defaultDouble ; case ( VARCHAR ) : return defaultVarchar ; } throw new UnsupportedOperationException ( "Unspported SQL type: " + type . getSqlType ( ) ) ; }
Constructs a new instance of the specified type with default value . For all numeric constants the default value is 0 ; for string constants the default value is an empty string .