// Get DfpUser from "~/dfp.properties".
DfpUser user = new DfpUser();
// Get the ThirdPartySlotService.
ThirdPartySlotServiceInterface thirdPartySlotService =
user.getService(DfpService.V201302.THIRD_PARTY_SLOT_SERVICE);
// Sets defaults for page and filterStatement.
ThirdPartySlotPage page = new ThirdPartySlotPage();
Statement filterStatement =
new StatementBuilder("WHERE status = :status LIMIT 500 ").putValue("status",
ThirdPartySlotStatus.ARCHIVED.toString()).toStatement();
// Get third party slots by statement.
page = thirdPartySlotService.getThirdPartySlotsByStatement(filterStatement);
if (page.getResults() != null) {
int i = page.getStartIndex();
for (ThirdPartySlot thirdPartySlot : page.getResults()) {
System.out.println(i + ") Third party slot with ID \"" + thirdPartySlot.getId()