title: AWS DynamoDB get multiple items by String an range with Java
body: <p>I am trying to understand a DynamoDB and I really need help, please! I created a table and put some values there. But I completely don't understand how to get the item. And any docs which I found doesn't help.
  So I have a table with Primary partition key - channelID (String) and Primary sort key  timestamp (Number). There are a few objects on my Primary partition key but each object by Primary partition key + Primary sort key is uniq. Everything I tried didn't work for me. I need just get 10 items with same channelID with order by timestamp desc. Help me please!
  My Java code:</p>
  
  <pre><code>String partitionKey = channelID;
  
              DynamoDBMapper mapper = new DynamoDBMapper(dynamoDBClient);
  
              NewsEntityItem newsKey = new NewsEntityItem();
              newsKey.setChannelID(partitionKey);
  
              DynamoDBQueryExpression&lt;NewsEntityItem&gt; queryExpression = new DynamoDBQueryExpression&lt;NewsEntityItem&gt;()
                      .withHashKeyValues(newsKey);
  
              List&lt;NewsEntityItem&gt; theResult = mapper.query(NewsEntityItem.class, queryExpression);
  
              for (NewsEntityItem reply : theResult) {
                  System.out.print(reply.toString());
              }
  </code></pre>