Interface QueryConditional
- All Known Implementing Classes:
BeginsWithConditional,BetweenConditional,EqualToConditional,SingleKeyItemConditional
Example:
QueryConditional sortValueGreaterThanFour = QueryConditional.sortGreaterThan(k -> k.partitionValue(10).sortValue(4));
-
Method Summary
Modifier and TypeMethodDescriptionexpression(TableSchema<?> tableSchema, String indexName) Generates a conditionalExpressionbased on specific context that is supplied as arguments.static QueryConditionalkeyEqualTo(Consumer<Key.Builder> keyConsumer) Creates aQueryConditionalthat matches when the key of an index is equal to a specific value.static QueryConditionalkeyEqualTo(Key key) Creates aQueryConditionalthat matches when the key of an index is equal to a specific value.static QueryConditionalsortBeginsWith(Consumer<Key.Builder> keyConsumer) Creates aQueryConditionalthat matches when the key of an index begins with a specific value.static QueryConditionalsortBeginsWith(Key key) Creates aQueryConditionalthat matches when the key of an index begins with a specific value.static QueryConditionalsortBetween(Consumer<Key.Builder> keyFromConsumer, Consumer<Key.Builder> keyToConsumer) Creates aQueryConditionalthat matches when the key of an index is between two specific values.static QueryConditionalsortBetween(Key keyFrom, Key keyTo) Creates aQueryConditionalthat matches when the key of an index is between two specific values.static QueryConditionalsortGreaterThan(Consumer<Key.Builder> keyConsumer) Creates aQueryConditionalthat matches when the key of an index is greater than a specific value.static QueryConditionalsortGreaterThan(Key key) Creates aQueryConditionalthat matches when the key of an index is greater than a specific value.static QueryConditionalsortGreaterThanOrEqualTo(Consumer<Key.Builder> keyConsumer) Creates aQueryConditionalthat matches when the key of an index is greater than or equal to a specific value.static QueryConditionalCreates aQueryConditionalthat matches when the key of an index is greater than or equal to a specific value.static QueryConditionalsortLessThan(Consumer<Key.Builder> keyConsumer) Creates aQueryConditionalthat matches when the key of an index is less than a specific value.static QueryConditionalsortLessThan(Key key) Creates aQueryConditionalthat matches when the key of an index is less than a specific value.static QueryConditionalsortLessThanOrEqualTo(Consumer<Key.Builder> keyConsumer) Creates aQueryConditionalthat matches when the key of an index is less than or equal to a specific value.static QueryConditionalsortLessThanOrEqualTo(Key key) Creates aQueryConditionalthat matches when the key of an index is less than or equal to a specific value.
-
Method Details
-
keyEqualTo
Creates aQueryConditionalthat matches when the key of an index is equal to a specific value. Supports both single keys and composite keys with up to 4 partition and 4 sort keys.In case of composite keys, all the partition keys must be provided and "=" operator will be applied on all of them. The sort keys are optional but if are provided, "=" operator will be applied only to the provided ones.
- Parameters:
key- the literal key used to compare the value of the index against
-
keyEqualTo
Creates aQueryConditionalthat matches when the key of an index is equal to a specific value. Supports both single keys and composite keys with up to 4 partition and 4 sort keys.In case of composite keys, all the partition keys must be provided and "=" operator will be applied on all of them. The sort keys are optional but if are provided, "=" operator will be applied only to the provided ones.
- Parameters:
keyConsumer- 'builder consumer' for the literal key used to compare the value of the index against
-
sortGreaterThan
Creates aQueryConditionalthat matches when the key of an index is greater than a specific value. Supports both single keys and composite keys with up to 4 partition and 4 sort keys.In case of composite keys, all the partition keys must be provided and equality condition will be applied on all of them. For the sort keys, the ">" operator will be applied only to the rightmost provided one, but all the preceding sort keys must also be provided and equality condition will be applied on them.
- Parameters:
key- the literal key used to compare the value of the index against
-
sortGreaterThan
Creates aQueryConditionalthat matches when the key of an index is greater than a specific value. Supports both single keys and composite keys with up to 4 partition and 4 sort keys.In case of composite keys, all the partition keys must be provided and equality condition will be applied on all of them. For the sort keys, the ">" operator will be applied only to the rightmost provided one, but all the preceding sort keys must also be provided and equality condition will be applied on them.
- Parameters:
keyConsumer- 'builder consumer' for the literal key used to compare the value of the index against
-
sortGreaterThanOrEqualTo
Creates aQueryConditionalthat matches when the key of an index is greater than or equal to a specific value. Supports both single keys and composite keys with up to 4 partition and 4 sort keys.In case of composite keys, all the partition keys must be provided and equality condition will be applied on all of them. For the sort keys, the ">=" operator will be applied only to the rightmost provided one, but all the preceding sort keys must also be provided and equality condition will be applied on them.
- Parameters:
key- the literal key used to compare the value of the index against
-
sortGreaterThanOrEqualTo
Creates aQueryConditionalthat matches when the key of an index is greater than or equal to a specific value. Supports both single keys and composite keys with up to 4 partition and 4 sort keys.In case of composite keys, all the partition keys must be provided and equality condition will be applied on all of them. For the sort keys, the ">=" operator will be applied only to the rightmost provided one, but all the preceding sort keys must also be provided and equality condition will be applied on them.
- Parameters:
keyConsumer- 'builder consumer' for the literal key used to compare the value of the index against
-
sortLessThan
Creates aQueryConditionalthat matches when the key of an index is less than a specific value. Supports both single keys and composite keys with up to 4 partition and 4 sort keys.In case of composite keys, all the partition keys must be provided and equality condition will be applied on all of them. For the sort keys, the "invalid input: '<'" operator will be applied only to the rightmost provided one, but all the preceding sort keys must also be provided and equality condition will be applied on them.
- Parameters:
key- the literal key used to compare the value of the index against
-
sortLessThan
Creates aQueryConditionalthat matches when the key of an index is less than a specific value. Supports both single keys and composite keys with up to 4 partition and 4 sort keys.In case of composite keys, all the partition keys must be provided and equality condition will be applied on all of them. For the sort keys, the "invalid input: '<'" operator will be applied only to the rightmost provided one, but all the preceding sort keys must also be provided and equality condition will be applied on them.
- Parameters:
keyConsumer- 'builder consumer' for the literal key used to compare the value of the index against
-
sortLessThanOrEqualTo
Creates aQueryConditionalthat matches when the key of an index is less than or equal to a specific value. Supports both single keys and composite keys with up to 4 partition and 4 sort keys.In case of composite keys, all the partition keys must be provided and equality condition will be applied on all of them. For the sort keys, the "invalid input: '<'=" operator will be applied only to the rightmost provided one, but all the preceding sort keys must also be provided and equality condition will be applied on them.
- Parameters:
key- the literal key used to compare the value of the index against
-
sortLessThanOrEqualTo
Creates aQueryConditionalthat matches when the key of an index is less than or equal to a specific value. Supports both single keys and composite keys with up to 4 partition and 4 sort keys.In case of composite keys, all the partition keys must be provided and equality condition will be applied on all of them. For the sort keys, the "invalid input: '<'=" operator will be applied only to the rightmost provided one, but all the preceding sort keys must also be provided and equality condition will be applied on them.
- Parameters:
keyConsumer- 'builder consumer' for the literal key used to compare the value of the index against
-
sortBetween
Creates aQueryConditionalthat matches when the key of an index is between two specific values. Supports both single keys and composite keys with up to 4 partition and 4 sort keys.In case of composite keys, all the partition keys must be provided and equality condition will be applied on all of them. For the sort keys, the "between" operator will be applied only to the rightmost provided one, but all the preceding sort keys must also be provided and equality condition will be applied on them.
- Parameters:
keyFrom- the literal key used to compare the start of the range to compare the value of the index againstkeyTo- the literal key used to compare the end of the range to compare the value of the index against
-
sortBetween
static QueryConditional sortBetween(Consumer<Key.Builder> keyFromConsumer, Consumer<Key.Builder> keyToConsumer) Creates aQueryConditionalthat matches when the key of an index is between two specific values. Supports both single keys and composite keys with up to 4 partition and 4 sort keys.In case of composite keys, all the partition keys must be provided and equality condition will be applied on all of them. For the sort keys, the "between" operator will be applied only to the rightmost provided one, but all the preceding sort keys must also be provided and equality condition will be applied on them.
- Parameters:
keyFromConsumer- 'builder consumer' for the literal key used to compare the start of the range to compare the value of the index againstkeyToConsumer- 'builder consumer' for the literal key used to compare the end of the range to compare the value of the index against
-
sortBeginsWith
Creates aQueryConditionalthat matches when the key of an index begins with a specific value. Supports both single keys and composite keys with up to 4 partition and 4 sort keys.In case of composite keys, all the partition keys must be provided and equality condition will be applied on all of them. For the sort keys, the "begins_with" operator will be applied only to the rightmost provided one, but all the preceding sort keys must also be provided and equality condition will be applied on them.
- Parameters:
key- the literal key used to compare the start of the value of the index against
-
sortBeginsWith
Creates aQueryConditionalthat matches when the key of an index begins with a specific value. Supports both single keys and composite keys with up to 4 partition and 4 sort keys.In case of composite keys, all the partition keys must be provided and equality condition will be applied on all of them. For the sort keys, the "begins_with" operator will be applied only to the rightmost provided one, but all the preceding sort keys must also be provided and equality condition will be applied on them.
- Parameters:
keyConsumer- 'builder consumer' the literal key used to compare the start of the value of the index against
-
expression
Generates a conditionalExpressionbased on specific context that is supplied as arguments.- Parameters:
tableSchema- ATableSchemathat this expression will be used withindexName- The specific index name of the index this expression will be used with- Returns:
- A specific
Expressionthat can be used as part of a query request
-