Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.neo4j.graphdb.event
Interface PropertyEntry<T extends PropertyContainer>

Type Parameters:
  `T` - The type of the entity the property belongs to, either `Node` or `Relationship`.

    public interface PropertyEntry<T extends PropertyContainer>

Represents a changed property. Instances of this interface represent the property as it is after the transaction when returned from `TransactionData.assignedNodeProperties()` or `TransactionData.assignedRelationshipProperties()`. Instances of this interface represent the property as it was before the transaction as well as how it will be after the transaction has been committed.

Author:
  Tobias Ivarsson

Method Summary
`T` | `entity()` Get the entity that this property was modified on.
`String` | `key()` Get the key of the modified property.
`Object` | `previouslyCommitedValue()` Get the value of the modified property as it was before the transaction (which modified it) started.
`Object` | `value()` Get the value of the modified property.

Method Detail

### entity

    T entity()

  Get the entity that this property was modified on. The entity is either a `Node` or a `Relationship`, depending on the generic type of this instance.

  Returns:
    the `Node` or `Relationship` that the property was modified on.

### key

    String key()

  Get the key of the modified property.

  Returns:
    the key of the modified property.

### previouslyCommitedValue

    Object previouslyCommitedValue()

  Get the value of the modified property as it was before the transaction (which modified it) started. If this `PropertyEntry` was returned from `TransactionData.assignedNodeProperties()` or `TransactionData.assignedRelationshipProperties()`, the value returned from this method is the value that was set for `key` on `entity` before the transaction started, or `null` if such a property wasn't set. If this `PropertyEntry` was returned from `TransactionData.removedNodeProperties()` or `TransactionData.removedRelationshipProperties()` the value returned from this method is the value that was stored at this property before the transaction started.

  Returns:
    The value of the property as it was before the transaction started.

### value

    Object value()

  Get the value of the modified property. If this `PropertyEntry` was returned from `TransactionData.assignedNodeProperties()` or `TransactionData.assignedRelationshipProperties()`, the value returned from this method is the value that will be assigned to the property after the transaction is committed. If this `PropertyEntry` was returned from `TransactionData.removedNodeProperties()` or `TransactionData.removedRelationshipProperties()` an `IllegalStateException` will be thrown.

  Returns:
    The value of the modified property.
  Throws:
    `IllegalStateException` - if this method is called where this instance represents a removed property.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 Neo4j. All Rights Reserved.