|
Spring Data Graph | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.neo4j.repository.AbstractGraphRepository<S,T>
T - GraphBacked target of this finder, enables the finder methods to return this concrete typeS - Type of backing state, either Node or Relationship@Repository public abstract class AbstractGraphRepository<S extends org.neo4j.graphdb.PropertyContainer,T extends GraphBacked<S>>
Repository like finder for Node and Relationship-Entities. Provides finder methods for direct access, access via TypeRepresentationStrategy
and indexing.
| Field Summary | |
|---|---|
protected Class<T> |
clazz
Target graphbacked type |
static org.neo4j.helpers.collection.ClosableIterable |
EMPTY_CLOSABLE_ITERABLE
|
protected GraphDatabaseContext |
graphDatabaseContext
|
| Constructor Summary | |
|---|---|
AbstractGraphRepository(GraphDatabaseContext graphDatabaseContext,
Class<T> clazz)
|
|
| Method Summary | ||
|---|---|---|
long |
count()
uses the configured TypeRepresentationStrategy, depending on the strategy this number might be an approximation |
|
protected T |
createEntity(S node)
|
|
protected
|
createInclusiveRangeQuery(String property,
Number from,
Number to)
|
|
void |
delete(Iterable<? extends T> entities)
deletes the given entities by calling their entity.remove() methods |
|
void |
delete(Long id)
|
|
void |
delete(T entity)
deletes the given entity by calling its entity.remove() method |
|
void |
deleteAll()
removes all entities of this type, use with care |
|
boolean |
exists(Long id)
|
|
org.neo4j.helpers.collection.ClosableIterable<T> |
findAll()
uses the configured TypeRepresentationStrategy to load all entities, might return a large result |
|
org.springframework.data.domain.Page<T> |
findAll(org.springframework.data.domain.Pageable pageable)
finder that takes the provided sorting and paging into account NOTE: the sorting is not yet implemented |
|
org.neo4j.helpers.collection.ClosableIterable<T> |
findAll(org.springframework.data.domain.Sort sort)
finder that takes the provided sorting into account NOTE: the sorting is not yet implemented |
|
org.neo4j.helpers.collection.ClosableIterable<T> |
findAllByPropertyValue(String property,
Object value)
Index based exact finder, uses the default index name for this type (short class name). |
|
org.neo4j.helpers.collection.ClosableIterable<T> |
findAllByPropertyValue(String indexName,
String property,
Object value)
Index based exact finder. |
|
org.neo4j.helpers.collection.ClosableIterable<T> |
findAllByQuery(String key,
Object query)
Index based fulltext / query object finder, uses the default index name for this type (short class name). |
|
org.neo4j.helpers.collection.ClosableIterable<T> |
findAllByQuery(String indexName,
String key,
Object query)
Index based fulltext / query object finder. |
|
org.neo4j.helpers.collection.ClosableIterable<T> |
findAllByRange(String property,
Number from,
Number to)
|
|
org.neo4j.helpers.collection.ClosableIterable<T> |
findAllByRange(String indexName,
String property,
Number from,
Number to)
|
|
T |
findByPropertyValue(String property,
Object value)
Index based single finder, uses the default index name for this type (short class name). |
|
T |
findByPropertyValue(String indexName,
String property,
Object value)
Index based single finder. |
|
T |
findOne(Long id)
|
|
protected abstract S |
getById(long id)
|
|
protected org.neo4j.graphdb.index.Index<S> |
getIndex(String indexName)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.springframework.data.neo4j.repository.CRUDRepository |
|---|
save, save |
| Methods inherited from interface org.springframework.data.neo4j.repository.TraversalRepository |
|---|
findAllByTraversal |
| Field Detail |
|---|
public static final org.neo4j.helpers.collection.ClosableIterable EMPTY_CLOSABLE_ITERABLE
protected final Class<T extends GraphBacked<S>> clazz
protected final GraphDatabaseContext graphDatabaseContext
| Constructor Detail |
|---|
public AbstractGraphRepository(GraphDatabaseContext graphDatabaseContext,
Class<T> clazz)
| Method Detail |
|---|
public long count()
CRUDRepository
count in interface CRUDRepository<T extends GraphBacked<S>>count in interface org.springframework.data.repository.CrudRepository<T extends GraphBacked<S>,Long>public org.neo4j.helpers.collection.ClosableIterable<T> findAll()
CRUDRepository
findAll in interface CRUDRepository<T extends GraphBacked<S>>findAll in interface org.springframework.data.repository.CrudRepository<T extends GraphBacked<S>,Long>public T findOne(Long id)
findOne in interface CRUDRepository<T extends GraphBacked<S>>findOne in interface org.springframework.data.repository.CrudRepository<T extends GraphBacked<S>,Long>id - id
public T findByPropertyValue(String property,
Object value)
findByPropertyValue in interface IndexRepository<T extends GraphBacked<S>>property - value -
public T findByPropertyValue(String indexName,
String property,
Object value)
findByPropertyValue in interface NamedIndexRepository<T extends GraphBacked<S>>indexName - or null for defaultproperty - value -
protected org.neo4j.graphdb.index.Index<S> getIndex(String indexName)
protected T createEntity(S node)
public org.neo4j.helpers.collection.ClosableIterable<T> findAllByPropertyValue(String indexName,
String property,
Object value)
findAllByPropertyValue in interface NamedIndexRepository<T extends GraphBacked<S>>indexName - or null for default indexproperty - value -
public org.neo4j.helpers.collection.ClosableIterable<T> findAllByPropertyValue(String property,
Object value)
findAllByPropertyValue in interface IndexRepository<T extends GraphBacked<S>>property - value -
public org.neo4j.helpers.collection.ClosableIterable<T> findAllByQuery(String key,
Object query)
findAllByQuery in interface IndexRepository<T extends GraphBacked<S>>key - key of the field to queryquery - lucene query object or query-string @return Iterable over Entities with this property and value
public org.neo4j.helpers.collection.ClosableIterable<T> findAllByQuery(String indexName,
String key,
Object query)
findAllByQuery in interface NamedIndexRepository<T extends GraphBacked<S>>indexName - or null for default indexkey - key of the field to queryquery - lucene query object or query-string @return Iterable over Entities with this property and value
public org.neo4j.helpers.collection.ClosableIterable<T> findAllByRange(String property,
Number from,
Number to)
findAllByRange in interface IndexRepository<T extends GraphBacked<S>>
public org.neo4j.helpers.collection.ClosableIterable<T> findAllByRange(String indexName,
String property,
Number from,
Number to)
findAllByRange in interface NamedIndexRepository<T extends GraphBacked<S>>
protected <T extends Number> org.apache.lucene.search.NumericRangeQuery<T> createInclusiveRangeQuery(String property,
Number from,
Number to)
protected abstract S getById(long id)
public boolean exists(Long id)
exists in interface CRUDRepository<T extends GraphBacked<S>>exists in interface org.springframework.data.repository.CrudRepository<T extends GraphBacked<S>,Long>public void delete(T entity)
CRUDRepository
delete in interface CRUDRepository<T extends GraphBacked<S>>delete in interface org.springframework.data.repository.CrudRepository<T extends GraphBacked<S>,Long>entity - to deletepublic void delete(Long id)
delete in interface org.springframework.data.repository.CrudRepository<T extends GraphBacked<S>,Long>public void delete(Iterable<? extends T> entities)
CRUDRepository
delete in interface CRUDRepository<T extends GraphBacked<S>>delete in interface org.springframework.data.repository.CrudRepository<T extends GraphBacked<S>,Long>entities - to deletepublic void deleteAll()
CRUDRepository
deleteAll in interface CRUDRepository<T extends GraphBacked<S>>deleteAll in interface org.springframework.data.repository.CrudRepository<T extends GraphBacked<S>,Long>public org.neo4j.helpers.collection.ClosableIterable<T> findAll(org.springframework.data.domain.Sort sort)
CRUDRepository
findAll in interface CRUDRepository<T extends GraphBacked<S>>findAll in interface org.springframework.data.repository.PagingAndSortingRepository<T extends GraphBacked<S>,Long>public org.springframework.data.domain.Page<T> findAll(org.springframework.data.domain.Pageable pageable)
CRUDRepository
findAll in interface CRUDRepository<T extends GraphBacked<S>>findAll in interface org.springframework.data.repository.PagingAndSortingRepository<T extends GraphBacked<S>,Long>
|
Spring Data Graph | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||