Interface ScanBuilder<T>

Type Parameters:
T - type of the DynamoDB entity
All Superinterfaces:
DetachedScan<T>

public interface ScanBuilder<T> extends DetachedScan<T>
Builder for DynamoDB scans.
  • Method Details

    • consistent

      ScanBuilder<T> consistent(com.agorapulse.micronaut.aws.dynamodb.builder.Builders.Read read)
      Demand consistent reads.
      Parameters:
      read - the read keyword
      Returns:
      self
    • inconsistent

      ScanBuilder<T> inconsistent(com.agorapulse.micronaut.aws.dynamodb.builder.Builders.Read read)
      Demand inconsistent reads.
      Parameters:
      read - the read keyword
      Returns:
      self
    • index

      ScanBuilder<T> index(String name)
      Select the index on which this scan will be executed.
      Parameters:
      name - the name of the index to be used
      Returns:
      self
    • filter

      One or more filter conditions.
      Parameters:
      conditions - consumer to build the conditions
      Returns:
      self
    • and

      default ScanBuilder<T> and(Consumer<RangeConditionCollector<T>> conditions)
      One or more filter conditions in conjunction.
      Parameters:
      conditions - consumer to build the conditions
      Returns:
      self
    • or

      default ScanBuilder<T> or(Consumer<RangeConditionCollector<T>> conditions)
      One or more filter conditions in disjunction.
      Parameters:
      conditions - consumer to build the conditions
      Returns:
      self
    • filter

      default ScanBuilder<T> filter(@DelegatesTo(type="com.agorapulse.micronaut.aws.dynamodb.builder.RangeConditionCollector<T>",strategy=1) groovy.lang.Closure<RangeConditionCollector<T>> conditions)
      One or more filter conditions.
      Parameters:
      conditions - closure to build the conditions
      Returns:
      self
    • or

      default ScanBuilder<T> or(@DelegatesTo(type="com.agorapulse.micronaut.aws.dynamodb.builder.RangeConditionCollector<T>",strategy=1) groovy.lang.Closure<RangeConditionCollector<T>> conditions)
      One or more filter conditions in disjunction.
      Parameters:
      conditions - closure to build the conditions
      Returns:
      self
    • and

      default ScanBuilder<T> and(@DelegatesTo(type="com.agorapulse.micronaut.aws.dynamodb.builder.RangeConditionCollector<T>",strategy=1) groovy.lang.Closure<RangeConditionCollector<T>> conditions)
      One or more filter conditions in conjunction.
      Parameters:
      conditions - closure to build the conditions
      Returns:
      self
    • filter

      ScanBuilder<T> filter(com.amazonaws.services.dynamodbv2.model.ConditionalOperator or)
      Sets the conditional operator for the filter. Default is and
      Parameters:
      or - the conditional operator, usually or to switch to disjunction of filter conditions
      Returns:
      self
    • page

      ScanBuilder<T> page(int page)
      Sets the desired pagination of the scans. This only sets the optimal pagination of the scans and does not limit the number of items returned. Use io.reactivex.Flowable#take(long) to limit the number results returned from the scan.
      Parameters:
      page - number of entities loaded by one scan request (not a number of total entities returned)
      Returns:
      self
    • limit

      ScanBuilder<T> limit(int max)
      Sets the maximum number of items to be returned from the queries. This is a shortcut for calling io.reactivex.Flowable#take(long) on the result Flowable.
      Parameters:
      max - the maximum number of items returned
      Returns:
      self
    • offset

      ScanBuilder<T> offset(Object exclusiveStartKeyValue, Object exclusiveRangeStartKey)
      Sets the scan offset by defining the exclusive start hash and range key (hash and range key of the last entity returned).
      Parameters:
      exclusiveStartKeyValue - exclusive start key hash value
      exclusiveRangeStartKey - exclusive start key range value
      Returns:
      self
    • offset

      default ScanBuilder<T> offset(Object exclusiveStartKeyValue)
      Sets the scan offset by defining the exclusive start hash key (hash key of the last entity returned).
      Parameters:
      exclusiveStartKeyValue - exclusive start key hash value
      Returns:
      self
    • configure

      ScanBuilder<T> configure(Consumer<com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBScanExpression> configurer)
      Configures the native scan expression. This method is an extension point which allows to configure properties which are not provides by this builder.
      Parameters:
      configurer - consumer to configure the native scan expression
      Returns:
      self
    • configure

      default ScanBuilder<T> configure(@DelegatesTo(type="com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBScanExpression",strategy=1) groovy.lang.Closure<Object> configurer)
      Configures the native scan expression. This method is an extension point which allows to configure properties which are not provides by this builder.
      Parameters:
      configurer - closure to configure the native scan expression
      Returns:
      self
    • only

      ScanBuilder<T> only(Iterable<String> propertyPaths)
      Limits which properties of the returned entities will be populated.
      Parameters:
      propertyPaths - property paths to be populated in the returned entities
      Returns:
      self
    • only

      default ScanBuilder<T> only(String... propertyPaths)
      Limits which properties of the returned entities will be populated.
      Parameters:
      propertyPaths - property paths to be populated in the returned entities
      Returns:
      self
    • only

      default ScanBuilder<T> only(@DelegatesTo(type="T",strategy=3) groovy.lang.Closure<Object> collector)
      Limits which properties of the returned entities will be populated.
      Parameters:
      collector - closure to collect the property paths
      Returns:
      self