// Default for total result set size.
int totalResultSetSize = 0;
do {
// Get placements by statement.
PlacementPage page =
placementService.getPlacementsByStatement(statementBuilder.toStatement());
if (page.getResults() != null) {
totalResultSetSize = page.getTotalResultSetSize();
int i = page.getStartIndex();
for (Placement placement : page.getResults()) {
System.out.printf(
"%d) Placement with ID \"%d\" and name \"%s\" was found.\n", i++,
placement.getId(), placement.getName());
}
}