CreativeWrapperServiceInterface creativeWrapperService =
user.getService(DfpService.V201311.CREATIVE_WRAPPER_SERVICE);
// Create a statement to select only active creative wrappers.
String statementText = "WHERE status = :status LIMIT 500";
Statement filterStatement =
new StatementBuilder(statementText)
.putValue("status", CreativeWrapperStatus.ACTIVE.toString()).toStatement();
// Set defaults for page and offset.
CreativeWrapperPage page = new CreativeWrapperPage();
int offset = 0;
do {
// Create a statement to get all active creative wrappers.
filterStatement.setQuery(statementText + " OFFSET " + offset);
// Get creative wrappers by statement.
page = creativeWrapperService.getCreativeWrappersByStatement(filterStatement);
if (page.getResults() != null) {