if (getConditionExpression() != null) sb.append("ConditionExpression: ").append(getConditionExpression()).append(","); if (getExpressionAttributeNames() != null) sb.append("ExpressionAttributeNames: ").append(getExpressionAttributeNames()).append(","); if (getExpressionAttributeValues() != null) sb.append("ExpressionAttributeValues: ").append(getExpressionAttributeValues());
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode()); hashCode = prime * hashCode + ((getItem() == null) ? 0 : getItem().hashCode()); hashCode = prime * hashCode + ((getExpected() == null) ? 0 : getExpected().hashCode()); hashCode = prime * hashCode + ((getReturnValues() == null) ? 0 : getReturnValues().hashCode()); hashCode = prime * hashCode + ((getReturnConsumedCapacity() == null) ? 0 : getReturnConsumedCapacity().hashCode()); hashCode = prime * hashCode + ((getReturnItemCollectionMetrics() == null) ? 0 : getReturnItemCollectionMetrics().hashCode()); hashCode = prime * hashCode + ((getConditionalOperator() == null) ? 0 : getConditionalOperator().hashCode()); hashCode = prime * hashCode + ((getConditionExpression() == null) ? 0 : getConditionExpression().hashCode()); hashCode = prime * hashCode + ((getExpressionAttributeNames() == null) ? 0 : getExpressionAttributeNames().hashCode()); hashCode = prime * hashCode + ((getExpressionAttributeValues() == null) ? 0 : getExpressionAttributeValues().hashCode()); return hashCode; }
if (other.getConditionExpression() != null && other.getConditionExpression().equals(this.getConditionExpression()) == false) return false; if (other.getExpressionAttributeNames() == null ^ this.getExpressionAttributeNames() == null) return false; if (other.getExpressionAttributeNames() != null && other.getExpressionAttributeNames().equals(this.getExpressionAttributeNames()) == false) return false; if (other.getExpressionAttributeValues() == null ^ this.getExpressionAttributeValues() == null)
/** * Marshall the given parameter object. */ public void marshall(PutItemRequest putItemRequest, ProtocolMarshaller protocolMarshaller) { if (putItemRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(putItemRequest.getTableName(), TABLENAME_BINDING); protocolMarshaller.marshall(putItemRequest.getItem(), ITEM_BINDING); protocolMarshaller.marshall(putItemRequest.getExpected(), EXPECTED_BINDING); protocolMarshaller.marshall(putItemRequest.getReturnValues(), RETURNVALUES_BINDING); protocolMarshaller.marshall(putItemRequest.getReturnConsumedCapacity(), RETURNCONSUMEDCAPACITY_BINDING); protocolMarshaller.marshall(putItemRequest.getReturnItemCollectionMetrics(), RETURNITEMCOLLECTIONMETRICS_BINDING); protocolMarshaller.marshall(putItemRequest.getConditionalOperator(), CONDITIONALOPERATOR_BINDING); protocolMarshaller.marshall(putItemRequest.getConditionExpression(), CONDITIONEXPRESSION_BINDING); protocolMarshaller.marshall(putItemRequest.getExpressionAttributeNames(), EXPRESSIONATTRIBUTENAMES_BINDING); protocolMarshaller.marshall(putItemRequest.getExpressionAttributeValues(), EXPRESSIONATTRIBUTEVALUES_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
if (getConditionExpression() != null) sb.append("ConditionExpression: " + getConditionExpression() + ","); if (getExpressionAttributeNames() != null) sb.append("ExpressionAttributeNames: " + getExpressionAttributeNames() + ","); if (getExpressionAttributeValues() != null) sb.append("ExpressionAttributeValues: " + getExpressionAttributeValues());
hashCode = prime + ((getExpressionAttributeNames() == null) ? 0 : getExpressionAttributeNames() .hashCode()); hashCode = prime
&& other.getConditionExpression().equals(this.getConditionExpression()) == false) return false; if (other.getExpressionAttributeNames() == null ^ this.getExpressionAttributeNames() == null) return false; if (other.getExpressionAttributeNames() != null && other.getExpressionAttributeNames().equals(this.getExpressionAttributeNames()) == false) return false; if (other.getExpressionAttributeValues() == null
jsonWriter.value(conditionExpression); if (putItemRequest.getExpressionAttributeNames() != null) { java.util.Map<String, String> expressionAttributeNames = putItemRequest .getExpressionAttributeNames(); jsonWriter.name("ExpressionAttributeNames"); jsonWriter.beginObject();
if (getConditionExpression() != null) sb.append("ConditionExpression: ").append(getConditionExpression()).append(","); if (getExpressionAttributeNames() != null) sb.append("ExpressionAttributeNames: ").append(getExpressionAttributeNames()).append(","); if (getExpressionAttributeValues() != null) sb.append("ExpressionAttributeValues: ").append(getExpressionAttributeValues());
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode()); hashCode = prime * hashCode + ((getItem() == null) ? 0 : getItem().hashCode()); hashCode = prime * hashCode + ((getExpected() == null) ? 0 : getExpected().hashCode()); hashCode = prime * hashCode + ((getReturnValues() == null) ? 0 : getReturnValues().hashCode()); hashCode = prime * hashCode + ((getReturnConsumedCapacity() == null) ? 0 : getReturnConsumedCapacity().hashCode()); hashCode = prime * hashCode + ((getReturnItemCollectionMetrics() == null) ? 0 : getReturnItemCollectionMetrics().hashCode()); hashCode = prime * hashCode + ((getConditionalOperator() == null) ? 0 : getConditionalOperator().hashCode()); hashCode = prime * hashCode + ((getConditionExpression() == null) ? 0 : getConditionExpression().hashCode()); hashCode = prime * hashCode + ((getExpressionAttributeNames() == null) ? 0 : getExpressionAttributeNames().hashCode()); hashCode = prime * hashCode + ((getExpressionAttributeValues() == null) ? 0 : getExpressionAttributeValues().hashCode()); return hashCode; }
if (other.getConditionExpression() != null && other.getConditionExpression().equals(this.getConditionExpression()) == false) return false; if (other.getExpressionAttributeNames() == null ^ this.getExpressionAttributeNames() == null) return false; if (other.getExpressionAttributeNames() != null && other.getExpressionAttributeNames().equals(this.getExpressionAttributeNames()) == false) return false; if (other.getExpressionAttributeValues() == null ^ this.getExpressionAttributeValues() == null)
/** * Marshall the given parameter object. */ public void marshall(PutItemRequest putItemRequest, ProtocolMarshaller protocolMarshaller) { if (putItemRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(putItemRequest.getTableName(), TABLENAME_BINDING); protocolMarshaller.marshall(putItemRequest.getItem(), ITEM_BINDING); protocolMarshaller.marshall(putItemRequest.getExpected(), EXPECTED_BINDING); protocolMarshaller.marshall(putItemRequest.getReturnValues(), RETURNVALUES_BINDING); protocolMarshaller.marshall(putItemRequest.getReturnConsumedCapacity(), RETURNCONSUMEDCAPACITY_BINDING); protocolMarshaller.marshall(putItemRequest.getReturnItemCollectionMetrics(), RETURNITEMCOLLECTIONMETRICS_BINDING); protocolMarshaller.marshall(putItemRequest.getConditionalOperator(), CONDITIONALOPERATOR_BINDING); protocolMarshaller.marshall(putItemRequest.getConditionExpression(), CONDITIONEXPRESSION_BINDING); protocolMarshaller.marshall(putItemRequest.getExpressionAttributeNames(), EXPRESSIONATTRIBUTENAMES_BINDING); protocolMarshaller.marshall(putItemRequest.getExpressionAttributeValues(), EXPRESSIONATTRIBUTEVALUES_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override protected void doValidate(String txId, TransactionManager txManager) { if(request == null || request.getItem() == null) { throw new InvalidRequestException("PutItem must contain an Item", txId, getTableName(), null, this); } validateAttributes(this, request.getItem(), txId, txManager); if(request.getReturnConsumedCapacity() != null) { throw new InvalidRequestException("ReturnConsumedCapacity is not currently supported", txId, getTableName(), null, this); } if(request.getReturnItemCollectionMetrics() != null) { throw new InvalidRequestException("ReturnItemCollectionMetrics is not currently supported", txId, getTableName(), null, this); } if(request.getExpected() != null) { throw new InvalidRequestException("Requests with conditions are not currently supported", txId, getTableName(), getKey(txManager), this); } if(request.getConditionExpression() != null) { throw new InvalidRequestException("Requests with conditions are not currently supported", txId, getTableName(), getKey(txManager), this); } if(request.getExpressionAttributeNames() != null) { throw new InvalidRequestException("Requests with expressions are not currently supported", txId, getTableName(), getKey(txManager), this); } if(request.getExpressionAttributeValues() != null) { throw new InvalidRequestException("Requests with expressions are not currently supported", txId, getTableName(), getKey(txManager), this); } } }