org.springframework.data.neo4j.support.typerepresentation
Class AbstractIndexingTypeRepresentationStrategy<S extends org.neo4j.graphdb.PropertyContainer>
java.lang.Object
org.springframework.data.neo4j.support.typerepresentation.AbstractIndexingTypeRepresentationStrategy<S>
- All Implemented Interfaces:
- TypeRepresentationStrategy<S>
- Direct Known Subclasses:
- IndexingNodeTypeRepresentationStrategy, IndexingRelationshipTypeRepresentationStrategy
public abstract class AbstractIndexingTypeRepresentationStrategy<S extends org.neo4j.graphdb.PropertyContainer>
- extends Object
- implements TypeRepresentationStrategy<S>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TYPE_PROPERTY_NAME
public static final String TYPE_PROPERTY_NAME
- See Also:
- Constant Field Values
INDEX_KEY
public static final String INDEX_KEY
- See Also:
- Constant Field Values
INDEX_NAME
protected String INDEX_NAME
graphDb
protected final GraphDatabase graphDb
indexProvider
protected final IndexProvider indexProvider
AbstractIndexingTypeRepresentationStrategy
public AbstractIndexingTypeRepresentationStrategy(GraphDatabase graphDb,
IndexProvider indexProvider,
String indexName,
Class<? extends org.neo4j.graphdb.PropertyContainer> clazz)
getTypesIndex
public org.neo4j.graphdb.index.Index<S> getTypesIndex()
writeTypeTo
public void writeTypeTo(S state,
StoredEntityType type)
- Description copied from interface:
TypeRepresentationStrategy
- Callback for setting up and/or storing type information after creation.
- Specified by:
writeTypeTo
in interface TypeRepresentationStrategy<S extends org.neo4j.graphdb.PropertyContainer>
- Parameters:
state
- Backing state of entity being createdtype
- Type of entity being created
count
public long count(StoredEntityType type)
- Specified by:
count
in interface TypeRepresentationStrategy<S extends org.neo4j.graphdb.PropertyContainer>
preEntityRemoval
public void preEntityRemoval(S state)
- Description copied from interface:
TypeRepresentationStrategy
- Callback for cleaning up type information before removal. If state does not have any
state associated, doesn't do anything.
- Specified by:
preEntityRemoval
in interface TypeRepresentationStrategy<S extends org.neo4j.graphdb.PropertyContainer>
- Parameters:
state
- Backing state of entity being removed
findAll
public <U> org.neo4j.helpers.collection.ClosableIterable<S> findAll(StoredEntityType type)
- Specified by:
findAll
in interface TypeRepresentationStrategy<S extends org.neo4j.graphdb.PropertyContainer>
readAliasFrom
public Object readAliasFrom(S propertyContainer)
- Specified by:
readAliasFrom
in interface TypeRepresentationStrategy<S extends org.neo4j.graphdb.PropertyContainer>
- Returns:
- java type that of the node entity of this node
addToTypesIndex
protected void addToTypesIndex(S element,
StoredEntityType type)
Copyright © 2012 SpringSource. All Rights Reserved.