code: public static Map<Serializable, String> getBatchMailMap(String batchDataQuery, StorageService storageservice, DataSource dataSource) throws Exception {
  		Map<Serializable, String> result = new HashMap<Serializable, String>();
  		if (batchDataQuery == null) {
  			return result;
  		}
  		Connection connection = null;
  		QueryResult queryResult = null;
          try {        	
          	connection = ConnectionUtil.createConnection(storageservice, dataSource);
              Query query = new Query(batchDataQuery);
              QueryExecutor executor = new QueryExecutor(query, connection);
              executor.setMaxRows(0);
              executor.setTimeout(storageservice.getSettings().getQueryTimeout());
  
              queryResult = executor.execute();
  
              ResultSet rs = queryResult.getResultSet();    
              while(rs.next()) {
              	Serializable batchValue = (Serializable)rs.getObject(1);
              	String mail = rs.getString(2);            	
              	result.put(batchValue, mail);
              }       
          } finally {
          	ConnectionUtil.closeConnection(connection);		
          }
          return result;
  	}
docs: select <batch_parameter>, mail from <table>