|
Spring Data Neo4j | |||||||||
| 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 Relationshippublic abstract class AbstractGraphRepository<S extends org.neo4j.graphdb.PropertyContainer,T>
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 Neo4jTemplate |
template
|
| Constructor Summary | |
|---|---|
AbstractGraphRepository(Neo4jTemplate template,
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)
|
|
EndResult<T> |
findAll()
uses the configured TypeRepresentationStrategy to load all entities, might return a large result |
|
Iterable<T> |
findAll(Iterable<Long> ids)
|
|
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 |
|
EndResult<T> |
findAll(org.springframework.data.domain.Sort sort)
finder that takes the provided sorting into account NOTE: the sorting is not yet implemented |
|
EndResult<T> |
findAllByPropertyValue(String property,
Object value)
Index based exact finder, uses the default index name for this type (short class name). |
|
EndResult<T> |
findAllByPropertyValue(String indexName,
String property,
Object value)
Index based exact finder. |
|
EndResult<T> |
findAllByQuery(String key,
Object query)
Index based fulltext / query object finder, uses the default index name for this type (short class name). |
|
EndResult<T> |
findAllByQuery(String indexName,
String property,
Object query)
Index based fulltext / query object finder. |
|
EndResult<T> |
findAllByRange(String property,
Number from,
Number to)
|
|
EndResult<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)
|
|
EndResult<T> |
findWithinBoundingBox(String indexName,
double lowerLeftLat,
double lowerLeftLon,
double upperRightLat,
double upperRightLon)
|
|
EndResult<T> |
findWithinDistance(String indexName,
double lat,
double lon,
double distanceKm)
|
|
EndResult<T> |
findWithinWellKnownText(String indexName,
String wellKnownText)
|
|
protected abstract S |
getById(long id)
|
|
protected org.neo4j.graphdb.index.ReadableIndex<S> |
getIndex(String indexName,
String property)
|
|
Class |
getStoredJavaType(Object entity)
|
|
EndResult<T> |
query(org.neo4j.cypherdsl.grammar.Execute query,
Map<String,Object> params)
|
|
org.springframework.data.domain.Page<T> |
query(org.neo4j.cypherdsl.grammar.Execute query,
Map<String,Object> params,
org.springframework.data.domain.Pageable page)
|
|
|
save(Iterable<U> entities)
persists the provided entities by forwarding to their entity.persist() methods |
|
|
save(U entity)
persists an entity by forwarding to entity.persist() |
|
| 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.TraversalRepository |
|---|
findAllByTraversal |
| Field Detail |
|---|
public static final org.neo4j.helpers.collection.ClosableIterable EMPTY_CLOSABLE_ITERABLE
protected final Class<T> clazz
protected final Neo4jTemplate template
| Constructor Detail |
|---|
public AbstractGraphRepository(Neo4jTemplate template,
Class<T> clazz)
| Method Detail |
|---|
public EndResult<T> findWithinWellKnownText(String indexName,
String wellKnownText)
findWithinWellKnownText in interface SpatialRepository<T>
public EndResult<T> findWithinDistance(String indexName,
double lat,
double lon,
double distanceKm)
findWithinDistance in interface SpatialRepository<T>
public EndResult<T> findWithinBoundingBox(String indexName,
double lowerLeftLat,
double lowerLeftLon,
double upperRightLat,
double upperRightLon)
findWithinBoundingBox in interface SpatialRepository<T>public <U extends T> U save(U entity)
CRUDRepository
save in interface CRUDRepository<T>save in interface org.springframework.data.repository.CrudRepository<T,Long>entity - to be persisted
public <U extends T> Iterable<U> save(Iterable<U> entities)
CRUDRepository
save in interface CRUDRepository<T>save in interface org.springframework.data.repository.CrudRepository<T,Long>entities - to be persisted
public long count()
CRUDRepository
count in interface CRUDRepository<T>count in interface org.springframework.data.repository.CrudRepository<T,Long>public EndResult<T> findAll()
CRUDRepository
findAll in interface CRUDRepository<T>findAll in interface org.springframework.data.repository.CrudRepository<T,Long>public T findOne(Long id)
findOne in interface CRUDRepository<T>findOne in interface org.springframework.data.repository.CrudRepository<T,Long>id - id
public T findByPropertyValue(String property,
Object value)
findByPropertyValue in interface IndexRepository<T>property - value -
public T findByPropertyValue(String indexName,
String property,
Object value)
findByPropertyValue in interface NamedIndexRepository<T>indexName - or null for defaultproperty - value -
protected org.neo4j.graphdb.index.ReadableIndex<S> getIndex(String indexName,
String property)
protected T createEntity(S node)
public EndResult<T> findAllByPropertyValue(String indexName,
String property,
Object value)
findAllByPropertyValue in interface NamedIndexRepository<T>indexName - or null for default indexproperty - value -
public EndResult<T> findAllByPropertyValue(String property,
Object value)
findAllByPropertyValue in interface IndexRepository<T>property - value -
public EndResult<T> findAllByQuery(String key,
Object query)
findAllByQuery in interface IndexRepository<T>key - key of the field to queryquery - lucene query object or query-string @return Iterable over Entities with this property and value
public EndResult<T> findAllByQuery(String indexName,
String property,
Object query)
findAllByQuery in interface NamedIndexRepository<T>indexName - or null for default indexproperty - property of the field to queryquery - lucene query object or query-string @return Iterable over Entities with this property and value
public EndResult<T> findAllByRange(String property,
Number from,
Number to)
findAllByRange in interface IndexRepository<T>
public EndResult<T> findAllByRange(String indexName,
String property,
Number from,
Number to)
findAllByRange in interface NamedIndexRepository<T>
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>exists in interface org.springframework.data.repository.CrudRepository<T,Long>public Class getStoredJavaType(Object entity)
getStoredJavaType in interface CRUDRepository<T>public void delete(T entity)
CRUDRepository
delete in interface CRUDRepository<T>delete in interface org.springframework.data.repository.CrudRepository<T,Long>entity - to deletepublic void delete(Long id)
delete in interface org.springframework.data.repository.CrudRepository<T,Long>public void delete(Iterable<? extends T> entities)
CRUDRepository
delete in interface CRUDRepository<T>delete in interface org.springframework.data.repository.CrudRepository<T,Long>entities - to deletepublic void deleteAll()
CRUDRepository
deleteAll in interface CRUDRepository<T>deleteAll in interface org.springframework.data.repository.CrudRepository<T,Long>public EndResult<T> findAll(org.springframework.data.domain.Sort sort)
CRUDRepository
findAll in interface CRUDRepository<T>findAll in interface org.springframework.data.repository.PagingAndSortingRepository<T,Long>public org.springframework.data.domain.Page<T> findAll(org.springframework.data.domain.Pageable pageable)
CRUDRepository
findAll in interface CRUDRepository<T>findAll in interface org.springframework.data.repository.PagingAndSortingRepository<T,Long>public Iterable<T> findAll(Iterable<Long> ids)
findAll in interface org.springframework.data.repository.CrudRepository<T,Long>
public org.springframework.data.domain.Page<T> query(org.neo4j.cypherdsl.grammar.Execute query,
Map<String,Object> params,
org.springframework.data.domain.Pageable page)
query in interface CypherDslRepository<T>
public EndResult<T> query(org.neo4j.cypherdsl.grammar.Execute query,
Map<String,Object> params)
query in interface CypherDslRepository<T>
|
Spring Data Neo4j | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||