use of org.xipki.ca.dbtool.jaxb.ca.CAConfigurationType.CaHasProfiles in project xipki by xipki.
the class CaConfigurationDbExporter method exportCaHasProfile.
// method exportScep
private void exportCaHasProfile(CAConfigurationType caconf) throws DataAccessException {
System.out.println("exporting table CA_HAS_PROFILE");
CaHasProfiles caHasProfiles = new CaHasProfiles();
final String sql = "SELECT CA_ID,PROFILE_ID FROM CA_HAS_PROFILE";
Statement stmt = null;
ResultSet rs = null;
try {
stmt = createStatement();
rs = stmt.executeQuery(sql);
while (rs.next()) {
CaHasProfileType caHasProfile = new CaHasProfileType();
caHasProfile.setCaId(rs.getInt("CA_ID"));
caHasProfile.setProfileId(rs.getInt("PROFILE_ID"));
caHasProfiles.getCaHasProfile().add(caHasProfile);
}
} catch (SQLException ex) {
throw translate(sql, ex);
} finally {
releaseResources(stmt, rs);
}
caconf.setCaHasProfiles(caHasProfiles);
System.out.println(" exported table CA_HAS_PROFILE");
}
Aggregations