/** * Adds a hash-only primary key to be included in the batch get-item * operation. * * @param hashKeyName name of the hash key attribute name * @param hashKeyValue name of the hash key value * @return the current instance for method chaining purposes */ public TableKeysAndAttributes addHashOnlyPrimaryKey( String hashKeyName, Object hashKeyValue) { this.addPrimaryKey(new PrimaryKey(hashKeyName, hashKeyValue)); return this; }
/** * Adds multiple hash-only primary keys to be included in the batch get-item * operation. * * @param hashKeyName name of the hash key attribute name * @param hashKeyValues multiple hash key values * @return the current instance for method chaining purposes */ public TableKeysAndAttributes addHashOnlyPrimaryKeys(String hashKeyName, Object ... hashKeyValues) { for (Object hashKeyValue: hashKeyValues) { this.addPrimaryKey(new PrimaryKey(hashKeyName, hashKeyValue)); } return this; }
/** * Adds a primary key (that consists of a hash-key and a range-key) to be * included in the batch get-item operation. * * @param hashKeyName hash key attribute name * @param hashKeyValue hash key value * @param rangeKeyName range key attribute name * @param rangeKeyValue range key value * @return the current instance for method chaining purposes */ public TableKeysAndAttributes addHashAndRangePrimaryKey( String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue) { this.addPrimaryKey( new PrimaryKey() .addComponent(hashKeyName, hashKeyValue) .addComponent(rangeKeyName, rangeKeyValue)); return this; }
Object hashKeyValue = alternatingHashRangeKeyValues[i]; Object rangeKeyValue = alternatingHashRangeKeyValues[i+1]; this.addPrimaryKey( new PrimaryKey() .addComponent(hashKeyName, hashKeyValue)
/** * Adds a hash-only primary key to be included in the batch get-item * operation. * * @param hashKeyName name of the hash key attribute name * @param hashKeyValue name of the hash key value * @return the current instance for method chaining purposes */ public TableKeysAndAttributes addHashOnlyPrimaryKey( String hashKeyName, Object hashKeyValue) { this.addPrimaryKey(new PrimaryKey(hashKeyName, hashKeyValue)); return this; }
/** * Adds multiple hash-only primary keys to be included in the batch get-item * operation. * * @param hashKeyName name of the hash key attribute name * @param hashKeyValues multiple hash key values * @return the current instance for method chaining purposes */ public TableKeysAndAttributes addHashOnlyPrimaryKeys(String hashKeyName, Object ... hashKeyValues) { for (Object hashKeyValue: hashKeyValues) { this.addPrimaryKey(new PrimaryKey(hashKeyName, hashKeyValue)); } return this; }
Object hashKeyValue = alternatingHashRangeKeyValues[i]; Object rangeKeyValue = alternatingHashRangeKeyValues[i+1]; this.addPrimaryKey( new PrimaryKey() .addComponent(hashKeyName, hashKeyValue)
/** * Adds a primary key (that consists of a hash-key and a range-key) to be * included in the batch get-item operation. * * @param hashKeyName hash key attribute name * @param hashKeyValue hash key value * @param rangeKeyName range key attribute name * @param rangeKeyValue range key value * @return the current instance for method chaining purposes */ public TableKeysAndAttributes addHashAndRangePrimaryKey( String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue) { this.addPrimaryKey( new PrimaryKey() .addComponent(hashKeyName, hashKeyValue) .addComponent(rangeKeyName, rangeKeyValue)); return this; }