DynamoDBQueryCriteria<T,ID>
, SortHandler
DynamoDBEntityWithHashAndRangeKeyCriteria
, DynamoDBEntityWithHashKeyOnlyCriteria
public abstract class AbstractDynamoDBQueryCriteria<T,ID> extends Object implements DynamoDBQueryCriteria<T,ID>, SortHandler
Modifier and Type | Field | Description |
---|---|---|
protected org.springframework.util.MultiValueMap<String,com.amazonaws.services.dynamodbv2.model.Condition> |
attributeConditions |
|
protected Class<T> |
clazz |
|
protected String |
globalSecondaryIndexName |
|
protected Object |
hashKeyAttributeValue |
|
protected Object |
hashKeyPropertyValue |
|
protected Optional<String> |
projection |
|
protected org.springframework.util.MultiValueMap<String,com.amazonaws.services.dynamodbv2.model.Condition> |
propertyConditions |
|
protected org.springframework.data.domain.Sort |
sort |
Constructor | Description |
---|---|
AbstractDynamoDBQueryCriteria(DynamoDBEntityInformation<T,ID> dynamoDBEntityInformation,
com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapperTableModel<T> tableModel) |
Modifier and Type | Method | Description |
---|---|---|
protected <P> List<com.amazonaws.services.dynamodbv2.model.AttributeValue> |
addAttributeValue(List<com.amazonaws.services.dynamodbv2.model.AttributeValue> attributeValueList,
Object attributeValue,
Class<P> propertyType,
boolean expandCollectionValues) |
|
protected void |
applySortIfSpecified(com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBQueryExpression<T> queryExpression,
List<String> permittedPropertyNames) |
|
protected void |
applySortIfSpecified(com.amazonaws.services.dynamodbv2.model.QueryRequest queryRequest,
List<String> permittedPropertyNames) |
|
Query<Long> |
buildCountQuery(DynamoDBOperations dynamoDBOperations,
boolean pageQuery) |
|
protected abstract Query<Long> |
buildFinderCountQuery(DynamoDBOperations dynamoDBOperations,
boolean pageQuery) |
|
protected abstract Query<T> |
buildFinderQuery(DynamoDBOperations dynamoDBOperations) |
|
Query<T> |
buildQuery(DynamoDBOperations dynamoDBOperations) |
|
protected com.amazonaws.services.dynamodbv2.model.QueryRequest |
buildQueryRequest(String tableName,
String theIndexName,
String hashKeyAttributeName,
String rangeKeyAttributeName,
String rangeKeyPropertyName,
List<com.amazonaws.services.dynamodbv2.model.Condition> hashKeyConditions,
List<com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions) |
|
protected abstract Query<Long> |
buildSingleEntityCountQuery(DynamoDBOperations dynamoDBOperations) |
|
protected abstract Query<T> |
buildSingleEntityLoadQuery(DynamoDBOperations dynamoDBOperations) |
|
boolean |
comparisonOperatorsPermittedForQuery() |
|
protected com.amazonaws.services.dynamodbv2.model.Condition |
createCollectionCondition(String propertyName,
com.amazonaws.services.dynamodbv2.model.ComparisonOperator comparisonOperator,
Iterable<?> o,
Class<?> propertyType) |
|
protected <V> com.amazonaws.services.dynamodbv2.model.Condition |
createNoValueCondition(String propertyName,
com.amazonaws.services.dynamodbv2.model.ComparisonOperator comparisonOperator) |
|
protected com.amazonaws.services.dynamodbv2.model.Condition |
createSingleValueCondition(String propertyName,
com.amazonaws.services.dynamodbv2.model.ComparisonOperator comparisonOperator,
Object o,
Class<?> propertyType,
boolean alreadyMarshalledIfRequired) |
|
protected String |
getAttributeName(String propertyName) |
|
protected String |
getGlobalSecondaryIndexName() |
|
protected String |
getHashKeyAttributeName() |
|
Object |
getHashKeyAttributeValue() |
|
protected List<com.amazonaws.services.dynamodbv2.model.Condition> |
getHashKeyConditions() |
|
protected String |
getHashKeyPropertyName() |
|
Object |
getHashKeyPropertyValue() |
|
protected <V> Object |
getPropertyAttributeValue(String propertyName,
V value) |
|
protected boolean |
hasIndexHashKeyEqualCondition() |
|
protected boolean |
hasIndexRangeKeyCondition() |
|
protected boolean |
isApplicableForGlobalSecondaryIndex() |
|
abstract boolean |
isApplicableForLoad() |
|
protected boolean |
isHashKeyProperty(String propertyName) |
|
boolean |
isHashKeySpecified() |
|
protected abstract boolean |
isOnlyHashKeySpecified() |
|
DynamoDBQueryCriteria<T,ID> |
withCondition(String propertyName,
com.amazonaws.services.dynamodbv2.model.Condition condition) |
|
DynamoDBQueryCriteria<T,ID> |
withHashKeyEquals(Object value) |
|
DynamoDBQueryCriteria<T,ID> |
withNoValuedCriteria(String propertyName,
com.amazonaws.services.dynamodbv2.model.ComparisonOperator comparisonOperator) |
|
DynamoDBQueryCriteria<T,ID> |
withProjection(Optional<String> projection) |
|
DynamoDBQueryCriteria<T,ID> |
withPropertyBetween(String propertyName,
Object value1,
Object value2,
Class<?> type) |
|
DynamoDBQueryCriteria<T,ID> |
withPropertyIn(String propertyName,
Iterable<?> value,
Class<?> propertyType) |
|
DynamoDBQueryCriteria<T,ID> |
withSingleValueCriteria(String propertyName,
com.amazonaws.services.dynamodbv2.model.ComparisonOperator comparisonOperator,
Object value,
Class<?> propertyType) |
|
DynamoDBQueryCriteria<T,ID> |
withSort(org.springframework.data.domain.Sort sort) |
withPropertyEquals
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ensureNoSort, ensureNoSort, throwUnsupportedSortOperationException
protected org.springframework.util.MultiValueMap<String,com.amazonaws.services.dynamodbv2.model.Condition> attributeConditions
protected org.springframework.util.MultiValueMap<String,com.amazonaws.services.dynamodbv2.model.Condition> propertyConditions
protected Object hashKeyAttributeValue
protected Object hashKeyPropertyValue
protected String globalSecondaryIndexName
protected org.springframework.data.domain.Sort sort
public AbstractDynamoDBQueryCriteria(DynamoDBEntityInformation<T,ID> dynamoDBEntityInformation, com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapperTableModel<T> tableModel)
public abstract boolean isApplicableForLoad()
protected com.amazonaws.services.dynamodbv2.model.QueryRequest buildQueryRequest(String tableName, String theIndexName, String hashKeyAttributeName, String rangeKeyAttributeName, String rangeKeyPropertyName, List<com.amazonaws.services.dynamodbv2.model.Condition> hashKeyConditions, List<com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions)
protected void applySortIfSpecified(com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBQueryExpression<T> queryExpression, List<String> permittedPropertyNames)
protected void applySortIfSpecified(com.amazonaws.services.dynamodbv2.model.QueryRequest queryRequest, List<String> permittedPropertyNames)
public boolean comparisonOperatorsPermittedForQuery()
protected List<com.amazonaws.services.dynamodbv2.model.Condition> getHashKeyConditions()
protected String getGlobalSecondaryIndexName()
protected boolean isHashKeyProperty(String propertyName)
protected String getHashKeyPropertyName()
protected String getHashKeyAttributeName()
protected boolean hasIndexHashKeyEqualCondition()
protected boolean hasIndexRangeKeyCondition()
protected boolean isApplicableForGlobalSecondaryIndex()
public DynamoDBQueryCriteria<T,ID> withHashKeyEquals(Object value)
public boolean isHashKeySpecified()
public Object getHashKeyAttributeValue()
public Object getHashKeyPropertyValue()
public DynamoDBQueryCriteria<T,ID> withPropertyBetween(String propertyName, Object value1, Object value2, Class<?> type)
withPropertyBetween
in interface DynamoDBQueryCriteria<T,ID>
public DynamoDBQueryCriteria<T,ID> withPropertyIn(String propertyName, Iterable<?> value, Class<?> propertyType)
withPropertyIn
in interface DynamoDBQueryCriteria<T,ID>
public DynamoDBQueryCriteria<T,ID> withSingleValueCriteria(String propertyName, com.amazonaws.services.dynamodbv2.model.ComparisonOperator comparisonOperator, Object value, Class<?> propertyType)
withSingleValueCriteria
in interface DynamoDBQueryCriteria<T,ID>
public Query<T> buildQuery(DynamoDBOperations dynamoDBOperations)
buildQuery
in interface DynamoDBQueryCriteria<T,ID>
public Query<Long> buildCountQuery(DynamoDBOperations dynamoDBOperations, boolean pageQuery)
buildCountQuery
in interface DynamoDBQueryCriteria<T,ID>
protected abstract Query<T> buildSingleEntityLoadQuery(DynamoDBOperations dynamoDBOperations)
protected abstract Query<Long> buildSingleEntityCountQuery(DynamoDBOperations dynamoDBOperations)
protected abstract Query<T> buildFinderQuery(DynamoDBOperations dynamoDBOperations)
protected abstract Query<Long> buildFinderCountQuery(DynamoDBOperations dynamoDBOperations, boolean pageQuery)
protected abstract boolean isOnlyHashKeySpecified()
public DynamoDBQueryCriteria<T,ID> withNoValuedCriteria(String propertyName, com.amazonaws.services.dynamodbv2.model.ComparisonOperator comparisonOperator)
withNoValuedCriteria
in interface DynamoDBQueryCriteria<T,ID>
public DynamoDBQueryCriteria<T,ID> withCondition(String propertyName, com.amazonaws.services.dynamodbv2.model.Condition condition)
protected <V> Object getPropertyAttributeValue(String propertyName, V value)
protected <V> com.amazonaws.services.dynamodbv2.model.Condition createNoValueCondition(String propertyName, com.amazonaws.services.dynamodbv2.model.ComparisonOperator comparisonOperator)
protected <P> List<com.amazonaws.services.dynamodbv2.model.AttributeValue> addAttributeValue(List<com.amazonaws.services.dynamodbv2.model.AttributeValue> attributeValueList, @Nullable Object attributeValue, Class<P> propertyType, boolean expandCollectionValues)
protected com.amazonaws.services.dynamodbv2.model.Condition createSingleValueCondition(String propertyName, com.amazonaws.services.dynamodbv2.model.ComparisonOperator comparisonOperator, Object o, Class<?> propertyType, boolean alreadyMarshalledIfRequired)
protected com.amazonaws.services.dynamodbv2.model.Condition createCollectionCondition(String propertyName, com.amazonaws.services.dynamodbv2.model.ComparisonOperator comparisonOperator, Iterable<?> o, Class<?> propertyType)
public DynamoDBQueryCriteria<T,ID> withSort(org.springframework.data.domain.Sort sort)
withSort
in interface DynamoDBQueryCriteria<T,ID>
public DynamoDBQueryCriteria<T,ID> withProjection(Optional<String> projection)
withProjection
in interface DynamoDBQueryCriteria<T,ID>
Copyright © 2018. All rights reserved.