public Object mapRow(ResultSet rs, int rowNum) throws SQLException {  
          
        Object defaultInstance = null;  
        try {  
            defaultInstance = this.getBeanClass().newInstance();//获取bean的实例  
        } catch (Exception e) {  
            logger.error(e, e);  
        }  
        if(defaultInstance == null){  
            logger.error("attempt to new a instance of class named : " + this.getBeanClass().getName() + " but failed!!!");  
            return null;  
        }  
        //获取元数据  
        ResultSetMetaData rsmd = rs.getMetaData();  
        int columnCount = rsmd.getColumnCount();  
          
        PropertyDescriptor propertyDescriptor = null;  
        try {  
            for (int i = 1; i <= columnCount; i++) {  
                String key = getColumnKey(JdbcUtils.lookupColumnName(rsmd, i));//获取resultset结果集中第i列对应的列名  
                Object obj = getColumnValue(rs, i, key);//获取resultset结果集中第i列对应的值  
                  
                propertyDescriptor = this.beanPropertyMap.get(key);  
                if(propertyDescriptor == null){//当前列名key对应的属性在bean中找不到,给予警告  
                    logger.warn("no corresponding property defined in class : " + this.getBeanClass().getName() + " for sql query resultset column '" + key + "' !!!");  
                    continue;  
                }else{////当前列名key对应的属性在bean中找到,则调用其setXxx方法设置其值  
                    propertyDescriptor.getWriteMethod().invoke(defaultInstance, obj);  
                }  
            }  
        } catch (Exception e) {  
            logger.error(e, e);  
        }   
          
        return defaultInstance;  
    }