@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode()); hashCode = prime * hashCode + ((getIndexName() == null) ? 0 : getIndexName().hashCode()); hashCode = prime * hashCode + ((getSelect() == null) ? 0 : getSelect().hashCode()); hashCode = prime * hashCode + ((getAttributesToGet() == null) ? 0 : getAttributesToGet().hashCode()); hashCode = prime * hashCode + ((getLimit() == null) ? 0 : getLimit().hashCode()); hashCode = prime * hashCode + ((getConsistentRead() == null) ? 0 : getConsistentRead().hashCode()); hashCode = prime * hashCode + ((getKeyConditions() == null) ? 0 : getKeyConditions().hashCode()); hashCode = prime * hashCode + ((getQueryFilter() == null) ? 0 : getQueryFilter().hashCode()); hashCode = prime * hashCode + ((getConditionalOperator() == null) ? 0 : getConditionalOperator().hashCode()); hashCode = prime * hashCode + ((getScanIndexForward() == null) ? 0 : getScanIndexForward().hashCode()); hashCode = prime * hashCode + ((getExclusiveStartKey() == null) ? 0 : getExclusiveStartKey().hashCode()); hashCode = prime * hashCode + ((getReturnConsumedCapacity() == null) ? 0 : getReturnConsumedCapacity().hashCode()); hashCode = prime * hashCode + ((getProjectionExpression() == null) ? 0 : getProjectionExpression().hashCode()); hashCode = prime * hashCode + ((getFilterExpression() == null) ? 0 : getFilterExpression().hashCode()); hashCode = prime * hashCode + ((getKeyConditionExpression() == null) ? 0 : getKeyConditionExpression().hashCode()); hashCode = prime * hashCode + ((getExpressionAttributeNames() == null) ? 0 : getExpressionAttributeNames().hashCode()); hashCode = prime * hashCode + ((getExpressionAttributeValues() == null) ? 0 : getExpressionAttributeValues().hashCode()); return hashCode; }
if (other.getAttributesToGet() != null && other.getAttributesToGet().equals(this.getAttributesToGet()) == false) return false; if (other.getLimit() == null ^ this.getLimit() == null) return false; if (other.getLimit() != null && other.getLimit().equals(this.getLimit()) == false) return false; if (other.getConsistentRead() == null ^ this.getConsistentRead() == null)
/** * Marshall the given parameter object. */ public void marshall(QueryRequest queryRequest, ProtocolMarshaller protocolMarshaller) { if (queryRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(queryRequest.getTableName(), TABLENAME_BINDING); protocolMarshaller.marshall(queryRequest.getIndexName(), INDEXNAME_BINDING); protocolMarshaller.marshall(queryRequest.getSelect(), SELECT_BINDING); protocolMarshaller.marshall(queryRequest.getAttributesToGet(), ATTRIBUTESTOGET_BINDING); protocolMarshaller.marshall(queryRequest.getLimit(), LIMIT_BINDING); protocolMarshaller.marshall(queryRequest.getConsistentRead(), CONSISTENTREAD_BINDING); protocolMarshaller.marshall(queryRequest.getKeyConditions(), KEYCONDITIONS_BINDING); protocolMarshaller.marshall(queryRequest.getQueryFilter(), QUERYFILTER_BINDING); protocolMarshaller.marshall(queryRequest.getConditionalOperator(), CONDITIONALOPERATOR_BINDING); protocolMarshaller.marshall(queryRequest.getScanIndexForward(), SCANINDEXFORWARD_BINDING); protocolMarshaller.marshall(queryRequest.getExclusiveStartKey(), EXCLUSIVESTARTKEY_BINDING); protocolMarshaller.marshall(queryRequest.getReturnConsumedCapacity(), RETURNCONSUMEDCAPACITY_BINDING); protocolMarshaller.marshall(queryRequest.getProjectionExpression(), PROJECTIONEXPRESSION_BINDING); protocolMarshaller.marshall(queryRequest.getFilterExpression(), FILTEREXPRESSION_BINDING); protocolMarshaller.marshall(queryRequest.getKeyConditionExpression(), KEYCONDITIONEXPRESSION_BINDING); protocolMarshaller.marshall(queryRequest.getExpressionAttributeNames(), EXPRESSIONATTRIBUTENAMES_BINDING); protocolMarshaller.marshall(queryRequest.getExpressionAttributeValues(), EXPRESSIONATTRIBUTEVALUES_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
&& other.getAttributesToGet().equals(this.getAttributesToGet()) == false) return false; if (other.getLimit() == null ^ this.getLimit() == null) return false; if (other.getLimit() != null && other.getLimit().equals(this.getLimit()) == false) return false; if (other.getConsistentRead() == null ^ this.getConsistentRead() == null)
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode()); hashCode = prime * hashCode + ((getIndexName() == null) ? 0 : getIndexName().hashCode()); hashCode = prime * hashCode + ((getSelect() == null) ? 0 : getSelect().hashCode()); hashCode = prime * hashCode + ((getAttributesToGet() == null) ? 0 : getAttributesToGet().hashCode()); hashCode = prime * hashCode + ((getLimit() == null) ? 0 : getLimit().hashCode()); hashCode = prime * hashCode + ((getConsistentRead() == null) ? 0 : getConsistentRead().hashCode()); hashCode = prime * hashCode + ((getKeyConditions() == null) ? 0 : getKeyConditions().hashCode()); hashCode = prime * hashCode + ((getQueryFilter() == null) ? 0 : getQueryFilter().hashCode()); hashCode = prime * hashCode + ((getConditionalOperator() == null) ? 0 : getConditionalOperator().hashCode()); hashCode = prime * hashCode + ((getScanIndexForward() == null) ? 0 : getScanIndexForward().hashCode()); hashCode = prime * hashCode + ((getExclusiveStartKey() == null) ? 0 : getExclusiveStartKey().hashCode()); hashCode = prime * hashCode + ((getReturnConsumedCapacity() == null) ? 0 : getReturnConsumedCapacity().hashCode()); hashCode = prime * hashCode + ((getProjectionExpression() == null) ? 0 : getProjectionExpression().hashCode()); hashCode = prime * hashCode + ((getFilterExpression() == null) ? 0 : getFilterExpression().hashCode()); hashCode = prime * hashCode + ((getKeyConditionExpression() == null) ? 0 : getKeyConditionExpression().hashCode()); hashCode = prime * hashCode + ((getExpressionAttributeNames() == null) ? 0 : getExpressionAttributeNames().hashCode()); hashCode = prime * hashCode + ((getExpressionAttributeValues() == null) ? 0 : getExpressionAttributeValues().hashCode()); return hashCode; }
if (other.getAttributesToGet() != null && other.getAttributesToGet().equals(this.getAttributesToGet()) == false) return false; if (other.getLimit() == null ^ this.getLimit() == null) return false; if (other.getLimit() != null && other.getLimit().equals(this.getLimit()) == false) return false; if (other.getConsistentRead() == null ^ this.getConsistentRead() == null)
/** * Marshall the given parameter object. */ public void marshall(QueryRequest queryRequest, ProtocolMarshaller protocolMarshaller) { if (queryRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(queryRequest.getTableName(), TABLENAME_BINDING); protocolMarshaller.marshall(queryRequest.getIndexName(), INDEXNAME_BINDING); protocolMarshaller.marshall(queryRequest.getSelect(), SELECT_BINDING); protocolMarshaller.marshall(queryRequest.getAttributesToGet(), ATTRIBUTESTOGET_BINDING); protocolMarshaller.marshall(queryRequest.getLimit(), LIMIT_BINDING); protocolMarshaller.marshall(queryRequest.getConsistentRead(), CONSISTENTREAD_BINDING); protocolMarshaller.marshall(queryRequest.getKeyConditions(), KEYCONDITIONS_BINDING); protocolMarshaller.marshall(queryRequest.getQueryFilter(), QUERYFILTER_BINDING); protocolMarshaller.marshall(queryRequest.getConditionalOperator(), CONDITIONALOPERATOR_BINDING); protocolMarshaller.marshall(queryRequest.getScanIndexForward(), SCANINDEXFORWARD_BINDING); protocolMarshaller.marshall(queryRequest.getExclusiveStartKey(), EXCLUSIVESTARTKEY_BINDING); protocolMarshaller.marshall(queryRequest.getReturnConsumedCapacity(), RETURNCONSUMEDCAPACITY_BINDING); protocolMarshaller.marshall(queryRequest.getProjectionExpression(), PROJECTIONEXPRESSION_BINDING); protocolMarshaller.marshall(queryRequest.getFilterExpression(), FILTEREXPRESSION_BINDING); protocolMarshaller.marshall(queryRequest.getKeyConditionExpression(), KEYCONDITIONEXPRESSION_BINDING); protocolMarshaller.marshall(queryRequest.getExpressionAttributeNames(), EXPRESSIONATTRIBUTENAMES_BINDING); protocolMarshaller.marshall(queryRequest.getExpressionAttributeValues(), EXPRESSIONATTRIBUTEVALUES_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
public static QueryRequest copyQueryRequest(QueryRequest queryRequest) { QueryRequest copiedQueryRequest = new QueryRequest().withAttributesToGet(queryRequest.getAttributesToGet()) .withConsistentRead(queryRequest.getConsistentRead()) .withExclusiveStartKey(queryRequest.getExclusiveStartKey()).withIndexName(queryRequest.getIndexName()) .withKeyConditions(queryRequest.getKeyConditions()).withLimit(queryRequest.getLimit()) .withReturnConsumedCapacity(queryRequest.getReturnConsumedCapacity()) .withScanIndexForward(queryRequest.getScanIndexForward()).withSelect(queryRequest.getSelect()) .withTableName(queryRequest.getTableName()); return copiedQueryRequest; } }