Spring Data Graph

org.springframework.data.graph.neo4j.fieldaccess
Class PartialNodeEntityState<ENTITY extends NodeBacked>

java.lang.Object
  extended by org.springframework.data.graph.neo4j.fieldaccess.DefaultEntityState<ENTITY,org.neo4j.graphdb.Node>
      extended by org.springframework.data.graph.neo4j.fieldaccess.PartialNodeEntityState<ENTITY>
All Implemented Interfaces:
EntityState<ENTITY,org.neo4j.graphdb.Node>

public class PartialNodeEntityState<ENTITY extends NodeBacked>
extends DefaultEntityState<ENTITY,org.neo4j.graphdb.Node>

Since:
21.09.2010
Author:
Michael Hunger

Field Summary
static String FOREIGN_ID
           
static String FOREIGN_ID_INDEX
           
 
Fields inherited from class org.springframework.data.graph.neo4j.fieldaccess.DefaultEntityState
entity, log, type
 
Constructor Summary
PartialNodeEntityState(org.neo4j.graphdb.Node underlyingState, ENTITY entity, Class<? extends ENTITY> type, GraphDatabaseContext graphDatabaseContext, FinderFactory finderFactory)
           
 
Method Summary
 void createAndAssignState()
          callback for creating and initializing an initial state TODO will be internal implementation detail of persist
static Object getId(Object entity, Class type)
           
 boolean isWritable(Field field)
           
 ENTITY persist()
           
 
Methods inherited from class org.springframework.data.graph.neo4j.fieldaccess.DefaultEntityState
accessorFor, getEntity, getIdFromEntity, getPersistentState, getValue, hasPersistentState, refersTo, setPersistentState, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FOREIGN_ID

public static final String FOREIGN_ID
See Also:
Constant Field Values

FOREIGN_ID_INDEX

public static final String FOREIGN_ID_INDEX
See Also:
Constant Field Values
Constructor Detail

PartialNodeEntityState

public PartialNodeEntityState(org.neo4j.graphdb.Node underlyingState,
                              ENTITY entity,
                              Class<? extends ENTITY> type,
                              GraphDatabaseContext graphDatabaseContext,
                              FinderFactory finderFactory)
Method Detail

createAndAssignState

public void createAndAssignState()
Description copied from interface: EntityState
callback for creating and initializing an initial state TODO will be internal implementation detail of persist

Specified by:
createAndAssignState in interface EntityState<ENTITY extends NodeBacked,org.neo4j.graphdb.Node>
Specified by:
createAndAssignState in class DefaultEntityState<ENTITY extends NodeBacked,org.neo4j.graphdb.Node>

persist

public ENTITY persist()

isWritable

public boolean isWritable(Field field)
Specified by:
isWritable in interface EntityState<ENTITY extends NodeBacked,org.neo4j.graphdb.Node>
Overrides:
isWritable in class DefaultEntityState<ENTITY extends NodeBacked,org.neo4j.graphdb.Node>
Returns:
true if the field can be written

getId

public static Object getId(Object entity,
                           Class type)

Spring Data Graph

Copyright © 2011. All Rights Reserved.