Skip to content

Instantly share code, notes, and snippets.

Created May 6, 2015 14:06
Show Gist options
  • Save anonymous/59c47d41ceee17804ee7 to your computer and use it in GitHub Desktop.
Save anonymous/59c47d41ceee17804ee7 to your computer and use it in GitHub Desktop.
public class ProductMain {
public boolean executeMain(ResourceHolder resourceholder){
Log log = BCLogFactory.getLog(ProductMain.class);
CommonPrinter commonPrinter = null;
Statement statement = null;
ResultSet resultSet = null;
try {
String outputileName = resourceHolder.getOutputFileName();
commonPrinter = new CommonPrinter(outputFileName, "UTF-8");
Connection connection = resourceHolder.getConnection();
statement = connection.createStatement();
resultSet = statement.executeQuery("Select SYA_NM From syainjhsample ");
while(resultSet.next()){
String syaNm = resultSet.getString(1);
commonPrinter.writeLine(syaNm);
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment