T
- the type of the entity to handle@Repository @Transactional(readOnly=true) public class SimpleNeo4jRepository<T,ID extends Serializable> extends Object implements Neo4jRepository<T,ID>
CrudRepository
interface. This will offer
you a more sophisticated interface than the plain Session
.Constructor and Description |
---|
SimpleNeo4jRepository(Class<T> domainClass,
org.neo4j.ogm.session.Session session)
Creates a new
SimpleNeo4jRepository to manage objects of the given domain type. |
Modifier and Type | Method and Description |
---|---|
long |
count() |
void |
delete(T t) |
void |
deleteAll() |
void |
deleteAll(Iterable<? extends T> ts) |
void |
deleteById(ID id) |
boolean |
existsById(ID id) |
Iterable<T> |
findAll() |
Iterable<T> |
findAll(int depth) |
Page<T> |
findAll(Pageable pageable)
Returns a
Page of entities meeting the paging restriction provided in the Pageable object. |
Page<T> |
findAll(Pageable pageable,
int depth)
Returns a
Page of entities meeting the paging restriction provided in the Pageable object. |
Iterable<T> |
findAll(Sort sort) |
Iterable<T> |
findAll(Sort sort,
int depth) |
Iterable<T> |
findAllById(Iterable<ID> longs) |
Iterable<T> |
findAllById(Iterable<ID> ids,
int depth) |
Iterable<T> |
findAllById(Iterable<ID> ids,
Sort sort) |
Iterable<T> |
findAllById(Iterable<ID> ids,
Sort sort,
int depth) |
Optional<T> |
findById(ID id) |
Optional<T> |
findById(ID id,
int depth) |
<S extends T> |
save(Iterable<S> ses,
int depth) |
<S extends T> |
save(S entity) |
<S extends T> |
save(S s,
int depth) |
<S extends T> |
saveAll(Iterable<S> entities) |
public SimpleNeo4jRepository(Class<T> domainClass, org.neo4j.ogm.session.Session session)
SimpleNeo4jRepository
to manage objects of the given domain type.domainClass
- must not be null.session
- must not be null.@Transactional public <S extends T> S save(S entity)
save
in interface CrudRepository<T,ID extends Serializable>
@Transactional public <S extends T> Iterable<S> saveAll(Iterable<S> entities)
saveAll
in interface CrudRepository<T,ID extends Serializable>
public Optional<T> findById(ID id)
findById
in interface CrudRepository<T,ID extends Serializable>
public boolean existsById(ID id)
existsById
in interface CrudRepository<T,ID extends Serializable>
public long count()
count
in interface CrudRepository<T,ID extends Serializable>
@Transactional public void deleteById(ID id)
deleteById
in interface CrudRepository<T,ID extends Serializable>
@Transactional public void delete(T t)
delete
in interface CrudRepository<T,ID extends Serializable>
@Transactional public void deleteAll(Iterable<? extends T> ts)
deleteAll
in interface CrudRepository<T,ID extends Serializable>
@Transactional public void deleteAll()
deleteAll
in interface CrudRepository<T,ID extends Serializable>
@Transactional public <S extends T> S save(S s, int depth)
save
in interface Neo4jRepository<T,ID extends Serializable>
@Transactional public <S extends T> Iterable<S> save(Iterable<S> ses, int depth)
save
in interface Neo4jRepository<T,ID extends Serializable>
public Optional<T> findById(ID id, int depth)
findById
in interface Neo4jRepository<T,ID extends Serializable>
public Iterable<T> findAll()
findAll
in interface Neo4jRepository<T,ID extends Serializable>
findAll
in interface CrudRepository<T,ID extends Serializable>
public Iterable<T> findAll(int depth)
findAll
in interface Neo4jRepository<T,ID extends Serializable>
public Iterable<T> findAllById(Iterable<ID> longs)
findAllById
in interface Neo4jRepository<T,ID extends Serializable>
findAllById
in interface CrudRepository<T,ID extends Serializable>
public Iterable<T> findAllById(Iterable<ID> ids, int depth)
findAllById
in interface Neo4jRepository<T,ID extends Serializable>
public Iterable<T> findAll(Sort sort)
findAll
in interface Neo4jRepository<T,ID extends Serializable>
findAll
in interface PagingAndSortingRepository<T,ID extends Serializable>
public Iterable<T> findAll(Sort sort, int depth)
findAll
in interface Neo4jRepository<T,ID extends Serializable>
public Iterable<T> findAllById(Iterable<ID> ids, Sort sort)
findAllById
in interface Neo4jRepository<T,ID extends Serializable>
public Iterable<T> findAllById(Iterable<ID> ids, Sort sort, int depth)
findAllById
in interface Neo4jRepository<T,ID extends Serializable>
public Page<T> findAll(Pageable pageable)
Neo4jRepository
Page
of entities meeting the paging restriction provided in the Pageable
object.
Page.getTotalPages()
returns an estimation of the total number of pages and should not be relied upon for accuracy.findAll
in interface Neo4jRepository<T,ID extends Serializable>
findAll
in interface PagingAndSortingRepository<T,ID extends Serializable>
public Page<T> findAll(Pageable pageable, int depth)
Neo4jRepository
Page
of entities meeting the paging restriction provided in the Pageable
object.
Page.getTotalPages()
returns an estimation of the total number of pages and should not be relied upon for accuracy.findAll
in interface Neo4jRepository<T,ID extends Serializable>
Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.