public List<String> getAttributesToGet() { return getRequest().getAttributesToGet(); }
/** * 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 (getTableName() != null) sb.append("TableName: ").append(getTableName()).append(","); if (getKey() != null) sb.append("Key: ").append(getKey()).append(","); if (getAttributesToGet() != null) sb.append("AttributesToGet: ").append(getAttributesToGet()).append(","); if (getConsistentRead() != null) sb.append("ConsistentRead: ").append(getConsistentRead()).append(","); if (getReturnConsumedCapacity() != null) sb.append("ReturnConsumedCapacity: ").append(getReturnConsumedCapacity()).append(","); if (getProjectionExpression() != null) sb.append("ProjectionExpression: ").append(getProjectionExpression()).append(","); if (getExpressionAttributeNames() != null) sb.append("ExpressionAttributeNames: ").append(getExpressionAttributeNames()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode()); hashCode = prime * hashCode + ((getKey() == null) ? 0 : getKey().hashCode()); hashCode = prime * hashCode + ((getAttributesToGet() == null) ? 0 : getAttributesToGet().hashCode()); hashCode = prime * hashCode + ((getConsistentRead() == null) ? 0 : getConsistentRead().hashCode()); hashCode = prime * hashCode + ((getReturnConsumedCapacity() == null) ? 0 : getReturnConsumedCapacity().hashCode()); hashCode = prime * hashCode + ((getProjectionExpression() == null) ? 0 : getProjectionExpression().hashCode()); hashCode = prime * hashCode + ((getExpressionAttributeNames() == null) ? 0 : getExpressionAttributeNames().hashCode()); return hashCode; }
if (other.getKey() != null && other.getKey().equals(this.getKey()) == false) return false; if (other.getAttributesToGet() == null ^ this.getAttributesToGet() == null) return false; if (other.getAttributesToGet() != null && other.getAttributesToGet().equals(this.getAttributesToGet()) == false) return false; if (other.getConsistentRead() == null ^ this.getConsistentRead() == null)
/** * Marshall the given parameter object. */ public void marshall(GetItemRequest getItemRequest, ProtocolMarshaller protocolMarshaller) { if (getItemRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(getItemRequest.getTableName(), TABLENAME_BINDING); protocolMarshaller.marshall(getItemRequest.getKey(), KEY_BINDING); protocolMarshaller.marshall(getItemRequest.getAttributesToGet(), ATTRIBUTESTOGET_BINDING); protocolMarshaller.marshall(getItemRequest.getConsistentRead(), CONSISTENTREAD_BINDING); protocolMarshaller.marshall(getItemRequest.getReturnConsumedCapacity(), RETURNCONSUMEDCAPACITY_BINDING); protocolMarshaller.marshall(getItemRequest.getProjectionExpression(), PROJECTIONEXPRESSION_BINDING); protocolMarshaller.marshall(getItemRequest.getExpressionAttributeNames(), EXPRESSIONATTRIBUTENAMES_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
if (getAttributesToGet() == null) { this.attributesToGet = new java.util.ArrayList<String>(attributesToGet.length);
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode()); hashCode = prime * hashCode + ((getKey() == null) ? 0 : getKey().hashCode()); hashCode = prime * hashCode + ((getAttributesToGet() == null) ? 0 : getAttributesToGet().hashCode()); hashCode = prime * hashCode + ((getConsistentRead() == null) ? 0 : getConsistentRead().hashCode()); hashCode = prime * hashCode + ((getReturnConsumedCapacity() == null) ? 0 : getReturnConsumedCapacity() .hashCode()); hashCode = prime * hashCode + ((getProjectionExpression() == null) ? 0 : getProjectionExpression().hashCode()); hashCode = prime * hashCode + ((getExpressionAttributeNames() == null) ? 0 : getExpressionAttributeNames() .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 (getTableName() != null) sb.append("TableName: " + getTableName() + ","); if (getKey() != null) sb.append("Key: " + getKey() + ","); if (getAttributesToGet() != null) sb.append("AttributesToGet: " + getAttributesToGet() + ","); if (getConsistentRead() != null) sb.append("ConsistentRead: " + getConsistentRead() + ","); if (getReturnConsumedCapacity() != null) sb.append("ReturnConsumedCapacity: " + getReturnConsumedCapacity() + ","); if (getProjectionExpression() != null) sb.append("ProjectionExpression: " + getProjectionExpression() + ","); if (getExpressionAttributeNames() != null) sb.append("ExpressionAttributeNames: " + getExpressionAttributeNames()); sb.append("}"); return sb.toString(); }
if (other.getKey() != null && other.getKey().equals(this.getKey()) == false) return false; if (other.getAttributesToGet() == null ^ this.getAttributesToGet() == null) return false; if (other.getAttributesToGet() != null && other.getAttributesToGet().equals(this.getAttributesToGet()) == false) return false; if (other.getConsistentRead() == null ^ this.getConsistentRead() == null)
if (getItemRequest.getAttributesToGet() != null) { java.util.List<String> attributesToGet = getItemRequest.getAttributesToGet(); jsonWriter.name("AttributesToGet"); jsonWriter.beginArray();
public List<String> getAttributesToGet() { return getRequest().getAttributesToGet(); }
@Override protected void doValidate(String txId, TransactionManager txManager) { validateAttributes(this, request.getKey(), txId, txManager); validateAttributes(this, request.getAttributesToGet(), txId, txManager); } }
public GetItemResult getItem(GetItemRequest request, IsolationLevel isolationLevel) { if (request.getAttributesToGet() != null) { Set<String> attributesToGet = new HashSet<String>(request.getAttributesToGet()); attributesToGet.addAll(Transaction.SPECIAL_ATTR_NAMES); request.setAttributesToGet(attributesToGet); } GetItemResult result = getClient().getItem(request); Map<String, AttributeValue> item = getReadIsolationHandler(isolationLevel).handleItem(result.getItem(), request.getAttributesToGet(), request.getTableName()); Transaction.stripSpecialAttributes(item); result.setItem(item); return result; }
/** * 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 (getTableName() != null) sb.append("TableName: ").append(getTableName()).append(","); if (getKey() != null) sb.append("Key: ").append(getKey()).append(","); if (getAttributesToGet() != null) sb.append("AttributesToGet: ").append(getAttributesToGet()).append(","); if (getConsistentRead() != null) sb.append("ConsistentRead: ").append(getConsistentRead()).append(","); if (getReturnConsumedCapacity() != null) sb.append("ReturnConsumedCapacity: ").append(getReturnConsumedCapacity()).append(","); if (getProjectionExpression() != null) sb.append("ProjectionExpression: ").append(getProjectionExpression()).append(","); if (getExpressionAttributeNames() != null) sb.append("ExpressionAttributeNames: ").append(getExpressionAttributeNames()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode()); hashCode = prime * hashCode + ((getKey() == null) ? 0 : getKey().hashCode()); hashCode = prime * hashCode + ((getAttributesToGet() == null) ? 0 : getAttributesToGet().hashCode()); hashCode = prime * hashCode + ((getConsistentRead() == null) ? 0 : getConsistentRead().hashCode()); hashCode = prime * hashCode + ((getReturnConsumedCapacity() == null) ? 0 : getReturnConsumedCapacity().hashCode()); hashCode = prime * hashCode + ((getProjectionExpression() == null) ? 0 : getProjectionExpression().hashCode()); hashCode = prime * hashCode + ((getExpressionAttributeNames() == null) ? 0 : getExpressionAttributeNames().hashCode()); return hashCode; }
if (other.getKey() != null && other.getKey().equals(this.getKey()) == false) return false; if (other.getAttributesToGet() == null ^ this.getAttributesToGet() == null) return false; if (other.getAttributesToGet() != null && other.getAttributesToGet().equals(this.getAttributesToGet()) == false) return false; if (other.getConsistentRead() == null ^ this.getConsistentRead() == null)
/** * Marshall the given parameter object. */ public void marshall(GetItemRequest getItemRequest, ProtocolMarshaller protocolMarshaller) { if (getItemRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(getItemRequest.getTableName(), TABLENAME_BINDING); protocolMarshaller.marshall(getItemRequest.getKey(), KEY_BINDING); protocolMarshaller.marshall(getItemRequest.getAttributesToGet(), ATTRIBUTESTOGET_BINDING); protocolMarshaller.marshall(getItemRequest.getConsistentRead(), CONSISTENTREAD_BINDING); protocolMarshaller.marshall(getItemRequest.getReturnConsumedCapacity(), RETURNCONSUMEDCAPACITY_BINDING); protocolMarshaller.marshall(getItemRequest.getProjectionExpression(), PROJECTIONEXPRESSION_BINDING); protocolMarshaller.marshall(getItemRequest.getExpressionAttributeNames(), EXPRESSIONATTRIBUTENAMES_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
} else if(lockingRequest instanceof GetItem && isTransient(lockedItem)) { return null; // If the item has only a read lock and is transient } else if(getRequest.getAttributesToGet() != null) { Set<String> attributesToGet = new HashSet<String>(getRequest.getAttributesToGet()); Iterator<Map.Entry<String, AttributeValue>> it = lockedItem.entrySet().iterator(); while(it.hasNext()) {