@Override protected Long fetchNextOrNull() { while (++lastId <= highId) { if (nodeExists(lastId)) { return lastId; } } return null; } }
/** * {@inheritDoc} */ @Override public void setNodeProperty(long nodeId, String propertyName, Object propertyValue) { transactionData.nodePropertyToBeSet(nodeById(nodeId), propertyName, propertyValue); super.setNodeProperty(nodeId, propertyName, propertyValue); transactionData.nodePropertySet(nodeById(nodeId), propertyName, propertyValue); }
/** * {@inheritDoc} */ @Override public void setRelationshipProperty(long relationshipId, String propertyName, Object propertyValue) { transactionData.relationshipPropertyToBeSet(relationshipById(relationshipId), propertyName, propertyValue); super.setRelationshipProperty(relationshipId, propertyName, propertyValue); transactionData.relationshipPropertySet(relationshipById(relationshipId), propertyName, propertyValue); }
/** * {@inheritDoc} */ @Override public void removeRelationshipProperty(long relationshipId, String property) { transactionData.relationshipPropertyToBeRemoved(relationshipById(relationshipId), property); super.removeRelationshipProperty(relationshipId, property); transactionData.relationshipPropertyRemoved(relationshipById(relationshipId), property); }
/** * {@inheritDoc} */ @Override public void createNode(long nodeId, Map<String, Object> properties) { super.createNode(nodeId, properties); transactionData.nodeCreated(nodeById(nodeId)); }
/** * {@inheritDoc} */ @Override public long createRelationship(long node1, long node2, RelationshipType type, Map<String, Object> properties) { long relationshipId = super.createRelationship(node1, node2, type, properties); transactionData.relationshipCreated(relationshipById(relationshipId)); return relationshipId; }
/** * {@inheritDoc} */ @Override public long createNode(Map<String, Object> properties) { long nodeId = super.createNode(properties); transactionData.nodeCreated(nodeById(nodeId)); return nodeId; }
/** * {@inheritDoc} */ @Override public void setRelationshipProperties(long relationshipId, Map<String, Object> properties) { Set<String> removedProperties = super.getRelationshipProperties(relationshipId).keySet(); Relationship relationship = relationshipById(relationshipId); for (String key : removedProperties) { transactionData.relationshipPropertyToBeRemoved(relationship, key); } for (String key : properties.keySet()) { transactionData.relationshipPropertyToBeSet(relationship, key, properties.get(key)); } super.setRelationshipProperties(relationshipId, properties); for (String key : removedProperties) { transactionData.relationshipPropertyRemoved(relationship, key); } for (String key : properties.keySet()) { transactionData.relationshipPropertySet(relationship, key, properties.get(key)); } }
/** * {@inheritDoc} */ @Override public void setNodeProperties(long nodeId, Map<String, Object> properties) { Set<String> removedProperties = super.getNodeProperties(nodeId).keySet(); Node node = nodeById(nodeId); for (String key : removedProperties) { transactionData.nodePropertyToBeRemoved(node, key); } for (String key : properties.keySet()) { transactionData.nodePropertyToBeSet(node, key, properties.get(key)); } super.setNodeProperties(nodeId, properties); for (String key : removedProperties) { transactionData.nodePropertyRemoved(node, key); } for (String key : properties.keySet()) { transactionData.nodePropertySet(node, key, properties.get(key)); } }