Ejemplo n.º 1
0
 PropertyData relAddProperty(RelationshipImpl rel, PropertyIndex index, Object value) {
   if (!relationshipPropertyTrackers.isEmpty()) {
     for (PropertyTracker<Relationship> relPropertyTracker : relationshipPropertyTrackers) {
       relPropertyTracker.propertyAdded(getRelationshipById(rel.getId()), index.getKey(), value);
     }
   }
   return persistenceManager.relAddProperty(rel.getId(), index, value);
 }
Ejemplo n.º 2
0
 PropertyData nodeAddProperty(NodeImpl node, PropertyIndex index, Object value) {
   if (!nodePropertyTrackers.isEmpty()) {
     for (PropertyTracker<Node> nodePropertyTracker : nodePropertyTrackers) {
       nodePropertyTracker.propertyAdded(getNodeById(node.getId()), index.getKey(), value);
     }
   }
   return persistenceManager.nodeAddProperty(node.getId(), index, value);
 }
Ejemplo n.º 3
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);
 }
Ejemplo n.º 4
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);
 }
Ejemplo n.º 5
0
 PropertyData relChangeProperty(
     RelationshipImpl rel, PropertyData property, Object value, TransactionState tx) {
   if (!relationshipPropertyTrackers.isEmpty()) {
     for (PropertyTracker<Relationship> relPropertyTracker : relationshipPropertyTrackers) {
       relPropertyTracker.propertyChanged(
           getRelationshipById(rel.getId()),
           getIndexFor(property.getIndex(), tx).getKey(),
           property.getValue(),
           value);
     }
   }
   return persistenceManager.relChangeProperty(rel.getId(), property, value);
 }
Ejemplo n.º 6
0
 PropertyData nodeChangeProperty(
     NodeImpl node, PropertyData property, Object value, TransactionState tx) {
   if (!nodePropertyTrackers.isEmpty()) {
     for (PropertyTracker<Node> nodePropertyTracker : nodePropertyTrackers) {
       nodePropertyTracker.propertyChanged(
           getNodeById(node.getId()),
           getIndexFor(property.getIndex(), tx).getKey(),
           property.getValue(),
           value);
     }
   }
   return persistenceManager.nodeChangeProperty(node.getId(), property, value);
 }
Ejemplo n.º 7
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);
        }
      }
    }
  }