int r = 0;
Map<String, List<Object[]>> sqlAndArgsList = new HashMap<String, List<Object[]>>();
Map<String, List<Object>> sqlPojosMapping = new HashMap<String, List<Object>>();
try {
for (Object obj : pojos) {
SqlInsGenerator sqlGenerator = new SqlInsGenerator(obj);
String sql = sqlGenerator.getSql();
if (sqlAndArgsList.containsKey(sql)) {
sqlAndArgsList.get(sql).add(sqlGenerator.getArgs());
sqlPojosMapping.get(sql).add(obj);
} else {
List<Object[]> argsList = new ArrayList<Object[]>();
argsList.add(sqlGenerator.getArgs());
sqlAndArgsList.put(sql, argsList);
List<Object> objsList = new ArrayList<Object>();
objsList.add(obj);
sqlPojosMapping.put(sql, objsList);