T - type of the wrapped entity.public abstract class EntitySnapshot<T extends org.neo4j.graphdb.Entity> extends BaseEntityWrapper<T> implements org.neo4j.graphdb.Entity
Entity that represents a snapshot of a Entity before a
transaction has started. It consults EntityTransactionData wrapped in TransactionDataContainer,
before returning information about contained properties in order to provide these as they were before the transactions started.
Mutations are preformed as expected but only in the case that the mutated Entity has not been deleted
in the transaction. If it has been deleted, an exception is thrown upon mutation.| Modifier and Type | Field and Description |
|---|---|
protected TransactionDataContainer |
transactionDataContainer |
protected T |
wrapped |
| Modifier | Constructor and Description |
|---|---|
protected |
EntitySnapshot(T wrapped,
TransactionDataContainer transactionDataContainer)
Construct a new snapshot.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkCanBeMutated()
Check whether this entity has not been deleted and can thus be mutated.
|
Object |
getProperty(String key) |
Iterable<String> |
getPropertyKeys() |
T |
getWrapped() |
boolean |
hasProperty(String key) |
Object |
removeProperty(String key) |
void |
setProperty(String key,
Object value) |
protected abstract EntityTransactionData<T> |
transactionData()
Get data about the transaction relevant for the subclass.
|
addLabel, createRelationshipTo, delete, equals, getDegree, getDegree, getDegree, getDegree, getEndNode, getGraphDatabase, getId, getLabels, getRelationships, getRelationships, getRelationships, getRelationships, getRelationships, getRelationshipTypes, getStartNode, getType, hashCode, hasLabel, removeLabel, self, wrapNode, wrapRelationship, wrapRelationshipsgetAllProperties, getNodes, getOtherNode, getProperties, getProperty, getSingleRelationship, hasRelationship, hasRelationship, hasRelationship, hasRelationship, hasRelationship, isType, node, relationshipprotected final T extends org.neo4j.graphdb.Entity wrapped
protected final TransactionDataContainer transactionDataContainer
protected EntitySnapshot(T wrapped, TransactionDataContainer transactionDataContainer)
wrapped - entity.transactionDataContainer - transaction data container.public T getWrapped()
getWrapped in interface Wrapper<T extends org.neo4j.graphdb.Entity>protected abstract EntityTransactionData<T> transactionData()
public boolean hasProperty(String key)
hasProperty in interface org.neo4j.graphdb.PropertyContainerhasProperty in class BaseEntityWrapper<T extends org.neo4j.graphdb.Entity>public Object getProperty(String key)
getProperty in interface org.neo4j.graphdb.PropertyContainergetProperty in class BaseEntityWrapper<T extends org.neo4j.graphdb.Entity>public void setProperty(String key, Object value)
setProperty in interface org.neo4j.graphdb.PropertyContainersetProperty in class BaseEntityWrapper<T extends org.neo4j.graphdb.Entity>public Object removeProperty(String key)
removeProperty in interface org.neo4j.graphdb.PropertyContainerremoveProperty in class BaseEntityWrapper<T extends org.neo4j.graphdb.Entity>protected void checkCanBeMutated()
IllegalStateException exception is thrown.public Iterable<String> getPropertyKeys()
getPropertyKeys in interface org.neo4j.graphdb.PropertyContainergetPropertyKeys in class BaseEntityWrapper<T extends org.neo4j.graphdb.Entity>Copyright © 2013-2016–2020 Graph Aware Limited. All rights reserved.