/** * Constructor used in unmarshalling. */ protected OClassImpl(final OSchemaShared iOwner, final String iName) { this(iOwner, new ODocument().setTrackingChanges(false), iName); }
OPropertyImpl(final OClassImpl owner) { document = new ODocument().setTrackingChanges(false); this.owner = owner; }
@SuppressWarnings("WeakerAccess") public OIndexManagerAbstract() { super(new ODocument().setTrackingChanges(false)); }
protected OAbstractIndexDefinition() { super(new ODocument().setTrackingChanges(false)); }
public OSchemaShared() { super(new ODocument().setTrackingChanges(false)); }
private ODocument jsonToDoc(MatchContext matchContext, OCommandContext ctx) { if (returnItems.size() == 1 && (returnItems.get(0).value instanceof OJson) && returnAliases.get(0) == null) { ODocument result = new ODocument(); result.setTrackingChanges(false); result.fromMap(((OJson) returnItems.get(0).value).toMap(matchContext.toDoc(), ctx)); return result; } throw new IllegalStateException("Match RETURN statement is not a plain JSON"); }
public ODocument getIndexChanges() { final ODocument result = new ODocument().setAllowChainedAccess(false).setTrackingChanges(false); for (Entry<String, OTransactionIndexChanges> indexEntry : indexEntries.entrySet()) { final ODocument indexDoc = new ODocument().setTrackingChanges(false); ODocumentInternal.addOwner(indexDoc, result); result.field(indexEntry.getKey(), indexDoc, OType.EMBEDDED); if (indexEntry.getValue().cleared) indexDoc.field("clear", Boolean.TRUE); final List<ODocument> entries = new ArrayList<ODocument>(); indexDoc.field("entries", entries, OType.EMBEDDEDLIST); // STORE INDEX ENTRIES for (OTransactionIndexChangesPerKey entry : indexEntry.getValue().changesPerKey.values()) { if (!entry.clientTrackOnly) entries.add(serializeIndexChangeEntry(entry, indexDoc)); } indexDoc.field("nullEntries", serializeIndexChangeEntry(indexEntry.getValue().nullKeyChanges, indexDoc)); } indexEntries.clear(); return result; }
iDocument.setTrackingChanges(false); iDocument.setTrackingChanges(true);
public static ODocument createProjectionDocument(final int iProgressive) { final ODocument doc = new ODocument().setOrdered(true).setTrackingChanges(false); // ASSIGN A TEMPORARY RID TO ALLOW PAGINATION IF ANY ((ORecordId) doc.getIdentity()).setClusterId(-2); ((ORecordId) doc.getIdentity()).setClusterPosition(iProgressive); return doc; }
private void updateIndexEntries(ODocument iDocument) { iDocument = checkForLoading(iDocument); final OClass cls = iDocument.getSchemaClass(); if (cls == null) return; final Collection<OIndex<?>> indexes = (Collection<OIndex<?>>) getDatabase().getMetadata().getIndexManager().getIndexes(); if (!indexes.isEmpty()) { final Set<String> dirtyFields = new HashSet<String>(Arrays.asList(iDocument.getDirtyFields())); if (!dirtyFields.isEmpty()) { for (final OIndex<?> index : indexes) { if (index.getInternal() instanceof OLuceneIndex && index.getConfiguration().field("metadata") != null) { if (index.getDefinition() instanceof OCompositeIndexDefinition) processCompositeIndexUpdate(index, dirtyFields, iDocument); else processSingleIndexUpdate(index, dirtyFields, iDocument); if (iDocument.isTrackingChanges()) { iDocument.setTrackingChanges(false); iDocument.setTrackingChanges(true); } } } } } }
doc.setTrackingChanges(false); for (Map.Entry<String, OIdentifiable> entry : matchContext.matched.entrySet()) { if (isExplicitAlias(entry.getKey())) { doc.setTrackingChanges(false); for (Map.Entry<String, OIdentifiable> entry : matchContext.matched.entrySet()) { doc.field(entry.getKey(), entry.getValue()); } else { doc = getDatabase().newInstance(); doc.setTrackingChanges(false); int i = 0; mapDoc.setTrackingChanges(false); mapDoc.fromMap((Map) matchContext.matched); ctx.setVariable("$current", mapDoc); doc.setTrackingChanges(true);
@Override public ODocument getRecord() { if (rawElement == null) { // CREATE AT THE FLY final ODocument tmp = new ODocument(getClassName(label)) .setTrackingChanges(false); tmp.field("in", vIn); tmp.field("out", vOut); if (label != null && !graph.isUseClassForEdgeLabel()) tmp.field("label", label); return tmp; } return super.getRecord(); }
keyContainer.setTrackingChanges(false); res.setTrackingChanges(false); ODocumentInternal.addOwner(res, indexDoc); return res.setAllowChainedAccess(false).field("k", keyContainer, OType.EMBEDDED).field("ops", operations, OType.EMBEDDEDLIST);
/** * (Blueprints Extension) Returns the underlying record if it's a regular edge, otherwise it created a document with no identity * with the edge properties. */ @Override public ODocument getRecord() { if (rawElement == null) { // CREATE AT THE FLY final ODocument tmp = new ODocument(getClassName(label)).setTrackingChanges(false); tmp.field(OrientBaseGraph.CONNECTION_IN, vIn.getIdentity()); tmp.field(OrientBaseGraph.CONNECTION_OUT, vOut.getIdentity()); if (label != null && settings != null && !settings.isUseClassForEdgeLabel()) tmp.field(OrientEdge.LABEL_FIELD_NAME, label); return tmp; } return super.getRecord(); }
if (className != null) { doc.setClassName(className); doc.setTrackingChanges(true);
metadata = new ODocument().setTrackingChanges(false);
.add(new ODocument().setTrackingChanges(false).field("old", oldVertex, OType.LINK).field("new", newVertex, OType.LINK));
acquireExclusiveLock(); try { configuration = indexConfigurationInstance(new ODocument().setTrackingChanges(false));
result.add(new ODocument().setTrackingChanges(false).field("old", oldVertex, OType.LINK) .field("new", newVertex, OType.LINK));