to = inDocument; if (edge == null) { if (settings.isKeepInMemoryReferences()) edge = getEdgeInstance( from.getIdentity(), to.getIdentity(), label); else if (settings.isKeepInMemoryReferences()) edge.getRecord().fields(OrientBaseGraph.CONNECTION_OUT, currentVertex.rawElement.getIdentity(), OrientBaseGraph.CONNECTION_IN, inDocument.getIdentity()); if (settings.isKeepInMemoryReferences()) {
to = inDocument; if (edge == null) { if (settings.isKeepInMemoryReferences()) edge = graph.getEdgeInstance(from.getIdentity(), to.getIdentity(), label); else edgeRecord = edge.getRecord(); if (settings.isKeepInMemoryReferences()) edgeRecord .fields(OrientBaseGraph.CONNECTION_OUT, currentVertex.rawElement.getIdentity(), OrientBaseGraph.CONNECTION_IN, if (settings.isKeepInMemoryReferences()) {
doc.field(OrientBaseGraph.CONNECTION_OUT, settings.isKeepInMemoryReferences() ? vOutRecord.getIdentity() : vOutRecord); doc.field(OrientBaseGraph.CONNECTION_IN, settings.isKeepInMemoryReferences() ? vInRecord.getIdentity() : vInRecord); rawElement = doc;
/** * (Blueprints Extension) Returns the incoming vertex in form of record. */ public OIdentifiable getInVertex() { if (vIn != null) // LIGHTWEIGHT EDGE return vIn; setCurrentGraphInThreadLocal(); final ODocument doc = getRecord(); if (doc == null) return null; if (settings != null && settings.isKeepInMemoryReferences()) // AVOID LAZY RESOLVING+SETTING OF RECORD return doc.rawField(OrientBaseGraph.CONNECTION_IN); else return doc.field(OrientBaseGraph.CONNECTION_IN); }
/** * (Blueprints Extension) Returns the outgoing vertex in form of record. */ public OIdentifiable getOutVertex() { if (vOut != null) // LIGHTWEIGHT EDGE return vOut; setCurrentGraphInThreadLocal(); final ODocument doc = getRecord(); if (doc == null) return null; if (settings != null && settings.isKeepInMemoryReferences()) // AVOID LAZY RESOLVING+SETTING OF RECORD return doc.rawField(OrientBaseGraph.CONNECTION_OUT); else return doc.field(OrientBaseGraph.CONNECTION_OUT); }
/** * Returns true if the references are kept in memory. */ public boolean isKeepInMemoryReferences() { return settings.isKeepInMemoryReferences(); }