public void setProperty(final String key, final Object value) { ElementHelper.validateProperty(this, key, value); if (key.equals(Tokens._COUNT)) throw new IllegalArgumentException("_count is a reserved property"); if (null == this.properties) this.properties = new HashMap<String, Object>(); this.properties.put(TYPE_MAP.get(key), value); }
protected static void setPropertyInternal(final Element element, final ODocument doc, final String key, final Object value) { ElementHelper.validateProperty(element, key, value); doc.field(key, value); }
public void setProperty(final String key, final Object value) { ElementHelper.validateProperty(this, key, value); Object oldValue = this.properties.put(key, value); if (this instanceof TinkerVertex) this.graph.vertexKeyIndex.autoUpdate(key, value, oldValue, (TinkerVertex) this); else this.graph.edgeKeyIndex.autoUpdate(key, value, oldValue, (TinkerEdge) this); }
public void setProperty(final String key, final Object value) { ElementHelper.validateProperty(this, key, value); this.graph.autoStartTransaction(true); // attempts to take a collection and convert it to an array so that Neo4j can consume it this.rawElement.setProperty(key, tryConvertCollectionToArray(value)); }
public void setProperty(final String key, final Object value) { ElementHelper.validateProperty(this, key, value); graph.autoStartTransaction(); getRecord().field(key, value); save(); }
public void setProperty(final String key, final Object value) { ElementHelper.validateProperty(this, key, value); if (key.startsWith(RexsterTokens.UNDERSCORE)) throw new RuntimeException("RexsterGraph does not support property keys that start with underscore"); final Map<String, Object> data = new HashMap<String, Object>(); data.put(key, RestHelper.uriCast(value)); final JSONObject json = new JSONObject(data); if (this instanceof Vertex) { RestHelper.postResultObject(this.graph.getGraphURI() + RexsterTokens.SLASH_VERTICES_SLASH + RestHelper.encode(this.getId()), json); } else { RestHelper.postResultObject(this.graph.getGraphURI() + RexsterTokens.SLASH_EDGES_SLASH + RestHelper.encode(this.getId()), json); } }
@Override public void setProperty(final String key, final Object value) { ElementHelper.validateProperty(this, key, value); if (key.equals(StringFactory.LABEL)) { throw new IllegalArgumentException("Property key is reserved for all vertices and edges: " + StringFactory.LABEL);