protected static Object reDefineType ( QueryColumnImpl column , Object value ) { column . typeChecked = false ; if ( value == null || column . type == Types . OTHER ) return value ; if ( value instanceof String && ( ( String ) value ) . isEmpty ( ) ) return value ; switch ( column . type ) { // Numeric Values case Types . DOUBLE : return reDefineDouble ( column , value ) ; case Types . BIGINT : return reDefineDecimal ( column , value ) ; case Types . NUMERIC : return reDefineDouble ( column , value ) ; case Types . INTEGER : return reDefineInteger ( column , value ) ; case Types . TINYINT : return reDefineTinyInt ( column , value ) ; case Types . FLOAT : return reDefineFloat ( column , value ) ; case Types . DECIMAL : return reDefineDecimal ( column , value ) ; case Types . REAL : return reDefineFloat ( column , value ) ; case Types . SMALLINT : return reDefineShort ( column , value ) ; // DateTime Values case Types . TIMESTAMP : return reDefineDateTime ( column , value ) ; case Types . DATE : return reDefineDateTime ( column , value ) ; case Types . TIME : return reDefineDateTime ( column , value ) ; // Char case Types . CHAR : return reDefineString ( column , value ) ; case Types . VARCHAR : return reDefineString ( column , value ) ; case Types . LONGVARCHAR : return reDefineString ( column , value ) ; case Types . CLOB : return reDefineClob ( column , value ) ; // Boolean case Types . BOOLEAN : return reDefineBoolean ( column , value ) ; case Types . BIT : return reDefineBoolean ( column , value ) ; // Binary case Types . BINARY : return reDefineBinary ( column , value ) ; case Types . VARBINARY : return reDefineBinary ( column , value ) ; case Types . LONGVARBINARY : return reDefineBinary ( column , value ) ; case Types . BLOB : return reDefineBlob ( column , value ) ; // Others case Types . ARRAY : return reDefineOther ( column , value ) ; case Types . DATALINK : return reDefineOther ( column , value ) ; case Types . DISTINCT : return reDefineOther ( column , value ) ; case Types . JAVA_OBJECT : return reDefineOther ( column , value ) ; case Types . NULL : return reDefineOther ( column , value ) ; case Types . STRUCT : return reDefineOther ( column , value ) ; case Types . REF : return reDefineOther ( column , value ) ; default : return value ; } }
redefine type of value