Class SimpleNosqlRepository<T,ID extends Serializable>
java.lang.Object
com.oracle.nosql.spring.data.repository.support.SimpleNosqlRepository<T,ID>
- All Implemented Interfaces:
NosqlRepository<T,,ID> org.springframework.data.repository.CrudRepository<T,,ID> org.springframework.data.repository.PagingAndSortingRepository<T,,ID> org.springframework.data.repository.Repository<T,ID>
public class SimpleNosqlRepository<T,ID extends Serializable>
extends Object
implements NosqlRepository<T,ID>
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleNosqlRepository(NosqlEntityInformation<T, ID> metadata, NosqlOperations dbOperations) SimpleNosqlRepository(NosqlEntityInformation<T, ID> entityInformation, org.springframework.context.ApplicationContext applicationContext) -
Method Summary
Modifier and TypeMethodDescriptionlongcount()Return count of rows in the table.voidDelete one row for entity.voidDelete all rows from table.voidDelete list of entities from table.voiddeleteAllById(Iterable<? extends ID> ids) voiddeleteById(ID id) Delete one row for id.booleanexistsById(ID primaryKey) Check if an entity exists per id.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.findAll(org.springframework.data.domain.Sort sort) Returns all entities sorted by the given options.findAllById(Iterable<ID> ids) Find entities based on id list.Find entity by its id.Returns the configured read request consistency value.Returns the configured request durability value.intReturns the configured request timeout value, in milliseconds, or 0 if it has not been set.<S extends T>
Ssave(S entity) Save entity.Batch save entities.voidsetConsistency(String consistency) Sets the read request consistency value.voidsetDurability(String durability) Sets the request durability value.voidsetTimeout(int milliseconds) Sets the request timeout value, in milliseconds.
-
Constructor Details
-
SimpleNosqlRepository
public SimpleNosqlRepository(NosqlEntityInformation<T, ID> entityInformation, org.springframework.context.ApplicationContext applicationContext) -
SimpleNosqlRepository
-
-
Method Details
-
save
Save entity.- Specified by:
savein interfaceorg.springframework.data.repository.CrudRepository<T,ID extends Serializable> - Specified by:
savein interfaceNosqlRepository<T,ID extends Serializable>
-
saveAll
Batch save entities.- Specified by:
saveAllin interfaceorg.springframework.data.repository.CrudRepository<T,ID extends Serializable> - Specified by:
saveAllin interfaceNosqlRepository<T,ID extends Serializable>
-
findAll
Find all entities from the table.- Specified by:
findAllin interfaceorg.springframework.data.repository.CrudRepository<T,ID extends Serializable> - Specified by:
findAllin interfaceNosqlRepository<T,ID extends Serializable>
-
findAllById
Find entities based on id list.- Specified by:
findAllByIdin interfaceorg.springframework.data.repository.CrudRepository<T,ID extends Serializable> - Specified by:
findAllByIdin interfaceNosqlRepository<T,ID extends Serializable>
-
findById
Find entity by its id.- Specified by:
findByIdin interfaceorg.springframework.data.repository.CrudRepository<T,ID extends Serializable> - Specified by:
findByIdin interfaceNosqlRepository<T,ID extends Serializable>
-
count
public long count()Return count of rows in the table.- Specified by:
countin interfaceorg.springframework.data.repository.CrudRepository<T,ID extends Serializable> - Specified by:
countin interfaceNosqlRepository<T,ID extends Serializable>
-
deleteById
Delete one row for id.- Specified by:
deleteByIdin interfaceorg.springframework.data.repository.CrudRepository<T,ID extends Serializable> - Specified by:
deleteByIdin interfaceNosqlRepository<T,ID extends Serializable>
-
delete
Delete one row for entity.- Specified by:
deletein interfaceorg.springframework.data.repository.CrudRepository<T,ID extends Serializable> - Specified by:
deletein interfaceNosqlRepository<T,ID extends Serializable>
-
deleteAllById
- Specified by:
deleteAllByIdin interfaceorg.springframework.data.repository.CrudRepository<T,ID extends Serializable>
-
deleteAll
public void deleteAll()Delete all rows from table.- Specified by:
deleteAllin interfaceorg.springframework.data.repository.CrudRepository<T,ID extends Serializable> - Specified by:
deleteAllin interfaceNosqlRepository<T,ID extends Serializable>
-
deleteAll
Delete list of entities from table.- Specified by:
deleteAllin interfaceorg.springframework.data.repository.CrudRepository<T,ID extends Serializable> - Specified by:
deleteAllin interfaceNosqlRepository<T,ID extends Serializable>
-
existsById
Check if an entity exists per id.- Specified by:
existsByIdin interfaceorg.springframework.data.repository.CrudRepository<T,ID extends Serializable> - Specified by:
existsByIdin interfaceNosqlRepository<T,ID extends Serializable>
-
findAll
Returns all entities sorted by the given options.- Specified by:
findAllin interfaceNosqlRepository<T,ID extends Serializable> - Specified by:
findAllin interfaceorg.springframework.data.repository.PagingAndSortingRepository<T,ID extends Serializable>
-
findAll
public 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.- Specified by:
findAllin interfaceNosqlRepository<T,ID extends Serializable> - Specified by:
findAllin interfaceorg.springframework.data.repository.PagingAndSortingRepository<T,ID extends Serializable>
-
getTimeout
public int getTimeout()Description copied from interface:NosqlRepositoryReturns the configured request timeout value, in milliseconds, or 0 if it has not been set.- Specified by:
getTimeoutin interfaceNosqlRepository<T,ID extends Serializable> - See Also:
-
setTimeout
public void setTimeout(int milliseconds) Description copied from interface:NosqlRepositorySets the request timeout value, in milliseconds. This overrides any default value set in NoSQLHandleConfig. The value must be positive. This set takes precedence over the one set when usingNosqlTable.timeout().- Specified by:
setTimeoutin interfaceNosqlRepository<T,ID extends Serializable> - See Also:
-
getConsistency
Description copied from interface:NosqlRepositoryReturns the configured read request consistency value.- Specified by:
getConsistencyin interfaceNosqlRepository<T,ID extends Serializable> - See Also:
-
setConsistency
Description copied from interface:NosqlRepositorySets the read request consistency value. The value must be one ofConsistencyvalues. This set takes precedence over the one set when usingNosqlTable.consistency().- Specified by:
setConsistencyin interfaceNosqlRepository<T,ID extends Serializable> - See Also:
-
getDurability
Description copied from interface:NosqlRepositoryReturns the configured request durability value.- Specified by:
getDurabilityin interfaceNosqlRepository<T,ID extends Serializable> - See Also:
-
setDurability
Description copied from interface:NosqlRepositorySets the request durability value. The value must be one of the defined Durability values:Durability.COMMIT_NO_SYNC,Durability.COMMIT_WRITE_NO_SYNCorDurability.COMMIT_SYNC.This set takes precedence over the one set when using
NosqlTable.durability().If null or invalid value is provided durability will be set to
Durability.COMMIT_NO_SYNCNote: This applies to On-Prem installations only.
- Specified by:
setDurabilityin interfaceNosqlRepository<T,ID extends Serializable> - See Also:
-