Load foreign keys more efficiently for xml marshalling.

Before this CL, each contact and host was independently
loaded via the ReferenceUnion adapter. Since fields are
processed serially by JAXB, this means worst-case there
were 17 loads, best case 3 (the 3 required contacts) and
usual case 5-6 (some hosts). This CL reduces that to 1
datastore roundtrip in all cases.

A side effect of this CL is the further hollowing-out of
ReferenceUnion, since it no longer is involved in
marshalling at all.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123712842
This commit is contained in:
cgoldfeder 2016-05-31 20:41:22 -07:00 committed by Ben McIlwain
parent 5fb06de203
commit 23b66b0bb4
8 changed files with 140 additions and 112 deletions

View file

@ -43,9 +43,9 @@ import javax.xml.bind.annotation.XmlType;
"fullyQualifiedDomainName",
"repoId",
"status",
"registrant",
"contacts",
"nameservers",
"marshalledRegistrant",
"marshalledContacts",
"marshalledNameservers",
"currentSponsorClientId",
"creationClientId",
"creationTime",