private Element requeryWithAuthsAndMergedElement(Graph graph, Element element, Authorizations authorizations) { Element existingElement; if (element instanceof Vertex) { existingElement = graph.getVertex(element.getId(), authorizations); } else if (element instanceof Edge) { existingElement = graph.getEdge(element.getId(), authorizations); } else { throw new SecureGraphException("Unexpected element type " + element.getClass().getName()); } if (existingElement == null) { return element; } LOGGER.debug("Reindexing element " + element.getId()); existingElement.mergeProperties(element); return existingElement; }
private Element requeryWithAuthsAndMergedElement(Graph graph, Element element, Authorizations authorizations) { Element existingElement; if (element instanceof Vertex) { existingElement = graph.getVertex(element.getId(), authorizations); } else if (element instanceof Edge) { existingElement = graph.getEdge(element.getId(), authorizations); } else { throw new SecureGraphException("Unexpected element type " + element.getClass().getName()); } if (existingElement == null) { return element; } LOGGER.debug("Reindexing element " + element.getId()); existingElement.mergeProperties(element); return existingElement; }