public class SimpleNosqlRepository<T,ID extends Serializable> extends Object implements NosqlRepository<T,ID>
| Constructor and Description |
|---|
SimpleNosqlRepository(NosqlEntityInformation<T,ID> entityInformation,
org.springframework.context.ApplicationContext applicationContext) |
SimpleNosqlRepository(NosqlEntityInformation<T,ID> metadata,
NosqlOperations dbOperations) |
| Modifier and Type | Method and Description |
|---|---|
long |
count()
Return count of rows in the table.
|
void |
delete(T entity)
Delete one row for entity.
|
void |
deleteAll()
Delete all rows from table.
|
void |
deleteAll(Iterable<? extends T> entities)
Delete list of entities from table.
|
void |
deleteById(ID id)
Delete one row for id.
|
boolean |
existsById(ID primaryKey)
Check if an entity exists per id.
|
Iterable<T> |
findAll()
Find all entities from the table.
|
org.springframework.data.domain.Page<T> |
findAll(org.springframework.data.domain.Pageable pageable)
Returns a Page of entities meeting the paging restriction provided in the Pageable object.
|
Iterable<T> |
findAll(org.springframework.data.domain.Sort sort)
Returns all entities sorted by the given options.
|
Iterable<T> |
findAllById(Iterable<ID> ids)
Find entities based on id list.
|
Optional<T> |
findById(ID id)
Find entity by its id.
|
String |
getConsistency()
Returns the configured read request consistency value.
|
int |
getTimeout()
Returns the configured request timeout value, in milliseconds, or 0 if
it has not been set.
|
<S extends T> |
save(S entity)
Save entity.
|
<S extends T> |
saveAll(Iterable<S> entities)
Batch save entities.
|
void |
setConsistency(String consistency)
Sets the read request consistency value.
|
void |
setTimeout(int milliseconds)
Sets the request timeout value, in milliseconds.
|
public SimpleNosqlRepository(NosqlEntityInformation<T,ID> entityInformation, org.springframework.context.ApplicationContext applicationContext)
public SimpleNosqlRepository(NosqlEntityInformation<T,ID> metadata, NosqlOperations dbOperations)
public <S extends T> S save(S entity)
save in interface NosqlRepository<T,ID extends Serializable>save in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>public <S extends T> Iterable<S> saveAll(Iterable<S> entities)
saveAll in interface NosqlRepository<T,ID extends Serializable>saveAll in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>public Iterable<T> findAll()
findAll in interface NosqlRepository<T,ID extends Serializable>findAll in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>public Iterable<T> findAllById(Iterable<ID> ids)
findAllById in interface NosqlRepository<T,ID extends Serializable>findAllById in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>public Optional<T> findById(ID id)
findById in interface NosqlRepository<T,ID extends Serializable>findById in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>public long count()
count in interface NosqlRepository<T,ID extends Serializable>count in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>public void deleteById(ID id)
deleteById in interface NosqlRepository<T,ID extends Serializable>deleteById in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>public void delete(T entity)
delete in interface NosqlRepository<T,ID extends Serializable>delete in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>public void deleteAll()
deleteAll in interface NosqlRepository<T,ID extends Serializable>deleteAll in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>public void deleteAll(Iterable<? extends T> entities)
deleteAll in interface NosqlRepository<T,ID extends Serializable>deleteAll in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>public boolean existsById(ID primaryKey)
existsById in interface NosqlRepository<T,ID extends Serializable>existsById in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>public Iterable<T> findAll(org.springframework.data.domain.Sort sort)
findAll in interface NosqlRepository<T,ID extends Serializable>findAll in interface org.springframework.data.repository.PagingAndSortingRepository<T,ID extends Serializable>public org.springframework.data.domain.Page<T> findAll(org.springframework.data.domain.Pageable pageable)
findAll in interface NosqlRepository<T,ID extends Serializable>findAll in interface org.springframework.data.repository.PagingAndSortingRepository<T,ID extends Serializable>public int getTimeout()
NosqlRepositorygetTimeout in interface NosqlRepository<T,ID extends Serializable>NosqlRepository.getTimeout()public void setTimeout(int milliseconds)
NosqlRepositoryNosqlTable.timeout().setTimeout in interface NosqlRepository<T,ID extends Serializable>NosqlRepository.setTimeout(int)public String getConsistency()
NosqlRepositorygetConsistency in interface NosqlRepository<T,ID extends Serializable>NosqlRepository.getConsistency()public void setConsistency(String consistency)
NosqlRepositoryConsistency values.
This set takes precedence over the one set when using
NosqlTable.consistency().setConsistency in interface NosqlRepository<T,ID extends Serializable>NosqlRepository.setConsistency(String)Copyright © 2021 Oracle Corporation. All rights reserved.