Move premium list static helper methods into their own class

It was kind of messy having all of that logic living alongside the
entities themselves.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148498024
This commit is contained in:
mcilwain 2017-02-24 13:38:59 -08:00 committed by Ben McIlwain
parent 388dd1055e
commit ea4e471c04
12 changed files with 523 additions and 421 deletions

View file

@ -27,7 +27,7 @@ import static google.registry.model.EppResourceUtils.createDomainRepoId;
import static google.registry.model.EppResourceUtils.createRepoId;
import static google.registry.model.domain.launch.ApplicationStatus.VALIDATED;
import static google.registry.model.ofy.ObjectifyService.ofy;
import static google.registry.model.registry.label.PremiumList.parentEntriesOnRevision;
import static google.registry.model.registry.label.PremiumListUtils.parentPremiumListEntriesOnRevision;
import static google.registry.pricing.PricingEngineProxy.getDomainRenewCost;
import static google.registry.util.CollectionUtils.difference;
import static google.registry.util.CollectionUtils.union;
@ -365,7 +365,7 @@ public class DatastoreHelper {
.now();
ofy()
.saveWithoutBackup()
.entities(parentEntriesOnRevision(entries.values(), Key.create(revision)))
.entities(parentPremiumListEntriesOnRevision(entries.values(), Key.create(revision)))
.now();
return ofy().load().entity(premiumList).now();
}