Class SimpleDynamoDBCrudRepository<T,ID>
- java.lang.Object
-
- org.socialsignin.spring.data.dynamodb.repository.support.SimpleDynamoDBCrudRepository<T,ID>
-
- Type Parameters:
T- the type of the entity to handleID- the type of the entity's identifier
- All Implemented Interfaces:
DynamoDBCrudRepository<T,ID>,ExceptionHandler,SortHandler,org.springframework.data.repository.CrudRepository<T,ID>,org.springframework.data.repository.Repository<T,ID>
- Direct Known Subclasses:
SimpleDynamoDBPagingAndSortingRepository
public class SimpleDynamoDBCrudRepository<T,ID> extends java.lang.Object implements DynamoDBCrudRepository<T,ID>, SortHandler, ExceptionHandler
Default implementation of theCrudRepositoryinterface.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<T>domainTypeprotected DynamoDBOperationsdynamoDBOperationsprotected EnableScanPermissionsenableScanPermissionsprotected DynamoDBEntityInformation<T,ID>entityInformation
-
Constructor Summary
Constructors Constructor Description SimpleDynamoDBCrudRepository(DynamoDBEntityInformation<T,ID> entityInformation, DynamoDBOperations dynamoDBOperations, EnableScanPermissions enableScanPermissions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcount()voiddelete(T entity)voiddeleteAll()voiddeleteAll(java.lang.Iterable<? extends T> entities)voiddeleteById(ID id)booleanexistsById(ID id)java.util.List<T>findAll()java.util.List<T>findAllById(java.lang.Iterable<ID> ids)java.util.Optional<T>findById(ID id)DynamoDBEntityInformation<T,ID>getEntityInformation()<S extends T>
Ssave(S entity)<S extends T>
java.lang.Iterable<S>saveAll(java.lang.Iterable<S> entities)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.socialsignin.spring.data.dynamodb.utils.ExceptionHandler
repackageToException
-
Methods inherited from interface org.socialsignin.spring.data.dynamodb.utils.SortHandler
ensureNoSort, ensureNoSort, throwUnsupportedSortOperationException
-
-
-
-
Field Detail
-
entityInformation
protected DynamoDBEntityInformation<T,ID> entityInformation
-
domainType
protected java.lang.Class<T> domainType
-
enableScanPermissions
protected EnableScanPermissions enableScanPermissions
-
dynamoDBOperations
protected DynamoDBOperations dynamoDBOperations
-
-
Constructor Detail
-
SimpleDynamoDBCrudRepository
public SimpleDynamoDBCrudRepository(DynamoDBEntityInformation<T,ID> entityInformation, DynamoDBOperations dynamoDBOperations, EnableScanPermissions enableScanPermissions)
-
-
Method Detail
-
save
public <S extends T> S save(S entity)
-
saveAll
public <S extends T> java.lang.Iterable<S> saveAll(java.lang.Iterable<S> entities) throws BatchWriteException, java.lang.IllegalArgumentException
- Specified by:
saveAllin interfaceorg.springframework.data.repository.CrudRepository<T,ID>- Throws:
BatchWriteException- in case of an error during savingjava.lang.IllegalArgumentException
-
existsById
public boolean existsById(ID id)
-
findAll
public java.util.List<T> findAll()
-
count
public long count()
-
deleteById
public void deleteById(ID id)
-
delete
public void delete(T entity)
-
deleteAll
public void deleteAll(java.lang.Iterable<? extends T> entities)
-
deleteAll
public void deleteAll()
-
getEntityInformation
@NonNull public DynamoDBEntityInformation<T,ID> getEntityInformation()
-
-