1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
//faire un insert en remplacant le ? concernant le CLOB par empty_clob()
//puis
String queryTmp = "SELECT field from mytable where id = ?";
PreparedStatement pstmtTmp = sess.connection().prepareStatement(queryTmp);
pstmtTmp.setInt(1,id);
ResultSet rsTmp = pstmtTmp.executeQuery();
if (rsTmp.next()) {
CLOB myCLOB = ((OracleResultSet)rsTmp).getCLOB("field");
Writer foutTmp = myCLOB.getCharacterOutputStream();
foutTmp.write(protein.getSequence());
foutTmp.flush();
foutTmp.close();
} |