Example #1
0
 void nodeRemoveProperty(NodeImpl node, PropertyData property, TransactionState tx) {
   if (!nodePropertyTrackers.isEmpty()) {
     for (PropertyTracker<Node> nodePropertyTracker : nodePropertyTrackers) {
       nodePropertyTracker.propertyRemoved(
           getNodeById(node.getId()),
           getIndexFor(property.getIndex(), tx).getKey(),
           property.getValue());
     }
   }
   persistenceManager.nodeRemoveProperty(node.getId(), property);
 }
Example #2
0
 void relRemoveProperty(RelationshipImpl rel, PropertyData property, TransactionState tx) {
   if (!relationshipPropertyTrackers.isEmpty()) {
     for (PropertyTracker<Relationship> relPropertyTracker : relationshipPropertyTrackers) {
       relPropertyTracker.propertyRemoved(
           getRelationshipById(rel.getId()),
           getIndexFor(property.getIndex(), tx).getKey(),
           property.getValue());
     }
   }
   persistenceManager.relRemoveProperty(rel.getId(), property);
 }
Example #3
0
  private <T extends PropertyContainer> void deleteFromTrackers(
      Primitive primitive, List<PropertyTracker<T>> trackers) {
    if (!trackers.isEmpty()) {
      Iterable<String> propertyKeys = primitive.getPropertyKeys(this);
      T proxy = (T) primitive.asProxy(this);

      for (String key : propertyKeys) {
        Object value = primitive.getProperty(this, key);
        for (PropertyTracker<T> tracker : trackers) {
          tracker.propertyRemoved(proxy, key, value);
        }
      }
    }
  }