mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Export Premium names to Drive
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=212509587
This commit is contained in:
parent
dbb1f1649d
commit
80b0e6297b
10 changed files with 393 additions and 7 deletions
|
@ -213,6 +213,15 @@ public final class PremiumListUtils {
|
|||
ofy().transactNew(() -> ofy().delete().key(premiumList.getRevisionKey()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all {@link PremiumListEntry PremiumListEntries} in the given {@code premiumList}.
|
||||
*
|
||||
* <p>This is an expensive operation and should only be used when the entire list is required.
|
||||
*/
|
||||
public static Iterable<PremiumListEntry> loadPremiumListEntries(PremiumList premiumList) {
|
||||
return ofy().load().type(PremiumListEntry.class).ancestor(premiumList.revisionKey).iterable();
|
||||
}
|
||||
|
||||
/** Returns whether a PremiumList of the given name exists, bypassing the cache. */
|
||||
public static boolean doesPremiumListExist(String name) {
|
||||
return ofy().load().key(Key.create(getCrossTldKey(), PremiumList.class, name)).now() != null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue