if (rs.next()) {
RemoteDocList docList = parseDocList(rs
.getString("list"));
boolean exist = false;
for (Iterator itr = docList.docList.iterator(); itr.hasNext(); ) {
RemoteOneNodeList oneNodeList = (RemoteOneNodeList)itr.next();
if (sourceNodeId.equals(oneNodeList.nodeid)) {
oneNodeList.add(list);
exist = true;
}
}
if (!exist) {
docList.add(new RemoteOneNodeList(sourceNodeId,
list));
docList.idf = docList.idf + getIdf();
}
// updateStatement.setString(1, parseString(docList));
// updateStatement.setString(2, keyword);
// updateStatement.addBatch();
commitBatchThread.addJob(new BatchJob(keyword, docList,
false));
} else {
// insertStatement.setString(1, keyword);
// insertStatement.setString(2, parseString(keyword,
// sourceNodeId, list));
// insertStatement.addBatch();
RemoteDocList l = new RemoteDocList(keyword, getIdf());
RemoteOneNodeList oneNodeList = new RemoteOneNodeList(
sourceNodeId, list);
l.add(oneNodeList);
commitBatchThread
.addJob(new BatchJob(keyword, l, true));
}