public AbstractSpecWithPrimaryKey < T > withPrimaryKey ( String hashKeyName , Object hashKeyValue , String rangeKeyName , Object rangeKeyValue ) { if ( hashKeyName == null ) throw new IllegalArgumentException ( "Invalid hash key name" ) ; if ( rangeKeyName == null ) throw new IllegalArgumentException ( "Invalid range key name" ) ; if ( hashKeyName . equals ( rangeKeyName ) ) throw new IllegalArgumentException ( "Names of hash and range keys must not be the same" ) ; withPrimaryKey ( new PrimaryKey ( hashKeyName , hashKeyValue , rangeKeyName , rangeKeyValue ) ) ; return this ; }
Sets the primary key with the specified hash key and range key .