- public Vertex getVertex(String id, String version) throws CrudException {
- return dao.getVertex(id, version);
+ private Edge getValidatedEdge(String version, String id, String type, EdgePayload payload) throws CrudException {
+ OperationResult operationResult = dao.getEdge(id, type, new HashMap<String, String>());
+ return RelationshipSchemaValidator.validateIncomingUpdatePayload(Edge.fromJson(operationResult.getResult()), version, payload);
+ }
+
+ @Override
+ public ImmutablePair<EntityTag, String> patchEdge(String version, String id, String type, EdgePayload payload)
+ throws CrudException {
+ OperationResult operationResult = dao.getEdge(id, type, new HashMap<String, String>());
+ Edge patchedEdge = RelationshipSchemaValidator.validateIncomingPatchPayload(Edge.fromJson(operationResult.getResult()), version, payload);
+ return updateEdge(version, patchedEdge);