* @param cascade kind of cascade used for dependent properties
* @param objectsBeingUpdated map containing subgraph of obejcts currently being updated, this is used to avoid loops, and NOT as a cache
* @return updated object
*/
public <DataType> Object performUpdate(BluePrintsBackedFinderService<DataType, ?> service, String objectVertexId, Class<?> valueClass, Map<Property, Collection<CascadeType>> containedProperties, Object toUpdate, CascadeType cascade, Map<String, Object> objectsBeingUpdated) {
IndexableGraph database = service.getDatabase();
Vertex objectVertex = GraphUtils.locateVertex(database, Properties.vertexId, objectVertexId);
// it's in fact an object creation
if(objectVertex==null) {
if (logger.isLoggable(Level.FINER)) {
logger.log(Level.FINER, "object "+objectVertexId.toString()+" has never before been seen in graph, so create central node for it");
}
objectVertex = database.addVertex(objectVertexId);
// As an aside, we add some indications regarding object id
objectVertex.setProperty(Properties.vertexId.name(), objectVertexId);
objectVertex.setProperty(Properties.kind.name(), nodeKind.name());
objectVertex.setProperty(Properties.type.name(), valueClass.getName());
}