@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getConditionCheck() == null) ? 0 : getConditionCheck().hashCode()); hashCode = prime * hashCode + ((getPut() == null) ? 0 : getPut().hashCode()); hashCode = prime * hashCode + ((getDelete() == null) ? 0 : getDelete().hashCode()); hashCode = prime * hashCode + ((getUpdate() == null) ? 0 : getUpdate().hashCode()); return hashCode; }
/** * <p> * A request to perform a check item operation. * </p> * * @param conditionCheck * A request to perform a check item operation. * @return Returns a reference to this object so that method calls can be chained together. */ public TransactWriteItem withConditionCheck(ConditionCheck conditionCheck) { setConditionCheck(conditionCheck); return this; }
/** * <p> * A request to perform a <code>DeleteItem</code> operation. * </p> * * @param delete * A request to perform a <code>DeleteItem</code> operation. * @return Returns a reference to this object so that method calls can be chained together. */ public TransactWriteItem withDelete(Delete delete) { setDelete(delete); return this; }
public TransactWriteItem unmarshall(JsonUnmarshallerContext context) throws Exception { TransactWriteItem transactWriteItem = new TransactWriteItem(); if (context.testExpression("ConditionCheck", targetDepth)) { context.nextToken(); transactWriteItem.setConditionCheck(ConditionCheckJsonUnmarshaller.getInstance().unmarshall(context)); transactWriteItem.setPut(PutJsonUnmarshaller.getInstance().unmarshall(context)); transactWriteItem.setDelete(DeleteJsonUnmarshaller.getInstance().unmarshall(context)); transactWriteItem.setUpdate(UpdateJsonUnmarshaller.getInstance().unmarshall(context));
.withItem(childTableItem) .withReturnValuesOnConditionCheckFailure(ReturnValuesOnConditionCheckFailure.ALL_OLD); writes.add(new TransactWriteItem().withPut(childTableEntry)); .withReturnValuesOnConditionCheckFailure(ReturnValuesOnConditionCheckFailure.ALL_OLD); writes.add(new TransactWriteItem().withPut(mainTableEntry)); TransactWriteItemsRequest placeWriteTransaction = new TransactWriteItemsRequest() .withTransactItems(writes)
/** * <p> * A request to perform a <code>PutItem</code> operation. * </p> * * @param put * A request to perform a <code>PutItem</code> operation. * @return Returns a reference to this object so that method calls can be chained together. */ public TransactWriteItem withPut(Put put) { setPut(put); return this; }
/** * <p> * A request to perform an <code>UpdateItem</code> operation. * </p> * * @param update * A request to perform an <code>UpdateItem</code> operation. * @return Returns a reference to this object so that method calls can be chained together. */ public TransactWriteItem withUpdate(Update update) { setUpdate(update); return this; }
public TransactWriteItem unmarshall(JsonUnmarshallerContext context) throws Exception { TransactWriteItem transactWriteItem = new TransactWriteItem(); if (context.testExpression("ConditionCheck", targetDepth)) { context.nextToken(); transactWriteItem.setConditionCheck(ConditionCheckJsonUnmarshaller.getInstance().unmarshall(context)); transactWriteItem.setPut(PutJsonUnmarshaller.getInstance().unmarshall(context)); transactWriteItem.setDelete(DeleteJsonUnmarshaller.getInstance().unmarshall(context)); transactWriteItem.setUpdate(UpdateJsonUnmarshaller.getInstance().unmarshall(context));
/** * <p> * A request to perform a <code>PutItem</code> operation. * </p> * * @param put * A request to perform a <code>PutItem</code> operation. * @return Returns a reference to this object so that method calls can be chained together. */ public TransactWriteItem withPut(Put put) { setPut(put); return this; }
/** * <p> * A request to perform an <code>UpdateItem</code> operation. * </p> * * @param update * A request to perform an <code>UpdateItem</code> operation. * @return Returns a reference to this object so that method calls can be chained together. */ public TransactWriteItem withUpdate(Update update) { setUpdate(update); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TransactWriteItem == false) return false; TransactWriteItem other = (TransactWriteItem) obj; if (other.getConditionCheck() == null ^ this.getConditionCheck() == null) return false; if (other.getConditionCheck() != null && other.getConditionCheck().equals(this.getConditionCheck()) == false) return false; if (other.getPut() == null ^ this.getPut() == null) return false; if (other.getPut() != null && other.getPut().equals(this.getPut()) == false) return false; if (other.getDelete() == null ^ this.getDelete() == null) return false; if (other.getDelete() != null && other.getDelete().equals(this.getDelete()) == false) return false; if (other.getUpdate() == null ^ this.getUpdate() == null) return false; if (other.getUpdate() != null && other.getUpdate().equals(this.getUpdate()) == false) return false; return true; }
/** * <p> * A request to perform a check item operation. * </p> * * @param conditionCheck * A request to perform a check item operation. * @return Returns a reference to this object so that method calls can be chained together. */ public TransactWriteItem withConditionCheck(ConditionCheck conditionCheck) { setConditionCheck(conditionCheck); return this; }
/** * <p> * A request to perform a <code>DeleteItem</code> operation. * </p> * * @param delete * A request to perform a <code>DeleteItem</code> operation. * @return Returns a reference to this object so that method calls can be chained together. */ public TransactWriteItem withDelete(Delete delete) { setDelete(delete); return this; }
/** * 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 (getConditionCheck() != null) sb.append("ConditionCheck: ").append(getConditionCheck()).append(","); if (getPut() != null) sb.append("Put: ").append(getPut()).append(","); if (getDelete() != null) sb.append("Delete: ").append(getDelete()).append(","); if (getUpdate() != null) sb.append("Update: ").append(getUpdate()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(TransactWriteItem transactWriteItem, ProtocolMarshaller protocolMarshaller) { if (transactWriteItem == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(transactWriteItem.getConditionCheck(), CONDITIONCHECK_BINDING); protocolMarshaller.marshall(transactWriteItem.getPut(), PUT_BINDING); protocolMarshaller.marshall(transactWriteItem.getDelete(), DELETE_BINDING); protocolMarshaller.marshall(transactWriteItem.getUpdate(), UPDATE_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 + ((getConditionCheck() == null) ? 0 : getConditionCheck().hashCode()); hashCode = prime * hashCode + ((getPut() == null) ? 0 : getPut().hashCode()); hashCode = prime * hashCode + ((getDelete() == null) ? 0 : getDelete().hashCode()); hashCode = prime * hashCode + ((getUpdate() == null) ? 0 : getUpdate().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TransactWriteItem == false) return false; TransactWriteItem other = (TransactWriteItem) obj; if (other.getConditionCheck() == null ^ this.getConditionCheck() == null) return false; if (other.getConditionCheck() != null && other.getConditionCheck().equals(this.getConditionCheck()) == false) return false; if (other.getPut() == null ^ this.getPut() == null) return false; if (other.getPut() != null && other.getPut().equals(this.getPut()) == false) return false; if (other.getDelete() == null ^ this.getDelete() == null) return false; if (other.getDelete() != null && other.getDelete().equals(this.getDelete()) == false) return false; if (other.getUpdate() == null ^ this.getUpdate() == null) return false; if (other.getUpdate() != null && other.getUpdate().equals(this.getUpdate()) == false) return false; return true; }
/** * 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 (getConditionCheck() != null) sb.append("ConditionCheck: ").append(getConditionCheck()).append(","); if (getPut() != null) sb.append("Put: ").append(getPut()).append(","); if (getDelete() != null) sb.append("Delete: ").append(getDelete()).append(","); if (getUpdate() != null) sb.append("Update: ").append(getUpdate()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(TransactWriteItem transactWriteItem, ProtocolMarshaller protocolMarshaller) { if (transactWriteItem == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(transactWriteItem.getConditionCheck(), CONDITIONCHECK_BINDING); protocolMarshaller.marshall(transactWriteItem.getPut(), PUT_BINDING); protocolMarshaller.marshall(transactWriteItem.getDelete(), DELETE_BINDING); protocolMarshaller.marshall(transactWriteItem.getUpdate(), UPDATE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }