public class CypherContext extends Object implements CompileContext
| Constructor and Description |
|---|
CypherContext(Compiler compiler,
Function<Object,Long> nativeIdProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
deregister(NodeBuilder nodeBuilder) |
boolean |
deregisterIncomingRelationships(Long tgt,
String relationshipType,
Class endNodeType,
boolean relationshipEntity)
Invoked when the mapper wishes to mark a set of incoming relationships to a specific type like (a)<-[:T]-(*) as deleted, prior
to possibly re-establishing them individually as it traverses the entity graph.
|
boolean |
deregisterOutgoingRelationships(Long src,
String relationshipType,
Class endNodeType)
Invoked when the mapper wishes to mark a set of outgoing relationships to a specific type like (a)-[:T]->(*) as deleted, prior
to possibly re-establishing them individually as it traverses the entity graph.
|
Compiler |
getCompiler() |
Collection<Mappable> |
getDeletedRelationships() |
Long |
getId(Long reference) |
Object |
getNewObject(Long id) |
Collection<Object> |
getTransientRelationships(SrcTargetKey srcTargetKey) |
Object |
getVisitedObject(Long reference) |
void |
register(Object object) |
void |
registerNewId(Long reference,
Long id) |
void |
registerNewObject(Long reference,
Object entity) |
void |
registerRelationship(Mappable mappedRelationship) |
void |
registerTransientRelationship(SrcTargetKey key,
Object object) |
Collection<Object> |
registry() |
boolean |
removeRegisteredRelationship(Mappable mappedRelationship) |
void |
visit(Object entity,
NodeBuilder nodeBuilder,
int horizon)
Stores nodeBuilder for given entity with horizon
if the nodeBuilder for the entity is already present it will be overwritten (or the horizon will change)
the caller should ensure it doesn't happen
|
boolean |
visited(Object entity,
int horizon) |
NodeBuilder |
visitedNode(Object entity) |
boolean |
visitedRelationshipEntity(Long relationshipEntity) |
void |
visitRelationshipEntity(Long relationshipEntity) |
public boolean visited(Object entity, int horizon)
visited in interface CompileContextpublic void visit(Object entity, NodeBuilder nodeBuilder, int horizon)
CompileContextvisit in interface CompileContextpublic void registerRelationship(Mappable mappedRelationship)
registerRelationship in interface CompileContextpublic boolean removeRegisteredRelationship(Mappable mappedRelationship)
removeRegisteredRelationship in interface CompileContextpublic NodeBuilder visitedNode(Object entity)
visitedNode in interface CompileContextpublic void registerNewObject(Long reference, Object entity)
registerNewObject in interface CompileContextpublic Object getNewObject(Long id)
getNewObject in interface CompileContextpublic void register(Object object)
register in interface CompileContextpublic void registerTransientRelationship(SrcTargetKey key, Object object)
registerTransientRelationship in interface CompileContextpublic Collection<Object> registry()
registry in interface CompileContextpublic boolean deregisterOutgoingRelationships(Long src, String relationshipType, Class endNodeType)
deregisterOutgoingRelationships in interface CompileContextsrc - the identity of the node at the start of the relationshiprelationshipType - the type of the relationshipendNodeType - the class type of the entity at the end of the relationshippublic boolean deregisterIncomingRelationships(Long tgt, String relationshipType, Class endNodeType, boolean relationshipEntity)
deregisterIncomingRelationships in interface CompileContexttgt - the identity of the node at the pointy end of the relationshiprelationshipType - the type of the relationshipendNodeType - the class type of the entity at the other end of the relationshippublic void visitRelationshipEntity(Long relationshipEntity)
visitRelationshipEntity in interface CompileContextpublic boolean visitedRelationshipEntity(Long relationshipEntity)
visitedRelationshipEntity in interface CompileContextpublic Compiler getCompiler()
getCompiler in interface CompileContextpublic Long getId(Long reference)
getId in interface CompileContextpublic void registerNewId(Long reference, Long id)
registerNewId in interface CompileContextpublic void deregister(NodeBuilder nodeBuilder)
deregister in interface CompileContextpublic Collection<Mappable> getDeletedRelationships()
getDeletedRelationships in interface CompileContextpublic Object getVisitedObject(Long reference)
getVisitedObject in interface CompileContextpublic Collection<Object> getTransientRelationships(SrcTargetKey srcTargetKey)
getTransientRelationships in interface CompileContextCopyright © 2015–2020 Neo Technology, Inc.. All rights reserved.