java.lang.Object
com.agorapulse.micronaut.aws.dynamodb.builder.Builders

public final class Builders extends Object
Utility class for building queries, updates and scan. This class is designed to be statically star-imported in the service interface.
  • Field Details

    • asc

      public static final com.agorapulse.micronaut.aws.dynamodb.builder.Builders.Sort asc
    • desc

      public static final com.agorapulse.micronaut.aws.dynamodb.builder.Builders.Sort desc
    • read

      public static final com.agorapulse.micronaut.aws.dynamodb.builder.Builders.Read read
    • none

      public static final com.amazonaws.services.dynamodbv2.model.ReturnValue none
    • allOld

      public static final com.amazonaws.services.dynamodbv2.model.ReturnValue allOld
    • updatedOld

      public static final com.amazonaws.services.dynamodbv2.model.ReturnValue updatedOld
    • allNew

      public static final com.amazonaws.services.dynamodbv2.model.ReturnValue allNew
    • updatedNew

      public static final com.amazonaws.services.dynamodbv2.model.ReturnValue updatedNew
  • Method Details

    • query

      public static <T> QueryBuilder<T> query(Class<T> type)
      Creates query builder for given DynamoDB entity.
      Type Parameters:
      T - type of DynamoDB entity
      Parameters:
      type - DynamoDB entity type
      Returns:
      query builder for given DynamoDB entity
    • query

      public static <T> QueryBuilder<T> query(Class<T> type, Consumer<QueryBuilder<T>> definition)
      Creates query builder for given DynamoDB entity.
      Type Parameters:
      T - type of DynamoDB entity
      Parameters:
      type - DynamoDB entity type
      definition - definition of the query
      Returns:
      query builder for given DynamoDB entity
    • query

      public static <T> QueryBuilder<T> query(Class<T> type, @DelegatesTo(type="com.agorapulse.micronaut.aws.dynamodb.builder.QueryBuilder<T>",strategy=1) groovy.lang.Closure<QueryBuilder<T>> definition)
      Creates query builder for given DynamoDB entity.
      Type Parameters:
      T - type of DynamoDB entity
      Parameters:
      type - DynamoDB entity type
      definition - definition of the query
      Returns:
      query builder for given DynamoDB entity
    • scan

      public static <T> ScanBuilder<T> scan(Class<T> type)
      Creates scan builder for given DynamoDB entity.
      Type Parameters:
      T - type of DynamoDB entity
      Parameters:
      type - DynamoDB entity type
      Returns:
      scan builder for given DynamoDB entity
    • scan

      public static <T> ScanBuilder<T> scan(Class<T> type, Consumer<ScanBuilder<T>> definition)
      Creates scan builder for given DynamoDB entity.
      Type Parameters:
      T - type of DynamoDB entity
      Parameters:
      type - DynamoDB entity type
      definition - definition of the query
      Returns:
      scan builder for given DynamoDB entity
    • scan

      public static <T> ScanBuilder<T> scan(Class<T> type, @DelegatesTo(type="com.agorapulse.micronaut.aws.dynamodb.builder.ScanBuilder<T>",strategy=1) groovy.lang.Closure<ScanBuilder<T>> definition)
      Creates scan builder for given DynamoDB entity.
      Type Parameters:
      T - type of DynamoDB entity
      Parameters:
      type - DynamoDB entity type
      definition - definition of the query
      Returns:
      scan builder for given DynamoDB entity
    • update

      public static <T> UpdateBuilder<T> update(Class<T> type)
      Creates update builder for given DynamoDB entity.
      Type Parameters:
      T - type of DynamoDB entity
      Parameters:
      type - DynamoDB entity type
      Returns:
      update builder for given DynamoDB entity
    • update

      public static <T> UpdateBuilder<T> update(Class<T> type, Consumer<UpdateBuilder<T>> definition)
      Creates update builder for given DynamoDB entity.
      Type Parameters:
      T - type of DynamoDB entity
      Parameters:
      type - DynamoDB entity type
      definition - definition of the query
      Returns:
      update builder for given DynamoDB entity
    • update

      public static <T> UpdateBuilder<T> update(Class<T> type, @DelegatesTo(type="com.agorapulse.micronaut.aws.dynamodb.builder.UpdateBuilder<T>",strategy=1) groovy.lang.Closure<UpdateBuilder<T>> definition)
      Creates update builder for given DynamoDB entity.
      Type Parameters:
      T - type of DynamoDB entity
      Parameters:
      type - DynamoDB entity type
      definition - definition of the query
      Returns:
      update builder for given DynamoDB entity