@Test public void testQueryForPojoOne() { fail("Not yet implemented"); }
@Override public <T> T queryForPojoOne(Class<T> pojoType, Map<String, Object> args) throws DataAccessException { Map<String, Object[]> argsMap = new HashMap<String, Object[]>(); for (String key : args.keySet()) { argsMap.put(key, new Object[]{args.get(key)}); } SqlSelGenerator sqlGenerator = new SqlSelGenerator(pojoType, argsMap); String sql; Object[] objArgs; try { sql = sqlGenerator.getSql(); objArgs = sqlGenerator.getArgs(); } catch (IllegalAccessException e) { logger.error("init query sql error!", e); throw new DataAccessException("init query sql error!", e); } return (T) query(sql, objArgs, new PojoResultSetExtractor<T>(pojoType)); }
DefaultCommonDao implements ICommonDao { @Override public <T> T queryForPojoOne(Class<T> pojoType, Map<String, Object> args) throws DataAccessException { Map<String, Object[]> argsMap = new HashMap<String, Object[]>(); for (String key : args.keySet()) { argsMap.put(key, new Object[]{args.get(key)}); } SqlSelGenerator sqlGenerator = new SqlSelGenerator(pojoType, argsMap); String sql; Object[] objArgs; try { sql = sqlGenerator.getSql(); objArgs = sqlGenerator.getArgs(); } catch (IllegalAccessException e) { logger.error("init query sql error!", e); throw new DataAccessException("init query sql error!", e); } return (T) query(sql, objArgs, new PojoResultSetExtractor<T>(pojoType)); } }
DefaultCommonDao implements ICommonDao { @Override public <T> T queryForPojoOne(Class<T> pojoType, Map<String, Object> args) throws DataAccessException { Map<String, Object[]> argsMap = new HashMap<String, Object[]>(); for (String key : args.keySet()) { argsMap.put(key, new Object[]{args.get(key)}); } SqlSelGenerator sqlGenerator = new SqlSelGenerator(pojoType, argsMap); String sql; Object[] objArgs; try { sql = sqlGenerator.getSql(); objArgs = sqlGenerator.getArgs(); } catch (IllegalAccessException e) { logger.error("init query sql error!", e); throw new DataAccessException("init query sql error!", e); } return (T) query(sql, objArgs, new PojoResultSetExtractor<T>(pojoType)); } DefaultCommonDao(); }
DefaultCommonDao implements ICommonDao { @Override public <T> T queryForPojoOne(Class<T> pojoType, Map<String, Object> args) throws DataAccessException { Map<String, Object[]> argsMap = new HashMap<String, Object[]>(); for (String key : args.keySet()) { argsMap.put(key, new Object[]{args.get(key)}); } SqlSelGenerator sqlGenerator = new SqlSelGenerator(pojoType, argsMap); String sql; Object[] objArgs; try { sql = sqlGenerator.getSql(); objArgs = sqlGenerator.getArgs(); } catch (IllegalAccessException e) { logger.error("init query sql error!", e); throw new DataAccessException("init query sql error!", e); } return (T) query(sql, objArgs, new PojoResultSetExtractor<T>(pojoType)); } DefaultCommonDao(); @Override PaginationSupport<T> queryForPaginatedPojoList(String sql,
			Object[] args, Class<T> pojoType, RowSelection rowSelection); @Override PaginationSupport<T> queryForPaginatedPojoList(
			Class<T> pojoType, Map<String, Object> args,
			RowSelection rowSelection); @Override List<Map<String, Object>> queryForMapList(String sql, Object... args); @Override List<Map<String, Object>> queryForMapList(String sql, Map<String, Object> params); @Override List<T> queryForPojoList(String sql, Object[] args,
			Class<T> pojoType); @Override List<T> queryForPojoList(String sql, Map<String, Object> params,
			Class<T> pojoType); @Override List<T> queryForPojoList(Class<T> pojoType, Map<String, Object> args); @Override List<T> queryForPojoList(Class<T> pojoType, String col, Object... args); @SuppressWarnings("unchecked") @Override T queryForSimpObject(String sql, Object[] args, Class<T> requiredType); @Override List<T> queryForSimpObjectList(String sql, Object[] args,
			Class<T> requiredType); @Override T queryForPojoOne(Class<T> pojoType, Map<String, Object> args); @Override T queryCallback(String sql, Object[] args, ResultSetExtractor<T> resultSetExtractor); @Override int update(String sql, Object... args); @Override int updateByLogic(Object... pojos); @Override int updateByPhysical(Object... pojos); @Override int deleteByLogic(Object... pojos); @Override int deleteByPhysical(Object... pojos); @Override int delete(Class<T> pojoType, Map<String, Object> args); @Override int deleteByLogic(Class<T> pojoType, Object... args); @Override int deleteByPhysical(Class<T> pojoType, Object... args); @Override int insert(Object... pojos); @Override int[] batchUpdate(String sql, List<Object[]> argsList); @Override int[] batchUpdateByLogic(Class<T> pojoType, T... pojos); @Override int[] batchUpdateByPhysical(Class<T> pojoType, T... pojos); void setDataSource(DataSource dataSource); void setDbType(DBType dbType); }
DefaultCommonDao implements ICommonDao { @Override public <T> T queryForPojoOne(Class<T> pojoType, Map<String, Object> args) throws DataAccessException { Map<String, Object[]> argsMap = new HashMap<String, Object[]>(); for (String key : args.keySet()) { argsMap.put(key, new Object[]{args.get(key)}); } SqlSelGenerator sqlGenerator = new SqlSelGenerator(pojoType, argsMap); String sql; Object[] objArgs; try { sql = sqlGenerator.getSql(); objArgs = sqlGenerator.getArgs(); } catch (IllegalAccessException e) { logger.error("init query sql error!", e); throw new DataAccessException("init query sql error!", e); } return (T) query(sql, objArgs, new PojoResultSetExtractor<T>(pojoType)); } DefaultCommonDao(); @Override PaginationSupport<T> queryForPaginatedPojoList(String sql,
			Object[] args, Class<T> pojoType, RowSelection rowSelection); @Override PaginationSupport<T> queryForPaginatedPojoList(
			Class<T> pojoType, Map<String, Object> args,
			RowSelection rowSelection); @Override List<Map<String, Object>> queryForMapList(String sql, Object... args); @Override List<Map<String, Object>> queryForMapList(String sql, Map<String, Object> params); @Override List<T> queryForPojoList(String sql, Object[] args,
			Class<T> pojoType); @Override List<T> queryForPojoList(String sql, Map<String, Object> params,
			Class<T> pojoType); @Override List<T> queryForPojoList(Class<T> pojoType, Map<String, Object> args); @Override List<T> queryForPojoList(Class<T> pojoType, String col, Object... args); @SuppressWarnings("unchecked") @Override T queryForSimpObject(String sql, Object[] args, Class<T> requiredType); @Override List<T> queryForSimpObjectList(String sql, Object[] args,
			Class<T> requiredType); @Override T queryForPojoOne(Class<T> pojoType, Map<String, Object> args); @Override T queryCallback(String sql, Object[] args, ResultSetExtractor<T> resultSetExtractor); @Override int update(String sql, Object... args); @Override int updateByLogic(Object... pojos); @Override int updateByPhysical(Object... pojos); @Override int deleteByLogic(Object... pojos); @Override int deleteByPhysical(Object... pojos); @Override int delete(Class<T> pojoType, Map<String, Object> args); @Override int deleteByLogic(Class<T> pojoType, Object... args); @Override int deleteByPhysical(Class<T> pojoType, Object... args); @Override int insert(Object... pojos); @Override int[] batchUpdate(String sql, List<Object[]> argsList); @Override int[] batchUpdateByLogic(Class<T> pojoType, T... pojos); @Override int[] batchUpdateByPhysical(Class<T> pojoType, T... pojos); void setDataSource(DataSource dataSource); void setDbType(DBType dbType);  }