use of org.xipki.ca.dbtool.jaxb.ca.CAConfigurationType.CaHasPublishers in project xipki by xipki.
the class CaConfigurationDbExporter method exportCaHasPublisher.
// method exportCaHasRequestor
private void exportCaHasPublisher(CAConfigurationType caconf) throws DataAccessException {
System.out.println("exporting table CA_HAS_PUBLISHER");
CaHasPublishers caHasPublishers = new CaHasPublishers();
final String sql = "SELECT CA_ID,PUBLISHER_ID FROM CA_HAS_PUBLISHER";
Statement stmt = null;
ResultSet rs = null;
try {
stmt = createStatement();
rs = stmt.executeQuery(sql);
while (rs.next()) {
CaHasPublisherType caHasPublisher = new CaHasPublisherType();
caHasPublisher.setCaId(rs.getInt("CA_ID"));
caHasPublisher.setPublisherId(rs.getInt("PUBLISHER_ID"));
caHasPublishers.getCaHasPublisher().add(caHasPublisher);
}
} catch (SQLException ex) {
throw translate(sql, ex);
} finally {
releaseResources(stmt, rs);
}
caconf.setCaHasPublishers(caHasPublishers);
System.out.println(" exported table CA_HAS_PUBLISHER");
}
Aggregations