private void fillFieldByType(java.lang.reflect.Field field, ResultSet resultSet, Object entity, String dataType)
            throws SQLException, IllegalAccessException {
        // Fill fields types
        switch (dataType) {
            case "int":
                field.set(entity, resultSet.getInt(field.getName()));
                break;
            case "float":
                field.set(entity, resultSet.getFloat(field.getName()));
                break;
            case "double":
                field.set(entity, resultSet.getDouble(field.getName()));
                break;
            case "class java.sql.Timestamp":
                field.set(entity, resultSet.getTimestamp(field.getName()));
                break;
            case "class java.util.Date":
            case "class java.sql.Date":
                field.set(entity, resultSet.getDate(field.getName()));
                break;
            case "class java.sql.Time":
                field.set(entity, resultSet.getTime(field.getName()));
                break;
            default:
                // String
                field.set(entity, resultSet.getString(field.getName()));
        }
    }