protected void updateDocument(final int threadId, final int iCycle, final String dbUrl, final String className, final int iSkip) {
final ODatabaseDocumentTx db = getDatabase(dbUrl);
for (int retry = 0; retry < MAX_RETRY; ++retry) {
ODocument doc = null;
try {
List<OIdentifiable> result = db
.query(new OSQLSynchQuery<Object>("select from " + className + " skip " + iSkip + " limit 1"));
if (result == null || result.isEmpty())
log(threadId, iCycle, dbUrl, " update no item " + iSkip + " because out of range");
else {