public abstract class AbstractIndexBasedTypeRepresentationStrategy<S extends org.neo4j.graphdb.PropertyContainer> extends Object implements TypeRepresentationStrategy<S>
Modifier and Type | Field and Description |
---|---|
protected GraphDatabase |
graphDb |
static String |
INDEX_KEY |
protected String |
INDEX_NAME |
protected IndexProvider |
indexProvider |
static String |
TYPE_PROPERTY_NAME |
Constructor and Description |
---|
AbstractIndexBasedTypeRepresentationStrategy(GraphDatabase graphDb,
IndexProvider indexProvider,
String indexName,
Class<? extends org.neo4j.graphdb.PropertyContainer> clazz) |
Modifier and Type | Method and Description |
---|---|
protected void |
addToTypesIndex(S element,
StoredEntityType type) |
long |
count(StoredEntityType type) |
<U> org.neo4j.helpers.collection.ClosableIterable<S> |
findAll(StoredEntityType type) |
boolean |
isLabelBased() |
static boolean |
isStrategyAlreadyInUse(GraphDatabase graphDatabaseService) |
void |
preEntityRemoval(S state)
Callback for cleaning up type information before removal.
|
Object |
readAliasFrom(S propertyContainer) |
void |
writeTypeTo(S state,
StoredEntityType type)
Callback for setting up and/or storing type information after creation.
|
public static final String TYPE_PROPERTY_NAME
public static final String INDEX_KEY
protected String INDEX_NAME
protected final GraphDatabase graphDb
protected final IndexProvider indexProvider
public AbstractIndexBasedTypeRepresentationStrategy(GraphDatabase graphDb, IndexProvider indexProvider, String indexName, Class<? extends org.neo4j.graphdb.PropertyContainer> clazz)
public static boolean isStrategyAlreadyInUse(GraphDatabase graphDatabaseService)
public void writeTypeTo(S state, StoredEntityType type)
TypeRepresentationStrategy
writeTypeTo
in interface TypeRepresentationStrategy<S extends org.neo4j.graphdb.PropertyContainer>
state
- Backing state of entity being createdtype
- Type of entity being createdpublic long count(StoredEntityType type)
count
in interface TypeRepresentationStrategy<S extends org.neo4j.graphdb.PropertyContainer>
public void preEntityRemoval(S state)
TypeRepresentationStrategy
preEntityRemoval
in interface TypeRepresentationStrategy<S extends org.neo4j.graphdb.PropertyContainer>
state
- Backing state of entity being removedpublic boolean isLabelBased()
isLabelBased
in interface TypeRepresentationStrategy<S extends org.neo4j.graphdb.PropertyContainer>
public <U> org.neo4j.helpers.collection.ClosableIterable<S> findAll(StoredEntityType type)
findAll
in interface TypeRepresentationStrategy<S extends org.neo4j.graphdb.PropertyContainer>
public Object readAliasFrom(S propertyContainer)
readAliasFrom
in interface TypeRepresentationStrategy<S extends org.neo4j.graphdb.PropertyContainer>
protected void addToTypesIndex(S element, StoredEntityType type)
Copyright © 2011-2015–2015 Pivotal Software, Inc.. All rights reserved.