|
Spring Data Neo4j | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TypeRepresentationStrategy<S extends org.neo4j.graphdb.PropertyContainer>
Strategy to handle representation of java types in the graph. Possible implementation are type/class nodes (forming an inheritance chain) that is linked to from the instance and keeps a count of the instances. Another approach could use indexing and a type property on the instance fields. Contains a callback on entity creation that can setup the type representation. The finder methods are delegated to for the appropriate calls for the strategy set for the datastore. TODO use SDC TypeMapper implementations to delegate to for concrete implementation
Method Summary | ||
---|---|---|
long |
count(StoredEntityType type)
|
|
|
findAll(StoredEntityType type)
|
|
void |
preEntityRemoval(S state)
Callback for cleaning up type information before removal. |
|
Object |
readAliasFrom(S state)
|
|
void |
writeTypeTo(S state,
StoredEntityType type)
Callback for setting up and/or storing type information after creation. |
Method Detail |
---|
void writeTypeTo(S state, StoredEntityType type)
state
- Backing state of entity being createdtype
- Type of entity being created<U> org.neo4j.helpers.collection.ClosableIterable<S> findAll(StoredEntityType type)
type@return
- lazy Iterable over all instances of the given typelong count(StoredEntityType type)
type@return
- number of instances of this class contained in the graphObject readAliasFrom(S state)
state
-
void preEntityRemoval(S state)
state
- Backing state of entity being removed
|
Spring Data Neo4j | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |