public class MappingContext extends Object
| Constructor and Description |
|---|
MappingContext(MetaData metaData) |
| Modifier and Type | Method and Description |
|---|---|
Object |
addNodeEntity(Object entity,
Long id) |
void |
addRelationship(MappedRelationship relationship) |
Object |
addRelationshipEntity(Object relationshipEntity,
Long id) |
void |
clear() |
boolean |
containsRelationship(MappedRelationship relationship) |
boolean |
detachNodeEntity(Object id) |
boolean |
detachRelationshipEntity(Long id) |
Collection<Object> |
getEntities(Class<?> type) |
Object |
getNodeEntity(Object id) |
Object |
getRelationshipEntity(Long relationshipId) |
Set<MappedRelationship> |
getRelationships() |
boolean |
isDirty(Object entity) |
LabelHistory |
labelHistory(Long identity) |
Set<Object> |
neighbours(Object entity) |
void |
removeEntity(Object entity)
removes all information about this object from the mapping context
|
void |
removeNodeEntity(Object entity,
Long id)
De-registers an object from the mapping context
- removes the object instance from the typeRegister(s)
- removes the object id from the nodeEntityRegister
- removes any relationship entities from relationshipEntityRegister if they have this object either as start or end node
|
boolean |
removeRelationship(MappedRelationship mappedRelationship) |
void |
removeType(Class<?> type)
purges all information about objects of the supplied type
from the mapping context.
|
void |
replaceNodeEntity(Object entity,
Long id) |
void |
replaceRelationshipEntity(Object entity,
Long id) |
void |
reset(Object entity)
purges all information about this object from the mapping context
and also sets its id to null.
|
public MappingContext(MetaData metaData)
public boolean removeRelationship(MappedRelationship mappedRelationship)
public void removeNodeEntity(Object entity, Long id)
entity - the object to deregisterid - the id of the object in Neo4jpublic Collection<Object> getEntities(Class<?> type)
public LabelHistory labelHistory(Long identity)
public boolean isDirty(Object entity)
public boolean containsRelationship(MappedRelationship relationship)
public Set<MappedRelationship> getRelationships()
public void addRelationship(MappedRelationship relationship)
public void clear()
public void removeType(Class<?> type)
type - the type whose object references and relationship mappings we want to purgepublic boolean detachNodeEntity(Object id)
public boolean detachRelationshipEntity(Long id)
public void removeEntity(Object entity)
entity - the instance whose references and relationship mappings we want to purgepublic void reset(Object entity)
entity - the instance whose references and relationship mappings we want to resetCopyright © 2016 Neo Technology, Inc.. All rights reserved.