public TableKeysAndAttributes addPrimaryKey ( PrimaryKey primaryKey ) { if ( primaryKey != null ) { if ( primaryKeys == null ) primaryKeys = new ArrayList < PrimaryKey > ( ) ; checkConsistency ( primaryKey ) ; this . primaryKeys . add ( primaryKey ) ; } return this ; }
Adds a primary key to be included in the batch get - item operation . 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 .