public UpdateItemResult unmarshall(JsonUnmarshallerContext context) throws Exception { UpdateItemResult updateItemResult = new UpdateItemResult();
public UpdateItemResult unmarshall(JsonUnmarshallerContext context) throws Exception { UpdateItemResult updateItemResult = new UpdateItemResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Attributes")) { updateItemResult.setAttributes(new MapUnmarshaller<AttributeValue>( AttributeValueJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else if (name.equals("ConsumedCapacity")) { updateItemResult.setConsumedCapacity(ConsumedCapacityJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("ItemCollectionMetrics")) { updateItemResult.setItemCollectionMetrics(ItemCollectionMetricsJsonUnmarshaller .getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return updateItemResult; }
/** * Adds an UpdateItem request to the transaction * * @param request * @throws DuplicateRequestException if the item in the request is already involved in this transaction * @throws ItemNotLockedException when another transaction is confirmed to have the lock on the item in the request * @throws TransactionCompletedException when the transaction has already completed * @throws TransactionNotFoundException if the transaction does not exist * @throws TransactionException on unexpected errors or unresolvable OCC contention */ public UpdateItemResult updateItem(UpdateItemRequest request) throws DuplicateRequestException, ItemNotLockedException, TransactionCompletedException, TransactionNotFoundException, TransactionException { UpdateItem wrappedRequest = new UpdateItem(); wrappedRequest.setRequest(request); Map<String, AttributeValue> item = driveRequest(wrappedRequest); stripSpecialAttributes(item); return new UpdateItemResult().withAttributes(item); }
public UpdateItemResult unmarshall(JsonUnmarshallerContext context) throws Exception { UpdateItemResult updateItemResult = new UpdateItemResult();