Package org.leo.aws.ddb.repositories
Enum BaseRepositoryUtils
- java.lang.Object
-
- java.lang.Enum<BaseRepositoryUtils>
-
- org.leo.aws.ddb.repositories.BaseRepositoryUtils
-
- All Implemented Interfaces:
Serializable,Comparable<BaseRepositoryUtils>
enum BaseRepositoryUtils extends Enum<BaseRepositoryUtils>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.LoggerLOGGERprivate ConcurrentHashMap<String,Class<?>>repoParameterTypeMap
-
Constructor Summary
Constructors Modifier Constructor Description privateBaseRepositoryUtils()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description (package private) <ENTITY_TYPE>
reactor.core.publisher.Flux<ENTITY_TYPE>batchWrite(List<ENTITY_TYPE> putItems, List<ENTITY_TYPE> deleteItems, Supplier<Class<ENTITY_TYPE>> paramTypeFunc)(package private) <ENTITY_TYPE>
reactor.core.publisher.Flux<ENTITY_TYPE>batchWriteRequest(rx.functions.Func1<DataMapper<ENTITY_TYPE>,Stream<software.amazon.awssdk.services.dynamodb.model.WriteRequest>> dbRequestFunc, rx.functions.Func0<List<ENTITY_TYPE>> returnItemFunc, DataMapper<ENTITY_TYPE> dataMapper)(package private) <ENTITY_TYPE>
reactor.core.publisher.Mono<ENTITY_TYPE>deleteItem(ENTITY_TYPE item, Supplier<Class<ENTITY_TYPE>> paramTypeFunc)(package private) <ENTITY_TYPE>
reactor.core.publisher.Flux<ENTITY_TYPE>findAll(int pageSize, Supplier<Class<ENTITY_TYPE>> dataClassFunc)(package private) <ENTITY_TYPE>
reactor.core.publisher.Flux<ENTITY_TYPE>findAll(Expr expr, int pageSize, Supplier<Class<ENTITY_TYPE>> dataClassFunc)(package private) <ENTITY_TYPE>
reactor.core.publisher.Flux<ENTITY_TYPE>findByGlobalSecondaryIndex(String indexName, Object hashKeyValueObj, Object rangeKeyValue, Function<ENTITY_TYPE,PrimaryKey> primaryKeyFunc, Supplier<Class<ENTITY_TYPE>> dataClassFunc, Function<List<PrimaryKey>,reactor.core.publisher.Flux<ENTITY_TYPE>> findByPrimaryKeyFunc, Expr filterExpression)(package private) <ENTITY_TYPE>
reactor.core.publisher.Flux<ENTITY_TYPE>findByHashKeyAndRangeKeyStartsWithPagination(String hashKey, Object hashKeyValueObj, String rangeKey, String rangeKeyValue, Page page, String indexName, Class<ENTITY_TYPE> dataClass, Expr expr)(package private) <ENTITY_TYPE>
reactor.core.publisher.Mono<ENTITY_TYPE>findByPrimaryKey(PrimaryKey primaryKey, Supplier<Class<ENTITY_TYPE>> dataClassFunc)(package private) <ENTITY_TYPE>
reactor.core.publisher.Flux<ENTITY_TYPE>findByPrimaryKeys(List<PrimaryKey> primaryKeys, Supplier<Class<ENTITY_TYPE>> dataClassFunc)(package private) <ENTITY_TYPE>
Tuple<ProjectionType,software.amazon.awssdk.services.dynamodb.paginators.QueryPublisher>getDataFromIndex(String indexName, String hashKeyValue, Object rangeKeyValue, Class<ENTITY_TYPE> dataClass, Expr filterExpressions)(package private) <ENTITY_TYPE>
Tuple<ProjectionType,software.amazon.awssdk.services.dynamodb.paginators.QueryPublisher>getDataFromIndex(String indexName, String hashKeyValue, Optional<?> rangeKeyValue, Class<ENTITY_TYPE> dataClass, Expr filterExpressions)Deprecated.(package private) static BaseRepositoryUtilsgetInstance()(package private) <ENTITY_TYPE>
Class<ENTITY_TYPE>getRepoParameterType(DynamoDbRepository<ENTITY_TYPE> baseRepository)(package private) <ENTITY_TYPE>
ENTITY_TYPEhandleCreateItemException(PrimaryKey primaryKey, String tableName, Throwable e)(package private) software.amazon.awssdk.services.dynamodb.model.UpdateItemResponsehandleUpdateItemException(PrimaryKey primaryKey, String tableName, Throwable e)(package private) <ENTITY_TYPE>
CompletableFuture<List<ENTITY_TYPE>>processBatchWriteRequest(rx.functions.Func0<List<ENTITY_TYPE>> returnItemFunc, Map<String,List<software.amazon.awssdk.services.dynamodb.model.WriteRequest>> requestItems)(package private) <ENTITY_TYPE>
CompletableFuture<ENTITY_TYPE>saveItem(ENTITY_TYPE item, boolean upsert, rx.functions.Action2<ENTITY_TYPE,Map<String,software.amazon.awssdk.services.dynamodb.model.AttributeValue>> ttlAction, DataMapper<ENTITY_TYPE> dataMapper)(package private) voidsetFilterExpression(Expr expr, software.amazon.awssdk.services.dynamodb.model.QueryRequest.Builder builder, Map<String,String> nameMap, Map<String,software.amazon.awssdk.services.dynamodb.model.AttributeValue> attributeValueMap)(package private) <ENTITY_TYPE>
IntegersetVersion(ENTITY_TYPE item, Tuple<Field,DbAttribute> versionedAttribute, software.amazon.awssdk.services.dynamodb.model.UpdateItemRequest.Builder updateItemRequestBuilder)(package private) <ENTITY_TYPE>
reactor.core.publisher.Mono<ENTITY_TYPE>updateItem(ENTITY_TYPE item, Function<ENTITY_TYPE,PrimaryKey> primaryKeyFunc, Supplier<Class<ENTITY_TYPE>> dataClassFunc)(package private) <ENTITY_TYPE>
reactor.core.publisher.Flux<ENTITY_TYPE>updateItem(List<UpdateItem> updateItems, Supplier<Class<ENTITY_TYPE>> paramTypeFunc, Function<List<PrimaryKey>,reactor.core.publisher.Flux<ENTITY_TYPE>> findByPrimaryKeysFunc)(package private) <ENTITY_TYPE>
reactor.core.publisher.Mono<ENTITY_TYPE>updateItem(PrimaryKey primaryKey, Map<String,Object> updatedValues, Class<ENTITY_TYPE> parameterType, DataMapper<ENTITY_TYPE> dataMapper, ENTITY_TYPE item)(package private) <ENTITY_TYPE>
reactor.core.publisher.Mono<ENTITY_TYPE>updateItem(PrimaryKey primaryKey, Map<String,Object> updatedValues, Function<PrimaryKey,reactor.core.publisher.Mono<ENTITY_TYPE>> findByPrimaryFunc, Supplier<Class<ENTITY_TYPE>> dataClassFunc)static BaseRepositoryUtilsvalueOf(String name)Returns the enum constant of this type with the specified name.static BaseRepositoryUtils[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final BaseRepositoryUtils INSTANCE
-
-
Field Detail
-
repoParameterTypeMap
private final ConcurrentHashMap<String,Class<?>> repoParameterTypeMap
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Method Detail
-
values
public static BaseRepositoryUtils[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (BaseRepositoryUtils c : BaseRepositoryUtils.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BaseRepositoryUtils valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getInstance
static BaseRepositoryUtils getInstance()
-
handleUpdateItemException
software.amazon.awssdk.services.dynamodb.model.UpdateItemResponse handleUpdateItemException(PrimaryKey primaryKey, String tableName, Throwable e)
-
setVersion
<ENTITY_TYPE> Integer setVersion(ENTITY_TYPE item, Tuple<Field,DbAttribute> versionedAttribute, software.amazon.awssdk.services.dynamodb.model.UpdateItemRequest.Builder updateItemRequestBuilder)
-
batchWriteRequest
<ENTITY_TYPE> reactor.core.publisher.Flux<ENTITY_TYPE> batchWriteRequest(rx.functions.Func1<DataMapper<ENTITY_TYPE>,Stream<software.amazon.awssdk.services.dynamodb.model.WriteRequest>> dbRequestFunc, rx.functions.Func0<List<ENTITY_TYPE>> returnItemFunc, DataMapper<ENTITY_TYPE> dataMapper)
- Parameters:
dbRequestFunc- Function to perform DB write actionsreturnItemFunc- Function that return items- Returns:
- Future
-
updateItem
<ENTITY_TYPE> reactor.core.publisher.Mono<ENTITY_TYPE> updateItem(PrimaryKey primaryKey, Map<String,Object> updatedValues, Class<ENTITY_TYPE> parameterType, DataMapper<ENTITY_TYPE> dataMapper, ENTITY_TYPE item)
-
findByGlobalSecondaryIndex
<ENTITY_TYPE> reactor.core.publisher.Flux<ENTITY_TYPE> findByGlobalSecondaryIndex(String indexName, Object hashKeyValueObj, Object rangeKeyValue, Function<ENTITY_TYPE,PrimaryKey> primaryKeyFunc, Supplier<Class<ENTITY_TYPE>> dataClassFunc, Function<List<PrimaryKey>,reactor.core.publisher.Flux<ENTITY_TYPE>> findByPrimaryKeyFunc, Expr filterExpression)
-
findAll
<ENTITY_TYPE> reactor.core.publisher.Flux<ENTITY_TYPE> findAll(int pageSize, Supplier<Class<ENTITY_TYPE>> dataClassFunc)
-
findAll
<ENTITY_TYPE> reactor.core.publisher.Flux<ENTITY_TYPE> findAll(Expr expr, int pageSize, Supplier<Class<ENTITY_TYPE>> dataClassFunc)
-
findByPrimaryKey
<ENTITY_TYPE> reactor.core.publisher.Mono<ENTITY_TYPE> findByPrimaryKey(PrimaryKey primaryKey, Supplier<Class<ENTITY_TYPE>> dataClassFunc)
-
findByPrimaryKeys
<ENTITY_TYPE> reactor.core.publisher.Flux<ENTITY_TYPE> findByPrimaryKeys(List<PrimaryKey> primaryKeys, Supplier<Class<ENTITY_TYPE>> dataClassFunc)
-
saveItem
<ENTITY_TYPE> CompletableFuture<ENTITY_TYPE> saveItem(ENTITY_TYPE item, boolean upsert, rx.functions.Action2<ENTITY_TYPE,Map<String,software.amazon.awssdk.services.dynamodb.model.AttributeValue>> ttlAction, DataMapper<ENTITY_TYPE> dataMapper)
-
handleCreateItemException
<ENTITY_TYPE> ENTITY_TYPE handleCreateItemException(PrimaryKey primaryKey, String tableName, Throwable e)
-
updateItem
<ENTITY_TYPE> reactor.core.publisher.Mono<ENTITY_TYPE> updateItem(ENTITY_TYPE item, Function<ENTITY_TYPE,PrimaryKey> primaryKeyFunc, Supplier<Class<ENTITY_TYPE>> dataClassFunc)
-
updateItem
<ENTITY_TYPE> reactor.core.publisher.Mono<ENTITY_TYPE> updateItem(PrimaryKey primaryKey, Map<String,Object> updatedValues, Function<PrimaryKey,reactor.core.publisher.Mono<ENTITY_TYPE>> findByPrimaryFunc, Supplier<Class<ENTITY_TYPE>> dataClassFunc)
-
updateItem
<ENTITY_TYPE> reactor.core.publisher.Flux<ENTITY_TYPE> updateItem(List<UpdateItem> updateItems, Supplier<Class<ENTITY_TYPE>> paramTypeFunc, Function<List<PrimaryKey>,reactor.core.publisher.Flux<ENTITY_TYPE>> findByPrimaryKeysFunc)
-
batchWrite
<ENTITY_TYPE> reactor.core.publisher.Flux<ENTITY_TYPE> batchWrite(List<ENTITY_TYPE> putItems, List<ENTITY_TYPE> deleteItems, Supplier<Class<ENTITY_TYPE>> paramTypeFunc)
-
processBatchWriteRequest
<ENTITY_TYPE> CompletableFuture<List<ENTITY_TYPE>> processBatchWriteRequest(rx.functions.Func0<List<ENTITY_TYPE>> returnItemFunc, Map<String,List<software.amazon.awssdk.services.dynamodb.model.WriteRequest>> requestItems)
-
deleteItem
<ENTITY_TYPE> reactor.core.publisher.Mono<ENTITY_TYPE> deleteItem(ENTITY_TYPE item, Supplier<Class<ENTITY_TYPE>> paramTypeFunc)
-
getDataFromIndex
@Deprecated <ENTITY_TYPE> Tuple<ProjectionType,software.amazon.awssdk.services.dynamodb.paginators.QueryPublisher> getDataFromIndex(String indexName, String hashKeyValue, Optional<?> rangeKeyValue, Class<ENTITY_TYPE> dataClass, Expr filterExpressions)
Deprecated.
-
getDataFromIndex
<ENTITY_TYPE> Tuple<ProjectionType,software.amazon.awssdk.services.dynamodb.paginators.QueryPublisher> getDataFromIndex(String indexName, String hashKeyValue, Object rangeKeyValue, Class<ENTITY_TYPE> dataClass, Expr filterExpressions)
-
setFilterExpression
void setFilterExpression(Expr expr, software.amazon.awssdk.services.dynamodb.model.QueryRequest.Builder builder, Map<String,String> nameMap, Map<String,software.amazon.awssdk.services.dynamodb.model.AttributeValue> attributeValueMap)
-
getRepoParameterType
<ENTITY_TYPE> Class<ENTITY_TYPE> getRepoParameterType(DynamoDbRepository<ENTITY_TYPE> baseRepository)
-
findByHashKeyAndRangeKeyStartsWithPagination
<ENTITY_TYPE> reactor.core.publisher.Flux<ENTITY_TYPE> findByHashKeyAndRangeKeyStartsWithPagination(String hashKey, Object hashKeyValueObj, String rangeKey, String rangeKeyValue, Page page, @Nullable String indexName, Class<ENTITY_TYPE> dataClass, @Nullable Expr expr)
-
-