T - GraphBacked target of this finder, enables the finder methods to return this concrete typeS - Type of backing state, either Node or Relationship@Transactional(readOnly=true) public abstract class AbstractGraphRepository<S extends org.neo4j.graphdb.PropertyContainer,T> extends Object implements GraphRepository<T>, NamedIndexRepository<T>, SpatialRepository<T>, CypherDslRepository<T>
TypeRepresentationStrategy
and indexing.| Modifier and Type | Field and Description |
|---|---|
protected Class<T> |
clazz
Target graphbacked type
|
static org.neo4j.helpers.collection.ClosableIterable |
EMPTY_CLOSABLE_ITERABLE |
protected Neo4jTemplate |
template |
| Constructor and Description |
|---|
AbstractGraphRepository(Neo4jTemplate template,
Class<T> clazz) |
| Modifier and Type | Method and Description |
|---|---|
long |
count() |
protected T |
createEntity(S node) |
void |
delete(Iterable<? extends T> entities) |
void |
delete(Long id) |
void |
delete(T entity) |
void |
deleteAll() |
boolean |
exists(Long id) |
Result<T> |
findAll()
uses the configured TypeRepresentationStrategy to load all entities, might return a large result
|
Iterable<T> |
findAll(Iterable<Long> ids) |
Page<T> |
findAll(Pageable pageable) |
Result<T> |
findAll(Sort sort)
finder that takes the provided sorting into account
NOTE: the sorting is not yet implemented
|
Result<T> |
findAllByPropertyValue(String property,
Object value)
Index based exact finder, uses the default index name for this type (short class name).
|
Result<T> |
findAllByPropertyValue(String indexName,
String property,
Object value)
Deprecated.
|
Result<T> |
findAllByQuery(String key,
Object query)
Deprecated.
|
Result<T> |
findAllByQuery(String indexName,
String property,
Object query)
Deprecated.
|
Result<T> |
findAllByRange(String property,
Number from,
Number to)
Deprecated.
|
Result<T> |
findAllByRange(String indexName,
String property,
Number from,
Number to)
Deprecated.
|
Result<T> |
findAllBySchemaPropertyValue(String property,
Object value)
Schema (aka Label based) finder, uses the default label name for this type
to lookup entities.
|
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)
Deprecated.
|
T |
findBySchemaPropertyValue(String property,
Object value)
Schema (aka Label based) Index based single finder which uses the default label
name for this type to find the entity.
|
T |
findOne(Long id) |
Result<T> |
findWithinBoundingBox(String indexName,
Box box) |
Result<T> |
findWithinBoundingBox(String indexName,
double lowerLeftLat,
double lowerLeftLon,
double upperRightLat,
double upperRightLon) |
Result<T> |
findWithinDistance(String indexName,
Circle circle) |
Result<T> |
findWithinDistance(String indexName,
double lat,
double lon,
double distanceKm) |
Result<T> |
findWithinShape(String indexName,
Shape shape)
Converts the shape into a well-known text representation and executes the appropriate WKT query
|
Result<T> |
findWithinWellKnownText(String indexName,
String wellKnownText) |
protected abstract S |
getById(long id) |
Class |
getStoredJavaType(Object entity) |
Page<T> |
query(org.neo4j.cypherdsl.grammar.Execute query,
org.neo4j.cypherdsl.grammar.Execute countQuery,
Map<String,Object> params,
Pageable page) |
Result<T> |
query(org.neo4j.cypherdsl.grammar.Execute query,
Map<String,Object> params) |
Page<T> |
query(org.neo4j.cypherdsl.grammar.Execute query,
Map<String,Object> params,
Pageable page) |
Result<T> |
query(String query,
Map<String,Object> params) |
<U extends T> |
save(Iterable<U> entities) |
<U extends T> |
save(U entity) |
<U extends T> |
saveOnly(U entity) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindAllByTraversalpublic static final org.neo4j.helpers.collection.ClosableIterable EMPTY_CLOSABLE_ITERABLE
protected final Neo4jTemplate template
public AbstractGraphRepository(Neo4jTemplate template, Class<T> clazz)
@Transactional public <U extends T> U save(U entity)
save in interface CrudRepository<T,Long>@Transactional public <U extends T> void saveOnly(U entity)
saveOnly in interface CRUDRepository<T>@Transactional public <U extends T> Iterable<U> save(Iterable<U> entities)
save in interface CrudRepository<T,Long>public long count()
count in interface CrudRepository<T,Long>public Result<T> findAll()
CRUDRepositoryfindAll in interface CRUDRepository<T>findAll in interface CrudRepository<T,Long>public T findOne(Long id)
findOne in interface CrudRepository<T,Long>id - idpublic T findByPropertyValue(String property, Object value)
findByPropertyValue in interface IndexRepository<T>property - value - @Deprecated public T findByPropertyValue(String indexName, String property, Object value)
findByPropertyValue in interface NamedIndexRepository<T>indexName - or null for defaultproperty - value - @Deprecated public Result<T> findAllByPropertyValue(String indexName, String property, Object value)
findAllByPropertyValue in interface NamedIndexRepository<T>indexName - or null for default indexproperty - value - public Result<T> findAllByPropertyValue(String property, Object value)
findAllByPropertyValue in interface IndexRepository<T>property - value - @Deprecated public Result<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@Deprecated public Result<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@Deprecated public Result<T> findAllByRange(String property, Number from, Number to)
findAllByRange in interface IndexRepository<T>@Deprecated public Result<T> findAllByRange(String indexName, String property, Number from, Number to)
findAllByRange in interface NamedIndexRepository<T>public T findBySchemaPropertyValue(String property, Object value)
findBySchemaPropertyValue in interface SchemaIndexRepository<T>property - value - public Result<T> findAllBySchemaPropertyValue(String property, Object value)
findAllBySchemaPropertyValue in interface SchemaIndexRepository<T>property - value - protected abstract S getById(long id)
public boolean exists(Long id)
exists in interface CrudRepository<T,Long>public Class getStoredJavaType(Object entity)
getStoredJavaType in interface CRUDRepository<T>@Transactional public void delete(T entity)
delete in interface CrudRepository<T,Long>@Transactional public void delete(Long id)
delete in interface CrudRepository<T,Long>@Transactional public void delete(Iterable<? extends T> entities)
delete in interface CrudRepository<T,Long>@Transactional public void deleteAll()
deleteAll in interface CrudRepository<T,Long>public Result<T> findAll(Sort sort)
CRUDRepositoryfindAll in interface CRUDRepository<T>findAll in interface PagingAndSortingRepository<T,Long>public Result<T> query(String query, Map<String,Object> params)
query in interface CRUDRepository<T>public Page<T> findAll(Pageable pageable)
findAll in interface PagingAndSortingRepository<T,Long>public Iterable<T> findAll(Iterable<Long> ids)
findAll in interface CrudRepository<T,Long>public Page<T> query(org.neo4j.cypherdsl.grammar.Execute query, org.neo4j.cypherdsl.grammar.Execute countQuery, Map<String,Object> params, Pageable page)
query in interface CypherDslRepository<T>public Page<T> query(org.neo4j.cypherdsl.grammar.Execute query, Map<String,Object> params, Pageable page)
query in interface CypherDslRepository<T>public Result<T> query(org.neo4j.cypherdsl.grammar.Execute query, Map<String,Object> params)
query in interface CypherDslRepository<T>public Result<T> findWithinWellKnownText(String indexName, String wellKnownText)
findWithinWellKnownText in interface SpatialRepository<T>public Result<T> findWithinDistance(String indexName, double lat, double lon, double distanceKm)
findWithinDistance in interface SpatialRepository<T>public Result<T> findWithinBoundingBox(String indexName, double lowerLeftLat, double lowerLeftLon, double upperRightLat, double upperRightLon)
findWithinBoundingBox in interface SpatialRepository<T>public Result<T> findWithinBoundingBox(String indexName, Box box)
findWithinBoundingBox in interface SpatialRepository<T>public Result<T> findWithinDistance(String indexName, Circle circle)
findWithinDistance in interface SpatialRepository<T>public Result<T> findWithinShape(String indexName, Shape shape)
SpatialRepositoryfindWithinShape in interface SpatialRepository<T>Copyright © 2011-2015–2015 Pivotal Software, Inc.. All rights reserved.