// Get DfpUser from "~/dfp.properties".
DfpUser user = new DfpUser();
// Get the CreativeTemplateService.
CreativeTemplateServiceInterface creativeTemplateService =
user.getService(DfpService.V201306.CREATIVE_TEMPLATE_SERVICE);
// Create a statement to only select system defined creative templates.
Statement filterStatement =
new StatementBuilder("WHERE type = :creativeTemplateType LIMIT 500").putValue(
"creativeTemplateType", CreativeTemplateType.SYSTEM_DEFINED.toString()).toStatement();
// Get creative templates by statement.
CreativeTemplatePage page =
creativeTemplateService.getCreativeTemplatesByStatement(filterStatement);
if (page.getResults() != null) {
int i = page.getStartIndex();
for (CreativeTemplate creativeTemplate : page.getResults()) {
System.out.println(i + ") Creative template with ID \"" + creativeTemplate.getId()