public TableWriteItems withPrimaryKeysToDelete ( PrimaryKey ... primaryKeysToDelete ) { if ( primaryKeysToDelete == null ) this . primaryKeysToDelete = null ; else { Set < String > pkNameSet = null ; for ( PrimaryKey pk : primaryKeysToDelete ) { if ( pkNameSet == null ) pkNameSet = pk . getComponentNameSet ( ) ; else { if ( ! pkNameSet . equals ( pk . getComponentNameSet ( ) ) ) { throw new IllegalArgumentException ( "primary key attribute names must be consistent for the specified primary keys" ) ; } } } this . primaryKeysToDelete = new ArrayList < PrimaryKey > ( Arrays . asList ( primaryKeysToDelete ) ) ; } return this ; }
Used to specify multiple primary keys to be deleted from the current table . A primary key could consist of either a hash - key or both a hash - key and a range - key depending on the schema of the table .