google-nomulus/java/google/registry/flows/domain
mcilwain 4491b7b909 Make loadByForeignKey() and related methods return Optional
This is safer and addresses a common source of confusion in the codebase because it's always explicit that the resource returned may not be present, whether because it's soft-deleted when projected to the given time or because it never existed in the first place.

In production code, the presence of the returned value is always checked. In test code, its presence is assumed using .get() where that is expected and convenient, as it not being present will throw an NPE that will cause the test to fail anyway.

Note that the roughly equivalent reloadResourceByForeignKey(), which is widely used in test code, is not having this same treatment applied to it. That is out of the scope of this CL, and has much smaller returns anyway because it's only used in tests (where the unexpected absence of a given resource would just cause the test to fail).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=225424002
2018-12-14 11:24:49 -05:00
..
token Move the AllocationToken entity to the token subpackage 2018-07-14 01:37:03 -04:00
DomainAllocateFlow.java Make loadByForeignKey() and related methods return Optional 2018-12-14 11:24:49 -05:00
DomainApplicationCreateFlow.java Deny non-active registrars access to non-free EPP commands 2018-12-03 19:10:45 -05:00
DomainApplicationDeleteFlow.java Allow the same LaunchPhase to be used for both start-date and end-date sunrise 2018-03-06 19:12:56 -05:00
DomainApplicationInfoFlow.java Make loadByForeignKey() and related methods return Optional 2018-12-14 11:24:49 -05:00
DomainApplicationUpdateFlow.java Add the ability to require premium fee acking for a registrar 2018-02-01 22:07:11 -05:00
DomainCheckFlow.java Make domain check return availability regardless of fee extensions 2018-04-23 14:36:02 -04:00
DomainClaimsCheckFlow.java Make return value of ClaimsListShard.getClaimKey() Optional 2018-03-06 19:15:52 -05:00
DomainCreateFlow.java Deny non-active registrars access to non-free EPP commands 2018-12-03 19:10:45 -05:00
DomainDeleteFlow.java Update lastEppUpdateTime and lastEppUpdateClientId when necessary 2018-12-03 19:13:55 -05:00
DomainFlowTmchUtils.java Refactor EppXmlTransformer to be in the model/ package 2018-12-12 13:22:34 -05:00
DomainFlowUtils.java Add an unrenew_domain command to nomulus tool 2018-12-12 13:22:34 -05:00
DomainInfoFlow.java Add extensibility framework for allocation tokens 2018-02-01 21:54:29 -05:00
DomainPricingLogic.java Bypass EAP fees for anchor tenants 2018-10-08 16:59:29 -04:00
DomainRenewFlow.java Add an unrenew_domain command to nomulus tool 2018-12-12 13:22:34 -05:00
DomainRestoreRequestFlow.java Update lastEppUpdateTime and lastEppUpdateClientId when necessary 2018-12-03 19:13:55 -05:00
DomainTransferApproveFlow.java Update lastEppUpdateTime and lastEppUpdateClientId when necessary 2018-12-03 19:13:55 -05:00
DomainTransferCancelFlow.java Update lastEppUpdateTime and lastEppUpdateClientId when necessary 2018-12-03 19:13:55 -05:00
DomainTransferQueryFlow.java Switch from Guava Optionals to Java 8 Optionals 2017-10-24 16:53:47 -04:00
DomainTransferRejectFlow.java Update lastEppUpdateTime and lastEppUpdateClientId when necessary 2018-12-03 19:13:55 -05:00
DomainTransferRequestFlow.java Update lastEppUpdateTime and lastEppUpdateClientId when necessary 2018-12-03 19:13:55 -05:00
DomainTransferUtils.java Switch from Guava Optionals to Java 8 Optionals 2017-10-24 16:53:47 -04:00
DomainUpdateFlow.java Improve the error when trying to delete the registrant contact 2018-05-17 21:52:35 -04:00
FeesAndCredits.java Replace Stream.concat with Streams.concat 2017-12-27 11:35:47 -05:00