new StatementBuilder("WHERE id IN ( " + StringUtils.join(imageCreativeIds, ',')
+ ") and creativeType = :creativeType LIMIT 500").putValue("creativeType",
ImageCreative.class.getSimpleName());
// Retrieve all creatives which match.
CreativePage page =
creativeService.getCreativesByStatement(statementBuilder.toStatement());
if (page.getResults() != null) {
Creative[] creatives = page.getResults();
long[] oldIds = new long[creatives.length];
for (int i = 0; i < creatives.length; i++) {
ImageCreative imageCreative = (ImageCreative) creatives[i];
oldIds[i] = imageCreative.getId();
imageCreative.setId(null);