@Override public void setProperty(String name, Object value, OType... fieldType) { element.setProperty(name, value, fieldType); }
@Override public void setProperty(String name, Object value) { element.setProperty(name, value); }
@Override public void setProperty(String name, Object value) { if (element == null) { promoteToRegularEdge(); } element.setProperty(name, value); }
@Override public void setProperty(String name, Object value, OType... fieldType) { if (element == null) { promoteToRegularEdge(); } element.setProperty(name, value, fieldType); }
/** * sets a property value on current document * * @param iFieldName The property name * @param iPropertyValue The property value */ public void setProperty(final String iFieldName, Object iPropertyValue) { if (iPropertyValue instanceof OElement && !((OElement) iPropertyValue).getSchemaType().isPresent() && !((OElement) iPropertyValue).getIdentity().isValid()) { setProperty(iFieldName, iPropertyValue, OType.EMBEDDED); } else { setProperty(iFieldName, iPropertyValue, OCommonConst.EMPTY_TYPES_ARRAY); } }
/** * handles vertex consistency after an UPDATE EDGE * * @param record the edge record */ private void handleUpdateEdge(ODocument record) { Object currentOut = record.field("out"); Object currentIn = record.field("in"); Object prevOut = record.getOriginalValue("out"); Object prevIn = record.getOriginalValue("in"); // to manage subqueries if (currentOut instanceof Collection && ((Collection) currentOut).size() == 1) { currentOut = ((Collection) currentOut).iterator().next(); record.setProperty("out", currentOut); } if (currentIn instanceof Collection && ((Collection) currentIn).size() == 1) { currentIn = ((Collection) currentIn).iterator().next(); record.setProperty("in", currentIn); } validateOutInForEdge(record, currentOut, currentIn); changeVertexEdgePointer(record, (OIdentifiable) prevIn, (OIdentifiable) currentIn, "in"); changeVertexEdgePointer(record, (OIdentifiable) prevOut, (OIdentifiable) currentOut, "out"); }
setProperty(f, otherValue); setProperty(f, otherValue);
doc.setClassName(getProperty(s)); } else { doc.setProperty(s, convertToElement(getProperty(s)));
doc.setProperty(returnAlias.getStringValue(), executed, OType.EMBEDDED); } else { doc.setProperty(returnAlias.getStringValue(), executed);
@Override public <RET> RET execute(Object... iArgs) { ODatabaseDocumentInternal database = ODatabaseRecordThreadLocal.instance().get(); if (database.getStorage().isRemote()) { BackwardOLiveQueryResultListener listener = new BackwardOLiveQueryResultListener(); OLiveQueryMonitor monitor = database.live(getText(), listener, iArgs); listener.token = (int) monitor.getMonitorId(); ODocument doc = new ODocument(); doc.setProperty("token", listener.token); OLegacyResultSet<ODocument> result = new OBasicLegacyResultSet<>(); result.add(doc); return (RET) result; } return super.execute(iArgs); }
target.setProperty(linkName, coll); coll.add((ODocument) oldValue); value = doc; target.setProperty(linkName, value); doc.setProperty(linkName, value); doc.save();