Spring Data Neo4j

org.springframework.data.neo4j.support.mapping
Class EntityStateHandler

java.lang.Object
  extended by org.springframework.data.neo4j.support.mapping.EntityStateHandler

public class EntityStateHandler
extends Object

Since:
02.10.11
Author:
mh

Constructor Summary
EntityStateHandler(Neo4jMappingContext mappingContext, GraphDatabase graphDatabase)
           
 
Method Summary
 RelationshipResult createRelationshipBetween(Object source, Object target, String type, boolean allowDuplicates)
           
 boolean equals(Object first, Object second)
           
<S extends org.neo4j.graphdb.PropertyContainer>
S
getPersistentState(Object entity)
           
<S extends org.neo4j.graphdb.PropertyContainer>
S
getPersistentState(Object entity, boolean check)
           
<R extends org.neo4j.graphdb.PropertyContainer>
R
getPersistentState(Object entity, Class<R> type)
           
 org.neo4j.graphdb.Relationship getRelationshipBetween(Object source, Object target, String type)
           
 Iterable<org.neo4j.graphdb.Relationship> getRelationshipsBetween(Object source, Object target, String type)
           
 int hashCode(Object entity)
           
 boolean hasPersistentState(Object entity)
           
 boolean isManaged(Class type)
           
 boolean isManaged(Object entity)
           
 boolean isNodeEntity(Class<?> targetType)
           
 boolean isRelationshipEntity(Class targetType)
           
 RelationshipResult relateTo(Object source, Object target, String type)
           
 RelationshipResult removeRelationshipTo(Object source, Object target, String relationshipType)
           
<S extends org.neo4j.graphdb.PropertyContainer>
void
setPersistentState(Object entity, S state)
           
<S extends org.neo4j.graphdb.PropertyContainer>
S
useOrCreateState(Object entity, S state, org.neo4j.graphdb.RelationshipType annotationProvidedRelationshipType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityStateHandler

public EntityStateHandler(Neo4jMappingContext mappingContext,
                          GraphDatabase graphDatabase)
Method Detail

setPersistentState

public <S extends org.neo4j.graphdb.PropertyContainer> void setPersistentState(Object entity,
                                                                               S state)

isManaged

public boolean isManaged(Object entity)

isManaged

public boolean isManaged(Class type)

hasPersistentState

public boolean hasPersistentState(Object entity)

getPersistentState

public <S extends org.neo4j.graphdb.PropertyContainer> S getPersistentState(Object entity)

getPersistentState

public <S extends org.neo4j.graphdb.PropertyContainer> S getPersistentState(Object entity,
                                                                            boolean check)

isNodeEntity

public boolean isNodeEntity(Class<?> targetType)

isRelationshipEntity

public boolean isRelationshipEntity(Class targetType)

useOrCreateState

public <S extends org.neo4j.graphdb.PropertyContainer> S useOrCreateState(Object entity,
                                                                          S state,
                                                                          org.neo4j.graphdb.RelationshipType annotationProvidedRelationshipType)

relateTo

public RelationshipResult relateTo(Object source,
                                   Object target,
                                   String type)

createRelationshipBetween

public RelationshipResult createRelationshipBetween(Object source,
                                                    Object target,
                                                    String type,
                                                    boolean allowDuplicates)

getPersistentState

public <R extends org.neo4j.graphdb.PropertyContainer> R getPersistentState(Object entity,
                                                                            Class<R> type)

removeRelationshipTo

public RelationshipResult removeRelationshipTo(Object source,
                                               Object target,
                                               String relationshipType)

getRelationshipBetween

public org.neo4j.graphdb.Relationship getRelationshipBetween(Object source,
                                                             Object target,
                                                             String type)

equals

public final boolean equals(Object first,
                            Object second)

hashCode

public final int hashCode(Object entity)
Returns:
result of the hashCode of the underlying node (if any, otherwise identityHashCode)

getRelationshipsBetween

public Iterable<org.neo4j.graphdb.Relationship> getRelationshipsBetween(Object source,
                                                                        Object target,
                                                                        String type)

Spring Data Neo4j

Copyright © 2013 SpringSource. All Rights Reserved.