@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRequestItems() == null) ? 0 : getRequestItems().hashCode()); hashCode = prime * hashCode + ((getReturnConsumedCapacity() == null) ? 0 : getReturnConsumedCapacity().hashCode()); hashCode = prime * hashCode + ((getReturnItemCollectionMetrics() == null) ? 0 : getReturnItemCollectionMetrics().hashCode()); return hashCode; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getRequestItems() != null) sb.append("RequestItems: ").append(getRequestItems()).append(","); if (getReturnConsumedCapacity() != null) sb.append("ReturnConsumedCapacity: ").append(getReturnConsumedCapacity()).append(","); if (getReturnItemCollectionMetrics() != null) sb.append("ReturnItemCollectionMetrics: ").append(getReturnItemCollectionMetrics()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BatchWriteItemRequest == false) return false; BatchWriteItemRequest other = (BatchWriteItemRequest) obj; if (other.getRequestItems() == null ^ this.getRequestItems() == null) return false; if (other.getRequestItems() != null && other.getRequestItems().equals(this.getRequestItems()) == false) return false; if (other.getReturnConsumedCapacity() == null ^ this.getReturnConsumedCapacity() == null) return false; if (other.getReturnConsumedCapacity() != null && other.getReturnConsumedCapacity().equals(this.getReturnConsumedCapacity()) == false) return false; if (other.getReturnItemCollectionMetrics() == null ^ this.getReturnItemCollectionMetrics() == null) return false; if (other.getReturnItemCollectionMetrics() != null && other.getReturnItemCollectionMetrics().equals(this.getReturnItemCollectionMetrics()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(BatchWriteItemRequest batchWriteItemRequest, ProtocolMarshaller protocolMarshaller) { if (batchWriteItemRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(batchWriteItemRequest.getRequestItems(), REQUESTITEMS_BINDING); protocolMarshaller.marshall(batchWriteItemRequest.getReturnConsumedCapacity(), RETURNCONSUMEDCAPACITY_BINDING); protocolMarshaller.marshall(batchWriteItemRequest.getReturnItemCollectionMetrics(), RETURNITEMCOLLECTIONMETRICS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRequestItems() == null) ? 0 : getRequestItems().hashCode()); hashCode = prime * hashCode + ((getReturnConsumedCapacity() == null) ? 0 : getReturnConsumedCapacity() .hashCode()); hashCode = prime * hashCode + ((getReturnItemCollectionMetrics() == null) ? 0 : getReturnItemCollectionMetrics().hashCode()); return hashCode; }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getRequestItems() != null) sb.append("RequestItems: " + getRequestItems() + ","); if (getReturnConsumedCapacity() != null) sb.append("ReturnConsumedCapacity: " + getReturnConsumedCapacity() + ","); if (getReturnItemCollectionMetrics() != null) sb.append("ReturnItemCollectionMetrics: " + getReturnItemCollectionMetrics()); sb.append("}"); return sb.toString(); }
BatchWriteItemRequest other = (BatchWriteItemRequest) obj; if (other.getRequestItems() == null ^ this.getRequestItems() == null) return false; if (other.getRequestItems() != null && other.getRequestItems().equals(this.getRequestItems()) == false) return false; if (other.getReturnConsumedCapacity() == null ^ this.getReturnConsumedCapacity() == null)
jsonWriter.beginObject(); if (batchWriteItemRequest.getRequestItems() != null) { java.util.Map<String, java.util.List<WriteRequest>> requestItems = batchWriteItemRequest .getRequestItems(); jsonWriter.name("RequestItems"); jsonWriter.beginObject();
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRequestItems() == null) ? 0 : getRequestItems().hashCode()); hashCode = prime * hashCode + ((getReturnConsumedCapacity() == null) ? 0 : getReturnConsumedCapacity().hashCode()); hashCode = prime * hashCode + ((getReturnItemCollectionMetrics() == null) ? 0 : getReturnItemCollectionMetrics().hashCode()); return hashCode; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getRequestItems() != null) sb.append("RequestItems: ").append(getRequestItems()).append(","); if (getReturnConsumedCapacity() != null) sb.append("ReturnConsumedCapacity: ").append(getReturnConsumedCapacity()).append(","); if (getReturnItemCollectionMetrics() != null) sb.append("ReturnItemCollectionMetrics: ").append(getReturnItemCollectionMetrics()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BatchWriteItemRequest == false) return false; BatchWriteItemRequest other = (BatchWriteItemRequest) obj; if (other.getRequestItems() == null ^ this.getRequestItems() == null) return false; if (other.getRequestItems() != null && other.getRequestItems().equals(this.getRequestItems()) == false) return false; if (other.getReturnConsumedCapacity() == null ^ this.getReturnConsumedCapacity() == null) return false; if (other.getReturnConsumedCapacity() != null && other.getReturnConsumedCapacity().equals(this.getReturnConsumedCapacity()) == false) return false; if (other.getReturnItemCollectionMetrics() == null ^ this.getReturnItemCollectionMetrics() == null) return false; if (other.getReturnItemCollectionMetrics() != null && other.getReturnItemCollectionMetrics().equals(this.getReturnItemCollectionMetrics()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(BatchWriteItemRequest batchWriteItemRequest, ProtocolMarshaller protocolMarshaller) { if (batchWriteItemRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(batchWriteItemRequest.getRequestItems(), REQUESTITEMS_BINDING); protocolMarshaller.marshall(batchWriteItemRequest.getReturnConsumedCapacity(), RETURNCONSUMEDCAPACITY_BINDING); protocolMarshaller.marshall(batchWriteItemRequest.getReturnItemCollectionMetrics(), RETURNITEMCOLLECTIONMETRICS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
batchWriteItemRequest.getRequestItems().values()) { batchSize += writeRequests.size();
batchWriteItemRequest.getRequestItems().values()) { batchSize += writeRequests.size();
public BatchWriteItemResult batchWriteItem(final BatchWriteItemRequest batchRequest) throws BackendException { int count = 0; for (Entry<String, List<WriteRequest>> entry : batchRequest.getRequestItems().entrySet()) { final String tableName = entry.getKey(); final List<WriteRequest> requests = entry.getValue();