// Get DfpUser from "~/dfp.properties".
DfpUser user = new DfpUser();
// Get the ContactService.
ContactServiceInterface contactService =
user.getService(DfpService.V201311.CONTACT_SERVICE);
// Create a statement to only select contacts that aren't invited yet.
Statement filterStatement =
new StatementBuilder("WHERE status = :status LIMIT 500")
.putValue("status", ContactStatus.UNINVITED.toString()).toStatement();
// Get contacts by statement.
ContactPage page = contactService.getContactsByStatement(filterStatement);
if (page.getResults() != null) {
int i = page.getStartIndex();
for (Contact contact : page.getResults()) {
System.out.printf(