|
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 Relationship@Repository public 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)
|
|
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 property,
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.ReadableIndex<S> |
getIndex(String indexName,
String property)
|
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> clazz
protected final Neo4jTemplate template
Constructor Detail |
---|
public AbstractGraphRepository(Neo4jTemplate template, Class<T> clazz)
Method Detail |
---|
public long count()
CRUDRepository
count
in interface CRUDRepository<T>
count
in interface org.springframework.data.repository.CrudRepository<T,Long>
public org.neo4j.helpers.collection.ClosableIterable<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 org.neo4j.helpers.collection.ClosableIterable<T> findAllByPropertyValue(String indexName, String property, Object value)
findAllByPropertyValue
in interface NamedIndexRepository<T>
indexName
- or null for default indexproperty
- value
-
public org.neo4j.helpers.collection.ClosableIterable<T> findAllByPropertyValue(String property, Object value)
findAllByPropertyValue
in interface IndexRepository<T>
property
- value
-
public org.neo4j.helpers.collection.ClosableIterable<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 valuepublic org.neo4j.helpers.collection.ClosableIterable<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 valuepublic org.neo4j.helpers.collection.ClosableIterable<T> findAllByRange(String property, Number from, Number to)
findAllByRange
in interface IndexRepository<T>
public org.neo4j.helpers.collection.ClosableIterable<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 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 org.neo4j.helpers.collection.ClosableIterable<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>
|
Spring Data Neo4j | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |