本文整理了Java中com.amazonaws.services.dynamodbv2.model.QueryRequest.getExpressionAttributeValues
方法的一些代码示例,展示了QueryRequest.getExpressionAttributeValues
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryRequest.getExpressionAttributeValues
方法的具体详情如下:
包路径:com.amazonaws.services.dynamodbv2.model.QueryRequest
类名称:QueryRequest
方法名:getExpressionAttributeValues
[英]One or more values that can be substituted in an expression.
Use the : (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the ProductStatus attribute was one of the following:
Available | Backordered | Discontinued
You would first need to specify ExpressionAttributeValues
as follows:
{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }
You could then use these values in an expression, such as this:
ProductStatus IN (:avail, :back, :disc)
For more information on expression attribute values, see Specifying Conditions in the Amazon DynamoDB Developer Guide.
[中]可以在表达式中替换的一个或多个值。
在表达式中使用:(冒号)字符取消对属性值的引用。例如,假设您想检查ProductStatus属性的值是否为以下值之一:Available | Backordered | Discontinued
您首先需要指定ExpressionAttributeValues
,如下所示:{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }
然后可以在表达式中使用这些值,例如:ProductStatus IN (:avail, :back, :disc)
有关表达式属性值的更多信息,请参阅《Amazon DynamoDB开发人员指南》中的{$0$}。
代码示例来源:origin: aws/aws-sdk-java
if (getExpressionAttributeNames() != null)
sb.append("ExpressionAttributeNames: ").append(getExpressionAttributeNames()).append(",");
if (getExpressionAttributeValues() != null)
sb.append("ExpressionAttributeValues: ").append(getExpressionAttributeValues());
sb.append("}");
return sb.toString();
代码示例来源:origin: aws/aws-sdk-java
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode());
hashCode = prime * hashCode + ((getIndexName() == null) ? 0 : getIndexName().hashCode());
hashCode = prime * hashCode + ((getSelect() == null) ? 0 : getSelect().hashCode());
hashCode = prime * hashCode + ((getAttributesToGet() == null) ? 0 : getAttributesToGet().hashCode());
hashCode = prime * hashCode + ((getLimit() == null) ? 0 : getLimit().hashCode());
hashCode = prime * hashCode + ((getConsistentRead() == null) ? 0 : getConsistentRead().hashCode());
hashCode = prime * hashCode + ((getKeyConditions() == null) ? 0 : getKeyConditions().hashCode());
hashCode = prime * hashCode + ((getQueryFilter() == null) ? 0 : getQueryFilter().hashCode());
hashCode = prime * hashCode + ((getConditionalOperator() == null) ? 0 : getConditionalOperator().hashCode());
hashCode = prime * hashCode + ((getScanIndexForward() == null) ? 0 : getScanIndexForward().hashCode());
hashCode = prime * hashCode + ((getExclusiveStartKey() == null) ? 0 : getExclusiveStartKey().hashCode());
hashCode = prime * hashCode + ((getReturnConsumedCapacity() == null) ? 0 : getReturnConsumedCapacity().hashCode());
hashCode = prime * hashCode + ((getProjectionExpression() == null) ? 0 : getProjectionExpression().hashCode());
hashCode = prime * hashCode + ((getFilterExpression() == null) ? 0 : getFilterExpression().hashCode());
hashCode = prime * hashCode + ((getKeyConditionExpression() == null) ? 0 : getKeyConditionExpression().hashCode());
hashCode = prime * hashCode + ((getExpressionAttributeNames() == null) ? 0 : getExpressionAttributeNames().hashCode());
hashCode = prime * hashCode + ((getExpressionAttributeValues() == null) ? 0 : getExpressionAttributeValues().hashCode());
return hashCode;
}
代码示例来源:origin: aws/aws-sdk-java
if (other.getExpressionAttributeNames() != null && other.getExpressionAttributeNames().equals(this.getExpressionAttributeNames()) == false)
return false;
if (other.getExpressionAttributeValues() == null ^ this.getExpressionAttributeValues() == null)
return false;
if (other.getExpressionAttributeValues() != null && other.getExpressionAttributeValues().equals(this.getExpressionAttributeValues()) == false)
return false;
return true;
代码示例来源:origin: aws/aws-sdk-java
/**
* Marshall the given parameter object.
*/
public void marshall(QueryRequest queryRequest, ProtocolMarshaller protocolMarshaller) {
if (queryRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(queryRequest.getTableName(), TABLENAME_BINDING);
protocolMarshaller.marshall(queryRequest.getIndexName(), INDEXNAME_BINDING);
protocolMarshaller.marshall(queryRequest.getSelect(), SELECT_BINDING);
protocolMarshaller.marshall(queryRequest.getAttributesToGet(), ATTRIBUTESTOGET_BINDING);
protocolMarshaller.marshall(queryRequest.getLimit(), LIMIT_BINDING);
protocolMarshaller.marshall(queryRequest.getConsistentRead(), CONSISTENTREAD_BINDING);
protocolMarshaller.marshall(queryRequest.getKeyConditions(), KEYCONDITIONS_BINDING);
protocolMarshaller.marshall(queryRequest.getQueryFilter(), QUERYFILTER_BINDING);
protocolMarshaller.marshall(queryRequest.getConditionalOperator(), CONDITIONALOPERATOR_BINDING);
protocolMarshaller.marshall(queryRequest.getScanIndexForward(), SCANINDEXFORWARD_BINDING);
protocolMarshaller.marshall(queryRequest.getExclusiveStartKey(), EXCLUSIVESTARTKEY_BINDING);
protocolMarshaller.marshall(queryRequest.getReturnConsumedCapacity(), RETURNCONSUMEDCAPACITY_BINDING);
protocolMarshaller.marshall(queryRequest.getProjectionExpression(), PROJECTIONEXPRESSION_BINDING);
protocolMarshaller.marshall(queryRequest.getFilterExpression(), FILTEREXPRESSION_BINDING);
protocolMarshaller.marshall(queryRequest.getKeyConditionExpression(), KEYCONDITIONEXPRESSION_BINDING);
protocolMarshaller.marshall(queryRequest.getExpressionAttributeNames(), EXPRESSIONATTRIBUTENAMES_BINDING);
protocolMarshaller.marshall(queryRequest.getExpressionAttributeValues(), EXPRESSIONATTRIBUTEVALUES_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
代码示例来源:origin: aws-amplify/aws-sdk-android
if (getExpressionAttributeNames() != null)
sb.append("ExpressionAttributeNames: " + getExpressionAttributeNames() + ",");
if (getExpressionAttributeValues() != null)
sb.append("ExpressionAttributeValues: " + getExpressionAttributeValues());
sb.append("}");
return sb.toString();
代码示例来源:origin: aws-amplify/aws-sdk-android
hashCode = prime
+ ((getExpressionAttributeValues() == null) ? 0 : getExpressionAttributeValues()
.hashCode());
return hashCode;
代码示例来源:origin: aws-amplify/aws-sdk-android
&& other.getExpressionAttributeNames().equals(this.getExpressionAttributeNames()) == false)
return false;
if (other.getExpressionAttributeValues() == null
^ this.getExpressionAttributeValues() == null)
return false;
if (other.getExpressionAttributeValues() != null
&& other.getExpressionAttributeValues().equals(this.getExpressionAttributeValues()) == false)
return false;
return true;
代码示例来源:origin: aws-amplify/aws-sdk-android
if (queryRequest.getExpressionAttributeValues() != null) {
java.util.Map<String, AttributeValue> expressionAttributeValues = queryRequest
.getExpressionAttributeValues();
jsonWriter.name("ExpressionAttributeValues");
jsonWriter.beginObject();
代码示例来源:origin: com.amazonaws/aws-java-sdk-dynamodb
if (getExpressionAttributeNames() != null)
sb.append("ExpressionAttributeNames: ").append(getExpressionAttributeNames()).append(",");
if (getExpressionAttributeValues() != null)
sb.append("ExpressionAttributeValues: ").append(getExpressionAttributeValues());
sb.append("}");
return sb.toString();
代码示例来源:origin: com.amazonaws/aws-java-sdk-dynamodb
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode());
hashCode = prime * hashCode + ((getIndexName() == null) ? 0 : getIndexName().hashCode());
hashCode = prime * hashCode + ((getSelect() == null) ? 0 : getSelect().hashCode());
hashCode = prime * hashCode + ((getAttributesToGet() == null) ? 0 : getAttributesToGet().hashCode());
hashCode = prime * hashCode + ((getLimit() == null) ? 0 : getLimit().hashCode());
hashCode = prime * hashCode + ((getConsistentRead() == null) ? 0 : getConsistentRead().hashCode());
hashCode = prime * hashCode + ((getKeyConditions() == null) ? 0 : getKeyConditions().hashCode());
hashCode = prime * hashCode + ((getQueryFilter() == null) ? 0 : getQueryFilter().hashCode());
hashCode = prime * hashCode + ((getConditionalOperator() == null) ? 0 : getConditionalOperator().hashCode());
hashCode = prime * hashCode + ((getScanIndexForward() == null) ? 0 : getScanIndexForward().hashCode());
hashCode = prime * hashCode + ((getExclusiveStartKey() == null) ? 0 : getExclusiveStartKey().hashCode());
hashCode = prime * hashCode + ((getReturnConsumedCapacity() == null) ? 0 : getReturnConsumedCapacity().hashCode());
hashCode = prime * hashCode + ((getProjectionExpression() == null) ? 0 : getProjectionExpression().hashCode());
hashCode = prime * hashCode + ((getFilterExpression() == null) ? 0 : getFilterExpression().hashCode());
hashCode = prime * hashCode + ((getKeyConditionExpression() == null) ? 0 : getKeyConditionExpression().hashCode());
hashCode = prime * hashCode + ((getExpressionAttributeNames() == null) ? 0 : getExpressionAttributeNames().hashCode());
hashCode = prime * hashCode + ((getExpressionAttributeValues() == null) ? 0 : getExpressionAttributeValues().hashCode());
return hashCode;
}
代码示例来源:origin: com.amazonaws/aws-java-sdk-dynamodb
if (other.getExpressionAttributeNames() != null && other.getExpressionAttributeNames().equals(this.getExpressionAttributeNames()) == false)
return false;
if (other.getExpressionAttributeValues() == null ^ this.getExpressionAttributeValues() == null)
return false;
if (other.getExpressionAttributeValues() != null && other.getExpressionAttributeValues().equals(this.getExpressionAttributeValues()) == false)
return false;
return true;
代码示例来源:origin: com.amazonaws/aws-java-sdk-dynamodb
/**
* Marshall the given parameter object.
*/
public void marshall(QueryRequest queryRequest, ProtocolMarshaller protocolMarshaller) {
if (queryRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(queryRequest.getTableName(), TABLENAME_BINDING);
protocolMarshaller.marshall(queryRequest.getIndexName(), INDEXNAME_BINDING);
protocolMarshaller.marshall(queryRequest.getSelect(), SELECT_BINDING);
protocolMarshaller.marshall(queryRequest.getAttributesToGet(), ATTRIBUTESTOGET_BINDING);
protocolMarshaller.marshall(queryRequest.getLimit(), LIMIT_BINDING);
protocolMarshaller.marshall(queryRequest.getConsistentRead(), CONSISTENTREAD_BINDING);
protocolMarshaller.marshall(queryRequest.getKeyConditions(), KEYCONDITIONS_BINDING);
protocolMarshaller.marshall(queryRequest.getQueryFilter(), QUERYFILTER_BINDING);
protocolMarshaller.marshall(queryRequest.getConditionalOperator(), CONDITIONALOPERATOR_BINDING);
protocolMarshaller.marshall(queryRequest.getScanIndexForward(), SCANINDEXFORWARD_BINDING);
protocolMarshaller.marshall(queryRequest.getExclusiveStartKey(), EXCLUSIVESTARTKEY_BINDING);
protocolMarshaller.marshall(queryRequest.getReturnConsumedCapacity(), RETURNCONSUMEDCAPACITY_BINDING);
protocolMarshaller.marshall(queryRequest.getProjectionExpression(), PROJECTIONEXPRESSION_BINDING);
protocolMarshaller.marshall(queryRequest.getFilterExpression(), FILTEREXPRESSION_BINDING);
protocolMarshaller.marshall(queryRequest.getKeyConditionExpression(), KEYCONDITIONEXPRESSION_BINDING);
protocolMarshaller.marshall(queryRequest.getExpressionAttributeNames(), EXPRESSIONATTRIBUTENAMES_BINDING);
protocolMarshaller.marshall(queryRequest.getExpressionAttributeValues(), EXPRESSIONATTRIBUTEVALUES_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
内容来源于网络,如有侵权,请联系作者删除!