@@ -0,0 +1,1123 @@
+package com.r2c;%0A%0Aimport java.sql.ResultSet;%0A%0Aimport com.dushyant.xml.Database;%0Aimport com.dushyant.xml.Property;%0A%0Apublic final class CsvTask implements Runnable %7B%0A  private final SettingsReader settingsReader;%0A  private final Property property;%0A%0A  public CsvTask(SettingsReader settingsReader, Property property) %7B%0A    this.settingsReader = settingsReader;%0A    this.property = property;%0A  %7D%0A%0A  private RObject execute(Database db, String query) throws ConversionException, Exception %7B%0A    RObject rObject = null;%0A    R2c r2c = null;%0A    try (DummyConnectionManager conn = new DummyConnectionManager(db, query)) %7B%0A      final ResultSet resultSet = conn.getResultSet();%0A      r2c = new R2c(resultSet);%0A      rObject = r2c.getData();%0A    %7D%0A    return rObject;%0A  %7D%0A%0A  @Override%0A  public void run() %7B%0A    try %7B%0A      final RObject execute = execute(settingsReader.getActiveDatabase(), property.getValue());%0A      final String fileName =%0A          String.format(%22%25s-%25s.csv%22, property.getName(), (new java.util.Date()).getTime());%0A      execute.toCSV(fileName);%0A    %7D catch (Exception e) %7B%0A      e.printStackTrace();%0A    %7D%0A  %7D%0A%7D%0A

Create CsvTask.java