String queryBuf = "INSERT INTO PHYLOCHAR(TYPE, PHYLOCHAR_ID, VERSION, DESCRIPTION, LOWERLIMIT, UPPERLIMIT) VALUES('N', default, 0, ?, ?, ?) returning phylochar_id";
PreparedStatement ps = pCon.prepareStatement(queryBuf);
for (MatrixColumnJDBC columnJDBC : columns) {
ContinuousChar phyloChar = (ContinuousChar) columnJDBC.getPhyloChar();
ps.setString(1, phyloChar.getDescription()); // phylochar description
if (phyloChar.getLowerLimit() != null) {
ps.setDouble(2, phyloChar.getLowerLimit());
} else {
ps.setNull(2, Types.DOUBLE);
}
if (phyloChar.getUpperLimit() != null) {
ps.setDouble(3, phyloChar.getUpperLimit());
} else {
ps.setNull(3, Types.DOUBLE);
}
ResultSet rs = ps.executeQuery();