code: public static Map<String, Object> queryForMap(String sql, Object... args) {
  		Map<String, Object> result = new HashMap<String, Object>();
  		List<Map<String, Object>> list = queryForList(sql, args);
  		if (list.size() > 0) {
  			result = list.get(0);
  		}
  		return result;
  	}
docs: Query a single record
  
  @param sql
  @param args
  @return Map<String,Object>