}
public void insertLobs() throws Exception {
String xpdl = importXPDL("test1.xml");
Object header = new HashMap();
UniversalPrepStmt prepStmt = null;
try {
// clean up
assertTrue(cleanup() == 0);
//con.commit();
// insert
prepStmt = new UniversalPrepStmt
(con, "INSERT INTO ProcessDefinition ("
+ "DBId, PackageId, ProcessId, Xpdl, Header, Enabled) "
+ "VALUES (?, ?, ?, ?, ?, 'T')");
int offset = 1;
prepStmt.setLong (offset++, 1000000);
prepStmt.setString(offset++, "univPrepStmtPackage");
prepStmt.setString(offset++, "univPrepStmtTest");
/*
prepStmt.setLargeString(offset++, null);
prepStmt.setBinary(offset++, null);
prepStmt.setLargeString(offset++, xpdl);
prepStmt.setBinary(offset++, header);
*/
prepStmt.setLargeString(offset++, null);
prepStmt.setBinary(offset++, null);
prepStmt.executeUpdate();
//con.commit();
// select
offset = 1;
prepStmt = new UniversalPrepStmt
(con, "SELECT Header, Xpdl FROM ProcessDefinition "
+ "WHERE DBId = 1000000");
ResultSet rs = prepStmt.executeQuery();
rs.next();
if (!isOracle) {
return;
}
Object blobObject = JDBCUtil.getBinary(rs, offset++);