ORecordInternal.setIdentity(doc, new ORecordId(-2, getTemporaryRIDCounter(iContext))); result.add(doc); } else {
ORecordInternal.setIdentity(doc, new ORecordId(-2, cursor--)); current = doc; } else if (current instanceof List) { ODocument doc = new ODocument().field("value", current); ORecordInternal.setIdentity(doc, new ORecordId(-2, cursor--)); current = doc;
ORecordInternal.setIdentity(rec.getRecord(), new ORecordId(newRid)); } else { recordId.setClusterPosition(newRid.getClusterPosition());
ORecordInternal.setIdentity(rec.getRecord(), new ORecordId(newRid)); } else { recordId.setClusterPosition(newRid.getClusterPosition());
ORecordInternal.setIdentity(iRecord, new ORecordId(fieldValueAsString)); else if (fieldName.equals(ODocumentHelper.ATTRIBUTE_VERSION)) ORecordInternal.setVersion(iRecord, Integer.parseInt(fieldValue));
ORecordInternal.setIdentity(iRecord, new ORecordId(current.getClusterId(), current.getClusterPosition())); iRecord = database.load(iRecord, fetchPlan, false, true, lockingStrategy); } else
private void distributedDropIndex(final String iName) { String dropIndexDDL = "DROP INDEX `" + iName + "`"; //noinspection deprecation getDatabase().command(new OCommandSQL(dropIndexDDL)).execute(); ORecordInternal .setIdentity(delegate.getDocument(), new ORecordId(getDatabase().getStorage().getConfiguration().getIndexMgrRecordId())); reload(); }
ORecordInternal.setVersion(record, 0); record.setDirty(); ORecordInternal.setIdentity(record, new ORecordId());
public OIndex<?> createIndex(final String iName, final String iType, final OIndexDefinition iIndexDefinition, final int[] iClusterIdsToIndex, final OProgressListener progressListener, ODocument metadata, String engine) { String createIndexDDL; if (iIndexDefinition != null) createIndexDDL = iIndexDefinition.toCreateIndexDDL(iName, iType, engine); else createIndexDDL = new OSimpleKeyIndexDefinition().toCreateIndexDDL(iName, iType, engine); if (metadata != null) createIndexDDL += " " + OCommandExecutorSQLCreateIndex.KEYWORD_METADATA + " " + metadata.toJSON(); acquireExclusiveLock(); try { if (progressListener != null) progressListener.onBegin(this, 0, false); getDatabase().command(createIndexDDL).close(); ORecordInternal.setIdentity(document, new ORecordId(getDatabase().getStorage().getConfiguration().getIndexMgrRecordId())); if (progressListener != null) progressListener.onCompletition(this, true); reload(); return preProcessBeforeReturn(getDatabase(), indexes.get(iName)); } catch (OCommandExecutionException x) { throw new OIndexException(x.getMessage()); } finally { releaseExclusiveLock(); } }
private OIndex<?> distributedCreateIndex(final String iName, final String iType, final OIndexDefinition iIndexDefinition, final OProgressListener progressListener, ODocument metadata, String engine) { String createIndexDDL; if (iIndexDefinition != null) createIndexDDL = iIndexDefinition.toCreateIndexDDL(iName, iType, engine); else createIndexDDL = new OSimpleKeyIndexDefinition().toCreateIndexDDL(iName, iType, engine); if (metadata != null) createIndexDDL += " " + OCommandExecutorSQLCreateIndex.KEYWORD_METADATA + " " + metadata.toJSON(); if (progressListener != null) progressListener.onBegin(this, 0, false); //noinspection deprecation getDatabase().command(new OCommandSQL(createIndexDDL)).execute(); ORecordInternal .setIdentity(delegate.getDocument(), new ORecordId(getDatabase().getStorage().getConfiguration().getIndexMgrRecordId())); if (progressListener != null) progressListener.onCompletition(this, true); reload(); return delegate.preProcessBeforeReturn(getDatabase(), delegate.getIndex(iName)); }
ORecordInternal.setIdentity(doc, new ORecordId());
ORecordInternal.setIdentity(doc, new ORecordId());
ORecordInternal.setIdentity(doc, new ORecordId());