mirror of
https://github.com/google/nomulus
synced 2026-01-07 14:05:44 +00:00
Replace loadByUniqueId() with methods that don't overload unique id
It is replaced by loadByForeignKey(), which does the same thing that loadByUniqueId() did for contacts, hosts, and domains, and also loadDomainApplication(), which loads domain application by ROID. This eliminates the ugly mode-switching of attemping to load by other foreign key or ROID. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=133980156
This commit is contained in:
@@ -17,7 +17,7 @@ package google.registry.mapreduce.inputs;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth.assert_;
|
||||
import static google.registry.mapreduce.inputs.EppResourceInputs.createChildEntityInput;
|
||||
import static google.registry.model.EppResourceUtils.loadByUniqueId;
|
||||
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
||||
import static google.registry.model.index.EppResourceIndexBucket.getBucketKey;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.newDomainResource;
|
||||
@@ -102,7 +102,7 @@ public class ChildEntityInputTest {
|
||||
.build());
|
||||
contactHistoryEntry = persistResource(
|
||||
new HistoryEntry.Builder()
|
||||
.setParent(loadByUniqueId(ContactResource.class, "contact1234", now))
|
||||
.setParent(loadByForeignKey(ContactResource.class, "contact1234", now))
|
||||
.setModificationTime(now)
|
||||
.build());
|
||||
oneTimeA = persistResource(
|
||||
|
||||
Reference in New Issue
Block a user