@ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public < T > void set ( PreparedStatement stmt , Path < ? > path , int i , T value ) throws SQLException { if ( value == null || value instanceof Null ) { Integer sqlType = null ; if ( path != null ) { ColumnMetadata columnMetadata = ColumnMetadata . getColumnMetadata ( path ) ; if ( columnMetadata . hasJdbcType ( ) ) { sqlType = columnMetadata . getJdbcType ( ) ; } } if ( sqlType != null ) { stmt . setNull ( i , sqlType ) ; } else { stmt . setNull ( i , Types . NULL ) ; } } else { getType ( path , ( Class ) value . getClass ( ) ) . setValue ( stmt , i , value ) ; } }
Set the value at the given index in the statement