Enum BaseRepositoryUtils

    • Field Detail

      • LOGGER

        private static final org.slf4j.Logger LOGGER
    • Constructor Detail

      • BaseRepositoryUtils

        private BaseRepositoryUtils()
    • 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 name
        NullPointerException - if the argument is null
      • 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 actions
        returnItemFunc - 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.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)