From 50a7d34e797c5b74f86513137ed7f67bc3469b60 Mon Sep 17 00:00:00 2001 From: Ben McIlwain Date: Wed, 22 Jan 2020 17:19:29 -0500 Subject: [PATCH] Refactor g.r.model.transaction -> g.r.persistence.transaction (#450) * Refactor g.r.model.transaction -> g.r.persistence.transaction The ultimate goal here is to eventually delete the model package entirely once we're no longer using Datastore. To that end, the Cloud SQL stuff that we'll be keeping needs to be in a different package. Here's the rough outline of the final desired state I'm thinking of: g.r.persistence .transaction -- what's being moved in this commit .converters -- to be moved in another commit [maybe more?] g.r.schema [same-ish subpackages as model currently contains] I'm also trying to think if it makes sense to move the DAO classes out of g.r.schema, and haven't come up with a good answer yet. * Also move test resource files * Merge branch 'master' into mv-tx-to-persistence --- .../google/registry/backup/CommitLogCheckpointAction.java | 2 +- .../google/registry/backup/DeleteOldCommitLogsAction.java | 2 +- .../registry/batch/DeleteContactsAndHostsAction.java | 2 +- .../google/registry/batch/DeleteLoadTestDataAction.java | 2 +- .../java/google/registry/batch/DeleteProberDataAction.java | 2 +- .../registry/batch/ExpandRecurringBillingEventsAction.java | 2 +- .../google/registry/batch/ResaveAllEppResourcesAction.java | 2 +- .../java/google/registry/batch/ResaveEntityAction.java | 2 +- .../google/registry/export/SyncGroupMembersAction.java | 2 +- core/src/main/java/google/registry/flows/FlowRunner.java | 2 +- .../main/java/google/registry/flows/ResourceFlowUtils.java | 2 +- .../google/registry/flows/contact/ContactCreateFlow.java | 2 +- .../google/registry/flows/contact/ContactDeleteFlow.java | 2 +- .../registry/flows/contact/ContactTransferApproveFlow.java | 2 +- .../registry/flows/contact/ContactTransferCancelFlow.java | 2 +- .../registry/flows/contact/ContactTransferRejectFlow.java | 2 +- .../registry/flows/contact/ContactTransferRequestFlow.java | 2 +- .../google/registry/flows/contact/ContactUpdateFlow.java | 2 +- .../google/registry/flows/domain/DomainCreateFlow.java | 2 +- .../google/registry/flows/domain/DomainDeleteFlow.java | 2 +- .../java/google/registry/flows/domain/DomainRenewFlow.java | 2 +- .../registry/flows/domain/DomainRestoreRequestFlow.java | 2 +- .../registry/flows/domain/DomainTransferApproveFlow.java | 2 +- .../registry/flows/domain/DomainTransferCancelFlow.java | 2 +- .../registry/flows/domain/DomainTransferRejectFlow.java | 2 +- .../registry/flows/domain/DomainTransferRequestFlow.java | 2 +- .../google/registry/flows/domain/DomainUpdateFlow.java | 2 +- .../java/google/registry/flows/host/HostCreateFlow.java | 2 +- .../java/google/registry/flows/host/HostDeleteFlow.java | 2 +- .../java/google/registry/flows/host/HostUpdateFlow.java | 2 +- .../main/java/google/registry/flows/poll/PollAckFlow.java | 2 +- .../main/java/google/registry/keyring/kms/KmsUpdater.java | 2 +- core/src/main/java/google/registry/model/EppResource.java | 2 +- .../main/java/google/registry/model/OteAccountBuilder.java | 2 +- .../google/registry/model/common/GaeUserIdConverter.java | 2 +- .../java/google/registry/model/index/ForeignKeyIndex.java | 2 +- .../registry/model/ofy/DatastoreTransactionManager.java | 2 +- .../main/java/google/registry/model/rde/RdeRevision.java | 2 +- .../java/google/registry/model/registrar/Registrar.java | 2 +- .../google/registry/model/registrar/RegistrarContact.java | 2 +- .../java/google/registry/model/registry/Registries.java | 2 +- .../main/java/google/registry/model/registry/Registry.java | 2 +- .../google/registry/model/registry/RegistryLockDao.java | 2 +- .../google/registry/model/registry/label/PremiumList.java | 2 +- .../registry/model/registry/label/PremiumListUtils.java | 2 +- core/src/main/java/google/registry/model/server/Lock.java | 2 +- .../java/google/registry/model/server/ServerSecret.java | 2 +- .../registry/model/smd/SignedMarkRevocationList.java | 2 +- .../java/google/registry/model/tmch/ClaimsListShard.java | 2 +- core/src/main/java/google/registry/model/tmch/TmchCrl.java | 2 +- .../translators/CommitLogRevisionsTranslatorFactory.java | 2 +- .../translators/CreateAutoTimestampTranslatorFactory.java | 2 +- .../translators/UpdateAutoTimestampTranslatorFactory.java | 2 +- .../registry/persistence/CreateAutoTimestampConverter.java | 2 +- .../google/registry/persistence/PersistenceComponent.java | 2 +- .../google/registry/persistence/PersistenceModule.java | 4 ++-- .../registry/persistence/UpdateAutoTimestampConverter.java | 2 +- .../transaction/DummyJpaTransactionManager.java | 2 +- .../transaction/JpaTransactionManager.java | 2 +- .../transaction/JpaTransactionManagerImpl.java | 2 +- .../transaction/TransactionManager.java | 2 +- .../transaction/TransactionManagerFactory.java | 3 +-- .../registry/rdap/UpdateRegistrarRdapBaseUrlsAction.java | 2 +- .../java/google/registry/rde/PendingDepositChecker.java | 2 +- .../main/java/google/registry/rde/RdeStagingReducer.java | 2 +- .../src/main/java/google/registry/rde/RdeUploadAction.java | 2 +- .../reporting/icann/IcannReportingUploadAction.java | 2 +- .../main/java/google/registry/schema/cursor/CursorDao.java | 4 ++-- .../java/google/registry/schema/tld/PremiumListDao.java | 2 +- .../java/google/registry/schema/tld/ReservedListDao.java | 2 +- .../java/google/registry/schema/tmch/ClaimsListDao.java | 2 +- .../src/main/java/google/registry/tmch/LordnTaskUtils.java | 2 +- .../java/google/registry/tools/AckPollMessagesCommand.java | 2 +- .../google/registry/tools/CreateReservedListCommand.java | 2 +- .../registry/tools/DeleteAllocationTokensCommand.java | 2 +- .../main/java/google/registry/tools/DeleteTldCommand.java | 2 +- .../registry/tools/GenerateAllocationTokensCommand.java | 2 +- .../main/java/google/registry/tools/MutatingCommand.java | 2 +- .../google/registry/tools/RegistryToolEnvironment.java | 3 ++- .../registry/tools/ResaveEnvironmentEntitiesCommand.java | 2 +- .../java/google/registry/tools/UnrenewDomainCommand.java | 2 +- .../registry/tools/UpdateAllocationTokensCommand.java | 2 +- .../google/registry/tools/UpdateReservedListCommand.java | 2 +- .../google/registry/tools/server/DeleteEntityAction.java | 2 +- .../registry/tools/server/KillAllEntitiesReducer.java | 2 +- .../tools/server/ResaveAllHistoryEntriesAction.java | 2 +- .../ui/server/registrar/ConsoleRegistrarCreatorAction.java | 2 +- .../ui/server/registrar/RegistrarSettingsAction.java | 2 +- .../registry/backup/CommitLogCheckpointStrategyTest.java | 2 +- .../flows/custom/TestDomainCreateFlowCustomLogic.java | 2 +- .../google/registry/model/CreateAutoTimestampTest.java | 2 +- .../google/registry/model/UpdateAutoTimestampTest.java | 2 +- .../registry/model/common/GaeUserIdConverterTest.java | 2 +- .../google/registry/model/ofy/CommitLogMutationTest.java | 2 +- .../java/google/registry/model/ofy/OfyCommitLogTest.java | 2 +- core/src/test/java/google/registry/model/ofy/OfyTest.java | 2 +- .../java/google/registry/model/rde/RdeRevisionTest.java | 2 +- .../google/registry/model/registrar/RegistrarTest.java | 2 +- .../registry/model/registry/RegistryLockDaoTest.java | 6 +++--- .../model/registry/label/PremiumListUtilsTest.java | 2 +- .../registry/model/smd/SignedMarkRevocationListTest.java | 2 +- .../google/registry/model/tmch/ClaimsListShardTest.java | 2 +- .../CommitLogRevisionsTranslatorFactoryTest.java | 2 +- .../registry/persistence/BloomFilterConverterTest.java | 6 +++--- .../persistence/CreateAutoTimestampConverterTest.java | 6 +++--- .../registry/persistence/CurrencyUnitConverterTest.java | 6 +++--- .../google/registry/persistence/DateTimeConverterTest.java | 6 +++--- .../google/registry/persistence/EnumSetUserTypeTest.java | 6 +++--- .../registry/persistence/JodaMoneyConverterTest.java | 6 +++--- .../java/google/registry/persistence/MapUserTypeTest.java | 6 +++--- .../registry/persistence/StringListUserTypeTest.java | 6 +++--- .../google/registry/persistence/StringSetUserTypeTest.java | 6 +++--- .../persistence/UpdateAutoTimestampConverterTest.java | 6 +++--- .../registry/persistence/ZonedDateTimeConverterTest.java | 6 +++--- .../transaction/DummyJpaTransactionManagerTest.java | 4 ++-- .../{model => persistence}/transaction/JpaTestRules.java | 3 ++- .../transaction/JpaTransactionManagerImplTest.java | 7 ++++--- .../transaction/JpaTransactionManagerRule.java | 6 +++--- .../transaction/JpaTransactionManagerRuleTest.java | 6 +++--- .../test/java/google/registry/rde/RdeUploadActionTest.java | 2 +- .../java/google/registry/schema/cursor/CursorDaoTest.java | 4 ++-- .../schema/integration/SqlIntegrationMembershipTest.java | 2 +- .../schema/integration/SqlIntegrationTestSuite.java | 2 +- .../google/registry/schema/tld/PremiumListDaoTest.java | 6 +++--- .../google/registry/schema/tld/PremiumListUtilsTest.java | 4 ++-- .../google/registry/schema/tld/ReservedListDaoTest.java | 6 +++--- .../google/registry/schema/tmch/ClaimsListDaoTest.java | 4 ++-- .../google/registry/server/RegistryTestServerMain.java | 2 +- .../test/java/google/registry/testing/DatastoreHelper.java | 2 +- .../test/java/google/registry/tmch/LordnTaskUtilsTest.java | 2 +- .../tools/CreateOrUpdateReservedListCommandTestCase.java | 6 +++--- .../registry/tools/server/CreatePremiumListActionTest.java | 4 ++-- .../registry/tools/server/UpdatePremiumListActionTest.java | 6 +++--- .../ui/server/registrar/RegistryLockGetActionTest.java | 4 ++-- .../java/google/registry/webdriver/TestServerRule.java | 4 ++-- .../transaction/cleanup_database.sql | 0 .../{model => persistence}/transaction/test_schema.sql | 0 137 files changed, 185 insertions(+), 183 deletions(-) rename core/src/main/java/google/registry/{model => persistence}/transaction/DummyJpaTransactionManager.java (97%) rename core/src/main/java/google/registry/{model => persistence}/transaction/JpaTransactionManager.java (94%) rename core/src/main/java/google/registry/{model => persistence}/transaction/JpaTransactionManagerImpl.java (99%) rename core/src/main/java/google/registry/{model => persistence}/transaction/TransactionManager.java (98%) rename core/src/main/java/google/registry/{model => persistence}/transaction/TransactionManagerFactory.java (98%) rename core/src/test/java/google/registry/{model => persistence}/transaction/DummyJpaTransactionManagerTest.java (89%) rename core/src/test/java/google/registry/{model => persistence}/transaction/JpaTestRules.java (98%) rename core/src/test/java/google/registry/{model => persistence}/transaction/JpaTransactionManagerImplTest.java (96%) rename core/src/test/java/google/registry/{model => persistence}/transaction/JpaTransactionManagerRule.java (97%) rename core/src/test/java/google/registry/{model => persistence}/transaction/JpaTransactionManagerRuleTest.java (93%) rename core/src/test/resources/google/registry/{model => persistence}/transaction/cleanup_database.sql (100%) rename core/src/test/resources/google/registry/{model => persistence}/transaction/test_schema.sql (100%) diff --git a/core/src/main/java/google/registry/backup/CommitLogCheckpointAction.java b/core/src/main/java/google/registry/backup/CommitLogCheckpointAction.java index 30033fcfc..6ef23b07c 100644 --- a/core/src/main/java/google/registry/backup/CommitLogCheckpointAction.java +++ b/core/src/main/java/google/registry/backup/CommitLogCheckpointAction.java @@ -19,7 +19,7 @@ import static com.google.appengine.api.taskqueue.TaskOptions.Builder.withUrl; import static google.registry.backup.ExportCommitLogDiffAction.LOWER_CHECKPOINT_TIME_PARAM; import static google.registry.backup.ExportCommitLogDiffAction.UPPER_CHECKPOINT_TIME_PARAM; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.DateTimeUtils.isBeforeOrAt; import com.google.common.flogger.FluentLogger; diff --git a/core/src/main/java/google/registry/backup/DeleteOldCommitLogsAction.java b/core/src/main/java/google/registry/backup/DeleteOldCommitLogsAction.java index 69ee4307b..3cacc4aa7 100644 --- a/core/src/main/java/google/registry/backup/DeleteOldCommitLogsAction.java +++ b/core/src/main/java/google/registry/backup/DeleteOldCommitLogsAction.java @@ -18,7 +18,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; import static google.registry.mapreduce.MapreduceRunner.PARAM_DRY_RUN; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static java.lang.Boolean.FALSE; import static java.lang.Boolean.TRUE; diff --git a/core/src/main/java/google/registry/batch/DeleteContactsAndHostsAction.java b/core/src/main/java/google/registry/batch/DeleteContactsAndHostsAction.java index d45be62b1..8e63deefc 100644 --- a/core/src/main/java/google/registry/batch/DeleteContactsAndHostsAction.java +++ b/core/src/main/java/google/registry/batch/DeleteContactsAndHostsAction.java @@ -39,8 +39,8 @@ import static google.registry.model.reporting.HistoryEntry.Type.CONTACT_DELETE; import static google.registry.model.reporting.HistoryEntry.Type.CONTACT_DELETE_FAILURE; import static google.registry.model.reporting.HistoryEntry.Type.HOST_DELETE; import static google.registry.model.reporting.HistoryEntry.Type.HOST_DELETE_FAILURE; -import static google.registry.model.transaction.TransactionManagerFactory.tm; import static google.registry.model.transfer.TransferStatus.SERVER_CANCELLED; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static java.math.RoundingMode.CEILING; import static java.util.concurrent.TimeUnit.DAYS; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/core/src/main/java/google/registry/batch/DeleteLoadTestDataAction.java b/core/src/main/java/google/registry/batch/DeleteLoadTestDataAction.java index 0c9a72beb..78215bf77 100644 --- a/core/src/main/java/google/registry/batch/DeleteLoadTestDataAction.java +++ b/core/src/main/java/google/registry/batch/DeleteLoadTestDataAction.java @@ -19,7 +19,7 @@ import static google.registry.config.RegistryEnvironment.PRODUCTION; import static google.registry.mapreduce.MapreduceRunner.PARAM_DRY_RUN; import static google.registry.mapreduce.inputs.EppResourceInputs.createEntityInput; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.request.Action.Method.POST; import com.google.appengine.tools.mapreduce.Mapper; diff --git a/core/src/main/java/google/registry/batch/DeleteProberDataAction.java b/core/src/main/java/google/registry/batch/DeleteProberDataAction.java index 2d6d19011..6bd1f186b 100644 --- a/core/src/main/java/google/registry/batch/DeleteProberDataAction.java +++ b/core/src/main/java/google/registry/batch/DeleteProberDataAction.java @@ -23,7 +23,7 @@ import static google.registry.model.ResourceTransferUtils.updateForeignKeyIndexD import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.registry.Registries.getTldsOfType; import static google.registry.model.reporting.HistoryEntry.Type.DOMAIN_DELETE; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.request.Action.Method.POST; import static google.registry.request.RequestParameters.PARAM_TLDS; import static org.joda.time.DateTimeZone.UTC; diff --git a/core/src/main/java/google/registry/batch/ExpandRecurringBillingEventsAction.java b/core/src/main/java/google/registry/batch/ExpandRecurringBillingEventsAction.java index 9fefd66a4..2c9aad2c4 100644 --- a/core/src/main/java/google/registry/batch/ExpandRecurringBillingEventsAction.java +++ b/core/src/main/java/google/registry/batch/ExpandRecurringBillingEventsAction.java @@ -23,7 +23,7 @@ import static google.registry.model.common.Cursor.CursorType.RECURRING_BILLING; import static google.registry.model.domain.Period.Unit.YEARS; import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.reporting.HistoryEntry.Type.DOMAIN_AUTORENEW; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.pricing.PricingEngineProxy.getDomainRenewCost; import static google.registry.util.CollectionUtils.union; import static google.registry.util.DateTimeUtils.START_OF_TIME; diff --git a/core/src/main/java/google/registry/batch/ResaveAllEppResourcesAction.java b/core/src/main/java/google/registry/batch/ResaveAllEppResourcesAction.java index 3b8689817..75a3dfeb3 100644 --- a/core/src/main/java/google/registry/batch/ResaveAllEppResourcesAction.java +++ b/core/src/main/java/google/registry/batch/ResaveAllEppResourcesAction.java @@ -15,7 +15,7 @@ package google.registry.batch; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.google.appengine.tools.mapreduce.Mapper; import com.google.common.collect.ImmutableList; diff --git a/core/src/main/java/google/registry/batch/ResaveEntityAction.java b/core/src/main/java/google/registry/batch/ResaveEntityAction.java index e31a91f45..d50f196aa 100644 --- a/core/src/main/java/google/registry/batch/ResaveEntityAction.java +++ b/core/src/main/java/google/registry/batch/ResaveEntityAction.java @@ -18,7 +18,7 @@ import static google.registry.batch.AsyncTaskEnqueuer.PARAM_REQUESTED_TIME; import static google.registry.batch.AsyncTaskEnqueuer.PARAM_RESAVE_TIMES; import static google.registry.batch.AsyncTaskEnqueuer.PARAM_RESOURCE_KEY; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSortedSet; diff --git a/core/src/main/java/google/registry/export/SyncGroupMembersAction.java b/core/src/main/java/google/registry/export/SyncGroupMembersAction.java index db9285a8d..8a422a5db 100644 --- a/core/src/main/java/google/registry/export/SyncGroupMembersAction.java +++ b/core/src/main/java/google/registry/export/SyncGroupMembersAction.java @@ -17,7 +17,7 @@ package google.registry.export; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.request.Action.Method.POST; import static google.registry.util.CollectionUtils.nullToEmpty; import static google.registry.util.RegistrarUtils.normalizeClientId; diff --git a/core/src/main/java/google/registry/flows/FlowRunner.java b/core/src/main/java/google/registry/flows/FlowRunner.java index 8aabd902e..07bd5f6c0 100644 --- a/core/src/main/java/google/registry/flows/FlowRunner.java +++ b/core/src/main/java/google/registry/flows/FlowRunner.java @@ -14,7 +14,7 @@ package google.registry.flows; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.xml.XmlTransformer.prettyPrint; import com.google.common.base.Strings; diff --git a/core/src/main/java/google/registry/flows/ResourceFlowUtils.java b/core/src/main/java/google/registry/flows/ResourceFlowUtils.java index 5b2681877..996510c4f 100644 --- a/core/src/main/java/google/registry/flows/ResourceFlowUtils.java +++ b/core/src/main/java/google/registry/flows/ResourceFlowUtils.java @@ -19,7 +19,7 @@ import static google.registry.model.EppResourceUtils.loadByForeignKey; import static google.registry.model.EppResourceUtils.queryForLinkedDomains; import static google.registry.model.index.ForeignKeyIndex.loadAndGetKey; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; diff --git a/core/src/main/java/google/registry/flows/contact/ContactCreateFlow.java b/core/src/main/java/google/registry/flows/contact/ContactCreateFlow.java index be4471b7d..31f983225 100644 --- a/core/src/main/java/google/registry/flows/contact/ContactCreateFlow.java +++ b/core/src/main/java/google/registry/flows/contact/ContactCreateFlow.java @@ -20,7 +20,7 @@ import static google.registry.flows.contact.ContactFlowUtils.validateAsciiPostal import static google.registry.flows.contact.ContactFlowUtils.validateContactAgainstPolicy; import static google.registry.model.EppResourceUtils.createRepoId; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.googlecode.objectify.Key; import google.registry.config.RegistryConfig.Config; diff --git a/core/src/main/java/google/registry/flows/contact/ContactDeleteFlow.java b/core/src/main/java/google/registry/flows/contact/ContactDeleteFlow.java index 41742d205..b8f6a2953 100644 --- a/core/src/main/java/google/registry/flows/contact/ContactDeleteFlow.java +++ b/core/src/main/java/google/registry/flows/contact/ContactDeleteFlow.java @@ -22,7 +22,7 @@ import static google.registry.flows.ResourceFlowUtils.verifyOptionalAuthInfo; import static google.registry.flows.ResourceFlowUtils.verifyResourceOwnership; import static google.registry.model.eppoutput.Result.Code.SUCCESS_WITH_ACTION_PENDING; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.google.common.collect.ImmutableSet; import com.googlecode.objectify.Key; diff --git a/core/src/main/java/google/registry/flows/contact/ContactTransferApproveFlow.java b/core/src/main/java/google/registry/flows/contact/ContactTransferApproveFlow.java index 87b9b4880..ab8dd92f7 100644 --- a/core/src/main/java/google/registry/flows/contact/ContactTransferApproveFlow.java +++ b/core/src/main/java/google/registry/flows/contact/ContactTransferApproveFlow.java @@ -23,7 +23,7 @@ import static google.registry.flows.contact.ContactFlowUtils.createGainingTransf import static google.registry.flows.contact.ContactFlowUtils.createTransferResponse; import static google.registry.model.ResourceTransferUtils.approvePendingTransfer; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.googlecode.objectify.Key; import google.registry.flows.EppException; diff --git a/core/src/main/java/google/registry/flows/contact/ContactTransferCancelFlow.java b/core/src/main/java/google/registry/flows/contact/ContactTransferCancelFlow.java index aae58f227..fc0c797ce 100644 --- a/core/src/main/java/google/registry/flows/contact/ContactTransferCancelFlow.java +++ b/core/src/main/java/google/registry/flows/contact/ContactTransferCancelFlow.java @@ -23,7 +23,7 @@ import static google.registry.flows.contact.ContactFlowUtils.createLosingTransfe import static google.registry.flows.contact.ContactFlowUtils.createTransferResponse; import static google.registry.model.ResourceTransferUtils.denyPendingTransfer; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.googlecode.objectify.Key; import google.registry.flows.EppException; diff --git a/core/src/main/java/google/registry/flows/contact/ContactTransferRejectFlow.java b/core/src/main/java/google/registry/flows/contact/ContactTransferRejectFlow.java index e744d3fd3..64311ee09 100644 --- a/core/src/main/java/google/registry/flows/contact/ContactTransferRejectFlow.java +++ b/core/src/main/java/google/registry/flows/contact/ContactTransferRejectFlow.java @@ -23,7 +23,7 @@ import static google.registry.flows.contact.ContactFlowUtils.createGainingTransf import static google.registry.flows.contact.ContactFlowUtils.createTransferResponse; import static google.registry.model.ResourceTransferUtils.denyPendingTransfer; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.googlecode.objectify.Key; import google.registry.flows.EppException; diff --git a/core/src/main/java/google/registry/flows/contact/ContactTransferRequestFlow.java b/core/src/main/java/google/registry/flows/contact/ContactTransferRequestFlow.java index 12d911fd7..f256352d6 100644 --- a/core/src/main/java/google/registry/flows/contact/ContactTransferRequestFlow.java +++ b/core/src/main/java/google/registry/flows/contact/ContactTransferRequestFlow.java @@ -24,7 +24,7 @@ import static google.registry.flows.contact.ContactFlowUtils.createLosingTransfe import static google.registry.flows.contact.ContactFlowUtils.createTransferResponse; import static google.registry.model.eppoutput.Result.Code.SUCCESS_WITH_ACTION_PENDING; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.google.common.collect.ImmutableSet; import com.googlecode.objectify.Key; diff --git a/core/src/main/java/google/registry/flows/contact/ContactUpdateFlow.java b/core/src/main/java/google/registry/flows/contact/ContactUpdateFlow.java index e53c63fd7..9255a851c 100644 --- a/core/src/main/java/google/registry/flows/contact/ContactUpdateFlow.java +++ b/core/src/main/java/google/registry/flows/contact/ContactUpdateFlow.java @@ -25,7 +25,7 @@ import static google.registry.flows.ResourceFlowUtils.verifyResourceOwnership; import static google.registry.flows.contact.ContactFlowUtils.validateAsciiPostalInfo; import static google.registry.flows.contact.ContactFlowUtils.validateContactAgainstPolicy; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.google.common.collect.ImmutableSet; import com.googlecode.objectify.Key; diff --git a/core/src/main/java/google/registry/flows/domain/DomainCreateFlow.java b/core/src/main/java/google/registry/flows/domain/DomainCreateFlow.java index c14a615c7..87eb664cf 100644 --- a/core/src/main/java/google/registry/flows/domain/DomainCreateFlow.java +++ b/core/src/main/java/google/registry/flows/domain/DomainCreateFlow.java @@ -46,7 +46,7 @@ import static google.registry.model.registry.Registry.TldState.GENERAL_AVAILABIL import static google.registry.model.registry.Registry.TldState.QUIET_PERIOD; import static google.registry.model.registry.Registry.TldState.START_DATE_SUNRISE; import static google.registry.model.registry.label.ReservationType.NAME_COLLISION; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.DateTimeUtils.END_OF_TIME; import static google.registry.util.DateTimeUtils.leapSafeAddYears; diff --git a/core/src/main/java/google/registry/flows/domain/DomainDeleteFlow.java b/core/src/main/java/google/registry/flows/domain/DomainDeleteFlow.java index 4ab308588..730a9827f 100644 --- a/core/src/main/java/google/registry/flows/domain/DomainDeleteFlow.java +++ b/core/src/main/java/google/registry/flows/domain/DomainDeleteFlow.java @@ -34,7 +34,7 @@ import static google.registry.model.eppoutput.Result.Code.SUCCESS_WITH_ACTION_PE import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.reporting.DomainTransactionRecord.TransactionReportField.ADD_FIELDS; import static google.registry.model.reporting.DomainTransactionRecord.TransactionReportField.RENEW_FIELDS; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.pricing.PricingEngineProxy.getDomainRenewCost; import static google.registry.util.CollectionUtils.nullToEmpty; import static google.registry.util.CollectionUtils.union; diff --git a/core/src/main/java/google/registry/flows/domain/DomainRenewFlow.java b/core/src/main/java/google/registry/flows/domain/DomainRenewFlow.java index b755c51c4..39a11d3c4 100644 --- a/core/src/main/java/google/registry/flows/domain/DomainRenewFlow.java +++ b/core/src/main/java/google/registry/flows/domain/DomainRenewFlow.java @@ -28,7 +28,7 @@ import static google.registry.flows.domain.DomainFlowUtils.validateFeeChallenge; import static google.registry.flows.domain.DomainFlowUtils.validateRegistrationPeriod; import static google.registry.flows.domain.DomainFlowUtils.verifyRegistrarIsActive; import static google.registry.flows.domain.DomainFlowUtils.verifyUnitIsYears; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.DateTimeUtils.leapSafeAddYears; import com.google.common.collect.ImmutableList; diff --git a/core/src/main/java/google/registry/flows/domain/DomainRestoreRequestFlow.java b/core/src/main/java/google/registry/flows/domain/DomainRestoreRequestFlow.java index 32577ebd6..0292cc95a 100644 --- a/core/src/main/java/google/registry/flows/domain/DomainRestoreRequestFlow.java +++ b/core/src/main/java/google/registry/flows/domain/DomainRestoreRequestFlow.java @@ -27,7 +27,7 @@ import static google.registry.flows.domain.DomainFlowUtils.verifyPremiumNameIsNo import static google.registry.flows.domain.DomainFlowUtils.verifyRegistrarIsActive; import static google.registry.model.ResourceTransferUtils.updateForeignKeyIndexDeletionTime; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.DateTimeUtils.END_OF_TIME; import com.google.common.collect.ImmutableList; diff --git a/core/src/main/java/google/registry/flows/domain/DomainTransferApproveFlow.java b/core/src/main/java/google/registry/flows/domain/DomainTransferApproveFlow.java index f4c11a713..9d51b8c7f 100644 --- a/core/src/main/java/google/registry/flows/domain/DomainTransferApproveFlow.java +++ b/core/src/main/java/google/registry/flows/domain/DomainTransferApproveFlow.java @@ -29,7 +29,7 @@ import static google.registry.flows.domain.DomainTransferUtils.createTransferRes import static google.registry.model.ResourceTransferUtils.approvePendingTransfer; import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.reporting.DomainTransactionRecord.TransactionReportField.TRANSFER_SUCCESSFUL; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.pricing.PricingEngineProxy.getDomainRenewCost; import static google.registry.util.CollectionUtils.union; import static google.registry.util.DateTimeUtils.END_OF_TIME; diff --git a/core/src/main/java/google/registry/flows/domain/DomainTransferCancelFlow.java b/core/src/main/java/google/registry/flows/domain/DomainTransferCancelFlow.java index 57ddc1f87..7543d2cd9 100644 --- a/core/src/main/java/google/registry/flows/domain/DomainTransferCancelFlow.java +++ b/core/src/main/java/google/registry/flows/domain/DomainTransferCancelFlow.java @@ -27,7 +27,7 @@ import static google.registry.flows.domain.DomainTransferUtils.createTransferRes import static google.registry.model.ResourceTransferUtils.denyPendingTransfer; import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.reporting.DomainTransactionRecord.TransactionReportField.TRANSFER_SUCCESSFUL; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.DateTimeUtils.END_OF_TIME; import com.google.common.collect.ImmutableSet; diff --git a/core/src/main/java/google/registry/flows/domain/DomainTransferRejectFlow.java b/core/src/main/java/google/registry/flows/domain/DomainTransferRejectFlow.java index 5a47ae27d..bf7093410 100644 --- a/core/src/main/java/google/registry/flows/domain/DomainTransferRejectFlow.java +++ b/core/src/main/java/google/registry/flows/domain/DomainTransferRejectFlow.java @@ -28,7 +28,7 @@ import static google.registry.model.ResourceTransferUtils.denyPendingTransfer; import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.reporting.DomainTransactionRecord.TransactionReportField.TRANSFER_NACKED; import static google.registry.model.reporting.DomainTransactionRecord.TransactionReportField.TRANSFER_SUCCESSFUL; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.CollectionUtils.union; import static google.registry.util.DateTimeUtils.END_OF_TIME; diff --git a/core/src/main/java/google/registry/flows/domain/DomainTransferRequestFlow.java b/core/src/main/java/google/registry/flows/domain/DomainTransferRequestFlow.java index 4d3bc7914..8f4dee0c0 100644 --- a/core/src/main/java/google/registry/flows/domain/DomainTransferRequestFlow.java +++ b/core/src/main/java/google/registry/flows/domain/DomainTransferRequestFlow.java @@ -32,7 +32,7 @@ import static google.registry.flows.domain.DomainTransferUtils.createTransferRes import static google.registry.flows.domain.DomainTransferUtils.createTransferServerApproveEntities; import static google.registry.model.eppoutput.Result.Code.SUCCESS_WITH_ACTION_PENDING; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; diff --git a/core/src/main/java/google/registry/flows/domain/DomainUpdateFlow.java b/core/src/main/java/google/registry/flows/domain/DomainUpdateFlow.java index 0e877e314..8090555d4 100644 --- a/core/src/main/java/google/registry/flows/domain/DomainUpdateFlow.java +++ b/core/src/main/java/google/registry/flows/domain/DomainUpdateFlow.java @@ -38,7 +38,7 @@ import static google.registry.flows.domain.DomainFlowUtils.validateRegistrantAll import static google.registry.flows.domain.DomainFlowUtils.validateRequiredContactsPresent; import static google.registry.flows.domain.DomainFlowUtils.verifyClientUpdateNotProhibited; import static google.registry.flows.domain.DomainFlowUtils.verifyNotInPendingDelete; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.google.common.collect.ImmutableSet; import com.google.common.net.InternetDomainName; diff --git a/core/src/main/java/google/registry/flows/host/HostCreateFlow.java b/core/src/main/java/google/registry/flows/host/HostCreateFlow.java index 4ef0306e3..aa76553be 100644 --- a/core/src/main/java/google/registry/flows/host/HostCreateFlow.java +++ b/core/src/main/java/google/registry/flows/host/HostCreateFlow.java @@ -22,7 +22,7 @@ import static google.registry.flows.host.HostFlowUtils.verifySuperordinateDomain import static google.registry.flows.host.HostFlowUtils.verifySuperordinateDomainOwnership; import static google.registry.model.EppResourceUtils.createRepoId; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.CollectionUtils.isNullOrEmpty; import static google.registry.util.CollectionUtils.union; diff --git a/core/src/main/java/google/registry/flows/host/HostDeleteFlow.java b/core/src/main/java/google/registry/flows/host/HostDeleteFlow.java index 2b6c0bf2e..94d89c00b 100644 --- a/core/src/main/java/google/registry/flows/host/HostDeleteFlow.java +++ b/core/src/main/java/google/registry/flows/host/HostDeleteFlow.java @@ -22,7 +22,7 @@ import static google.registry.flows.ResourceFlowUtils.verifyResourceOwnership; import static google.registry.flows.host.HostFlowUtils.validateHostName; import static google.registry.model.eppoutput.Result.Code.SUCCESS_WITH_ACTION_PENDING; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.google.common.collect.ImmutableSet; import com.googlecode.objectify.Key; diff --git a/core/src/main/java/google/registry/flows/host/HostUpdateFlow.java b/core/src/main/java/google/registry/flows/host/HostUpdateFlow.java index fdbb96cf8..96f54a3f6 100644 --- a/core/src/main/java/google/registry/flows/host/HostUpdateFlow.java +++ b/core/src/main/java/google/registry/flows/host/HostUpdateFlow.java @@ -28,7 +28,7 @@ import static google.registry.flows.host.HostFlowUtils.verifySuperordinateDomain import static google.registry.flows.host.HostFlowUtils.verifySuperordinateDomainOwnership; import static google.registry.model.index.ForeignKeyIndex.loadAndGetKey; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.CollectionUtils.isNullOrEmpty; import com.google.common.collect.ImmutableSet; diff --git a/core/src/main/java/google/registry/flows/poll/PollAckFlow.java b/core/src/main/java/google/registry/flows/poll/PollAckFlow.java index b98bdf77d..77429e6ad 100644 --- a/core/src/main/java/google/registry/flows/poll/PollAckFlow.java +++ b/core/src/main/java/google/registry/flows/poll/PollAckFlow.java @@ -21,7 +21,7 @@ import static google.registry.model.eppoutput.Result.Code.SUCCESS_WITH_NO_MESSAG import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.poll.PollMessageExternalKeyConverter.makePollMessageExternalId; import static google.registry.model.poll.PollMessageExternalKeyConverter.parsePollMessageExternalId; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.DateTimeUtils.isBeforeOrAt; import com.googlecode.objectify.Key; diff --git a/core/src/main/java/google/registry/keyring/kms/KmsUpdater.java b/core/src/main/java/google/registry/keyring/kms/KmsUpdater.java index 1bc6763c9..5e39ea3ec 100644 --- a/core/src/main/java/google/registry/keyring/kms/KmsUpdater.java +++ b/core/src/main/java/google/registry/keyring/kms/KmsUpdater.java @@ -35,7 +35,7 @@ import static google.registry.keyring.kms.KmsKeyring.StringKeyLabel.RDE_SSH_CLIE import static google.registry.keyring.kms.KmsKeyring.StringKeyLabel.SAFE_BROWSING_API_KEY; import static google.registry.keyring.kms.KmsKeyring.StringKeyLabel.TOOLS_CLOUD_SQL_PASSWORD_STRING; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.PreconditionsUtils.checkArgumentNotNull; import com.google.common.collect.ImmutableMap; diff --git a/core/src/main/java/google/registry/model/EppResource.java b/core/src/main/java/google/registry/model/EppResource.java index 95397250a..7b464bd91 100644 --- a/core/src/main/java/google/registry/model/EppResource.java +++ b/core/src/main/java/google/registry/model/EppResource.java @@ -22,7 +22,7 @@ import static com.google.common.collect.Sets.union; import static google.registry.config.RegistryConfig.getEppResourceCachingDuration; import static google.registry.config.RegistryConfig.getEppResourceMaxCachedEntries; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.CollectionUtils.nullToEmpty; import static google.registry.util.CollectionUtils.nullToEmptyImmutableCopy; import static google.registry.util.DateTimeUtils.END_OF_TIME; diff --git a/core/src/main/java/google/registry/model/OteAccountBuilder.java b/core/src/main/java/google/registry/model/OteAccountBuilder.java index f40c3d822..313e8cfaa 100644 --- a/core/src/main/java/google/registry/model/OteAccountBuilder.java +++ b/core/src/main/java/google/registry/model/OteAccountBuilder.java @@ -21,7 +21,7 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.registry.Registry.TldState.GENERAL_AVAILABILITY; import static google.registry.model.registry.Registry.TldState.START_DATE_SUNRISE; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.DateTimeUtils.START_OF_TIME; import com.google.common.collect.ImmutableList; diff --git a/core/src/main/java/google/registry/model/common/GaeUserIdConverter.java b/core/src/main/java/google/registry/model/common/GaeUserIdConverter.java index 02fd44556..4ced82b17 100644 --- a/core/src/main/java/google/registry/model/common/GaeUserIdConverter.java +++ b/core/src/main/java/google/registry/model/common/GaeUserIdConverter.java @@ -17,7 +17,7 @@ package google.registry.model.common; import static com.google.common.base.Preconditions.checkState; import static google.registry.model.ofy.ObjectifyService.allocateId; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.google.appengine.api.users.User; import com.google.common.base.Splitter; diff --git a/core/src/main/java/google/registry/model/index/ForeignKeyIndex.java b/core/src/main/java/google/registry/model/index/ForeignKeyIndex.java index d0a6dc6fc..f94adc2b2 100644 --- a/core/src/main/java/google/registry/model/index/ForeignKeyIndex.java +++ b/core/src/main/java/google/registry/model/index/ForeignKeyIndex.java @@ -19,7 +19,7 @@ import static com.google.common.collect.Maps.filterValues; import static google.registry.config.RegistryConfig.getEppResourceCachingDuration; import static google.registry.config.RegistryConfig.getEppResourceMaxCachedEntries; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.TypeUtils.instantiate; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/core/src/main/java/google/registry/model/ofy/DatastoreTransactionManager.java b/core/src/main/java/google/registry/model/ofy/DatastoreTransactionManager.java index 40c4f5157..90c6e68f7 100644 --- a/core/src/main/java/google/registry/model/ofy/DatastoreTransactionManager.java +++ b/core/src/main/java/google/registry/model/ofy/DatastoreTransactionManager.java @@ -16,7 +16,7 @@ package google.registry.model.ofy; import static google.registry.model.ofy.ObjectifyService.ofy; -import google.registry.model.transaction.TransactionManager; +import google.registry.persistence.transaction.TransactionManager; import java.util.function.Supplier; import org.joda.time.DateTime; diff --git a/core/src/main/java/google/registry/model/rde/RdeRevision.java b/core/src/main/java/google/registry/model/rde/RdeRevision.java index 4fc8dfa16..701f05318 100644 --- a/core/src/main/java/google/registry/model/rde/RdeRevision.java +++ b/core/src/main/java/google/registry/model/rde/RdeRevision.java @@ -19,7 +19,7 @@ import static com.google.common.base.Verify.verify; import static com.google.common.base.Verify.verifyNotNull; import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.rde.RdeNamingUtils.makePartialName; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.google.common.base.VerifyException; import com.googlecode.objectify.annotation.Entity; diff --git a/core/src/main/java/google/registry/model/registrar/Registrar.java b/core/src/main/java/google/registry/model/registrar/Registrar.java index 379880df0..d05864602 100644 --- a/core/src/main/java/google/registry/model/registrar/Registrar.java +++ b/core/src/main/java/google/registry/model/registrar/Registrar.java @@ -31,7 +31,7 @@ import static google.registry.model.CacheUtils.memoizeWithShortExpiration; import static google.registry.model.common.EntityGroupRoot.getCrossTldKey; import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.registry.Registries.assertTldsExist; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.CollectionUtils.nullToEmptyImmutableCopy; import static google.registry.util.CollectionUtils.nullToEmptyImmutableSortedCopy; import static google.registry.util.PasswordUtils.SALT_SUPPLIER; diff --git a/core/src/main/java/google/registry/model/registrar/RegistrarContact.java b/core/src/main/java/google/registry/model/registrar/RegistrarContact.java index 4c1b37476..22d908504 100644 --- a/core/src/main/java/google/registry/model/registrar/RegistrarContact.java +++ b/core/src/main/java/google/registry/model/registrar/RegistrarContact.java @@ -22,7 +22,7 @@ import static com.google.common.collect.Sets.difference; import static com.google.common.io.BaseEncoding.base64; import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.registrar.Registrar.checkValidEmail; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.CollectionUtils.nullToEmptyImmutableSortedCopy; import static google.registry.util.PasswordUtils.SALT_SUPPLIER; import static google.registry.util.PasswordUtils.hashPassword; diff --git a/core/src/main/java/google/registry/model/registry/Registries.java b/core/src/main/java/google/registry/model/registry/Registries.java index e6524f83b..e46149c05 100644 --- a/core/src/main/java/google/registry/model/registry/Registries.java +++ b/core/src/main/java/google/registry/model/registry/Registries.java @@ -25,7 +25,7 @@ import static com.google.common.collect.Maps.filterValues; import static google.registry.model.CacheUtils.memoizeWithShortExpiration; import static google.registry.model.common.EntityGroupRoot.getCrossTldKey; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.PreconditionsUtils.checkArgumentNotNull; import com.google.common.base.Joiner; diff --git a/core/src/main/java/google/registry/model/registry/Registry.java b/core/src/main/java/google/registry/model/registry/Registry.java index bef302f52..eba66765f 100644 --- a/core/src/main/java/google/registry/model/registry/Registry.java +++ b/core/src/main/java/google/registry/model/registry/Registry.java @@ -23,7 +23,7 @@ import static com.google.common.collect.Maps.toMap; import static google.registry.config.RegistryConfig.getSingletonCacheRefreshDuration; import static google.registry.model.common.EntityGroupRoot.getCrossTldKey; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.CollectionUtils.nullToEmptyImmutableCopy; import static google.registry.util.DateTimeUtils.END_OF_TIME; import static google.registry.util.DateTimeUtils.START_OF_TIME; diff --git a/core/src/main/java/google/registry/model/registry/RegistryLockDao.java b/core/src/main/java/google/registry/model/registry/RegistryLockDao.java index b9c447b56..327103c20 100644 --- a/core/src/main/java/google/registry/model/registry/RegistryLockDao.java +++ b/core/src/main/java/google/registry/model/registry/RegistryLockDao.java @@ -15,7 +15,7 @@ package google.registry.model.registry; import static com.google.common.base.Preconditions.checkNotNull; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import com.google.common.collect.ImmutableList; import google.registry.schema.domain.RegistryLock; diff --git a/core/src/main/java/google/registry/model/registry/label/PremiumList.java b/core/src/main/java/google/registry/model/registry/label/PremiumList.java index 6e5ccb014..a2fdf756e 100644 --- a/core/src/main/java/google/registry/model/registry/label/PremiumList.java +++ b/core/src/main/java/google/registry/model/registry/label/PremiumList.java @@ -22,7 +22,7 @@ import static google.registry.config.RegistryConfig.getStaticPremiumListMaxCache import static google.registry.model.common.EntityGroupRoot.getCrossTldKey; import static google.registry.model.ofy.ObjectifyService.allocateId; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static java.util.concurrent.TimeUnit.MILLISECONDS; import com.google.common.annotations.VisibleForTesting; diff --git a/core/src/main/java/google/registry/model/registry/label/PremiumListUtils.java b/core/src/main/java/google/registry/model/registry/label/PremiumListUtils.java index 8f4a517b4..2803af371 100644 --- a/core/src/main/java/google/registry/model/registry/label/PremiumListUtils.java +++ b/core/src/main/java/google/registry/model/registry/label/PremiumListUtils.java @@ -27,7 +27,7 @@ import static google.registry.model.registry.label.DomainLabelMetrics.PremiumLis import static google.registry.model.registry.label.PremiumList.cachePremiumListEntries; import static google.registry.model.registry.label.PremiumList.cachePremiumListRevisions; import static google.registry.model.registry.label.PremiumList.cachePremiumLists; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static org.joda.time.DateTimeZone.UTC; import com.google.auto.value.AutoValue; diff --git a/core/src/main/java/google/registry/model/server/Lock.java b/core/src/main/java/google/registry/model/server/Lock.java index bd008a905..ac12cec73 100644 --- a/core/src/main/java/google/registry/model/server/Lock.java +++ b/core/src/main/java/google/registry/model/server/Lock.java @@ -16,7 +16,7 @@ package google.registry.model.server; import static com.google.common.base.Preconditions.checkArgument; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.DateTimeUtils.isAtOrAfter; import com.google.auto.value.AutoValue; diff --git a/core/src/main/java/google/registry/model/server/ServerSecret.java b/core/src/main/java/google/registry/model/server/ServerSecret.java index 107d6cd34..7011334f9 100644 --- a/core/src/main/java/google/registry/model/server/ServerSecret.java +++ b/core/src/main/java/google/registry/model/server/ServerSecret.java @@ -15,7 +15,7 @@ package google.registry.model.server; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.google.common.annotations.VisibleForTesting; import com.google.common.cache.CacheBuilder; diff --git a/core/src/main/java/google/registry/model/smd/SignedMarkRevocationList.java b/core/src/main/java/google/registry/model/smd/SignedMarkRevocationList.java index 73d5a2f82..bed00342b 100644 --- a/core/src/main/java/google/registry/model/smd/SignedMarkRevocationList.java +++ b/core/src/main/java/google/registry/model/smd/SignedMarkRevocationList.java @@ -22,7 +22,7 @@ import static google.registry.model.CacheUtils.memoizeWithShortExpiration; import static google.registry.model.common.EntityGroupRoot.getCrossTldKey; import static google.registry.model.ofy.ObjectifyService.allocateId; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.DateTimeUtils.START_OF_TIME; import static google.registry.util.DateTimeUtils.isBeforeOrAt; diff --git a/core/src/main/java/google/registry/model/tmch/ClaimsListShard.java b/core/src/main/java/google/registry/model/tmch/ClaimsListShard.java index 00cb8f70d..3a3b3a790 100644 --- a/core/src/main/java/google/registry/model/tmch/ClaimsListShard.java +++ b/core/src/main/java/google/registry/model/tmch/ClaimsListShard.java @@ -21,7 +21,7 @@ import static com.google.common.base.Verify.verify; import static google.registry.model.CacheUtils.memoizeWithShortExpiration; import static google.registry.model.ofy.ObjectifyService.allocateId; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.DateTimeUtils.START_OF_TIME; import com.google.common.annotations.VisibleForTesting; diff --git a/core/src/main/java/google/registry/model/tmch/TmchCrl.java b/core/src/main/java/google/registry/model/tmch/TmchCrl.java index 2a61c915b..b212167f8 100644 --- a/core/src/main/java/google/registry/model/tmch/TmchCrl.java +++ b/core/src/main/java/google/registry/model/tmch/TmchCrl.java @@ -16,7 +16,7 @@ package google.registry.model.tmch; import static com.google.common.base.Preconditions.checkNotNull; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.googlecode.objectify.annotation.Entity; import google.registry.model.annotations.NotBackedUp; diff --git a/core/src/main/java/google/registry/model/translators/CommitLogRevisionsTranslatorFactory.java b/core/src/main/java/google/registry/model/translators/CommitLogRevisionsTranslatorFactory.java index e3601e9af..d99221ade 100644 --- a/core/src/main/java/google/registry/model/translators/CommitLogRevisionsTranslatorFactory.java +++ b/core/src/main/java/google/registry/model/translators/CommitLogRevisionsTranslatorFactory.java @@ -17,7 +17,7 @@ package google.registry.model.translators; import static com.google.common.base.MoreObjects.firstNonNull; import static google.registry.config.RegistryConfig.getCommitLogDatastoreRetention; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.DateTimeUtils.START_OF_TIME; import com.google.common.collect.ImmutableSortedMap; diff --git a/core/src/main/java/google/registry/model/translators/CreateAutoTimestampTranslatorFactory.java b/core/src/main/java/google/registry/model/translators/CreateAutoTimestampTranslatorFactory.java index 61f69017b..ff9e05eef 100644 --- a/core/src/main/java/google/registry/model/translators/CreateAutoTimestampTranslatorFactory.java +++ b/core/src/main/java/google/registry/model/translators/CreateAutoTimestampTranslatorFactory.java @@ -15,7 +15,7 @@ package google.registry.model.translators; import static com.google.common.base.MoreObjects.firstNonNull; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static org.joda.time.DateTimeZone.UTC; import google.registry.model.CreateAutoTimestamp; diff --git a/core/src/main/java/google/registry/model/translators/UpdateAutoTimestampTranslatorFactory.java b/core/src/main/java/google/registry/model/translators/UpdateAutoTimestampTranslatorFactory.java index ea73848ea..fd3518351 100644 --- a/core/src/main/java/google/registry/model/translators/UpdateAutoTimestampTranslatorFactory.java +++ b/core/src/main/java/google/registry/model/translators/UpdateAutoTimestampTranslatorFactory.java @@ -14,7 +14,7 @@ package google.registry.model.translators; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static org.joda.time.DateTimeZone.UTC; import google.registry.model.UpdateAutoTimestamp; diff --git a/core/src/main/java/google/registry/persistence/CreateAutoTimestampConverter.java b/core/src/main/java/google/registry/persistence/CreateAutoTimestampConverter.java index 6f54bdd80..d7879b5c0 100644 --- a/core/src/main/java/google/registry/persistence/CreateAutoTimestampConverter.java +++ b/core/src/main/java/google/registry/persistence/CreateAutoTimestampConverter.java @@ -14,7 +14,7 @@ package google.registry.persistence; import static com.google.common.base.MoreObjects.firstNonNull; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import google.registry.model.CreateAutoTimestamp; import google.registry.util.DateTimeUtils; diff --git a/core/src/main/java/google/registry/persistence/PersistenceComponent.java b/core/src/main/java/google/registry/persistence/PersistenceComponent.java index 8fe0040b8..8634187f0 100644 --- a/core/src/main/java/google/registry/persistence/PersistenceComponent.java +++ b/core/src/main/java/google/registry/persistence/PersistenceComponent.java @@ -18,9 +18,9 @@ import dagger.Component; import google.registry.config.CredentialModule; import google.registry.config.RegistryConfig.ConfigModule; import google.registry.keyring.kms.KmsModule; -import google.registry.model.transaction.JpaTransactionManager; import google.registry.persistence.PersistenceModule.AppEngineJpaTm; import google.registry.persistence.PersistenceModule.NomulusToolJpaTm; +import google.registry.persistence.transaction.JpaTransactionManager; import google.registry.util.UtilsModule; import javax.inject.Singleton; import javax.persistence.EntityManagerFactory; diff --git a/core/src/main/java/google/registry/persistence/PersistenceModule.java b/core/src/main/java/google/registry/persistence/PersistenceModule.java index 987083912..863446384 100644 --- a/core/src/main/java/google/registry/persistence/PersistenceModule.java +++ b/core/src/main/java/google/registry/persistence/PersistenceModule.java @@ -29,8 +29,8 @@ import dagger.Module; import dagger.Provides; import google.registry.config.RegistryConfig.Config; import google.registry.keyring.kms.KmsKeyring; -import google.registry.model.transaction.JpaTransactionManager; -import google.registry.model.transaction.JpaTransactionManagerImpl; +import google.registry.persistence.transaction.JpaTransactionManager; +import google.registry.persistence.transaction.JpaTransactionManagerImpl; import google.registry.util.Clock; import java.lang.annotation.Documented; import java.util.HashMap; diff --git a/core/src/main/java/google/registry/persistence/UpdateAutoTimestampConverter.java b/core/src/main/java/google/registry/persistence/UpdateAutoTimestampConverter.java index bed61e4d0..a85735ee6 100644 --- a/core/src/main/java/google/registry/persistence/UpdateAutoTimestampConverter.java +++ b/core/src/main/java/google/registry/persistence/UpdateAutoTimestampConverter.java @@ -13,7 +13,7 @@ // limitations under the License. package google.registry.persistence; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import google.registry.model.UpdateAutoTimestamp; import google.registry.util.DateTimeUtils; diff --git a/core/src/main/java/google/registry/model/transaction/DummyJpaTransactionManager.java b/core/src/main/java/google/registry/persistence/transaction/DummyJpaTransactionManager.java similarity index 97% rename from core/src/main/java/google/registry/model/transaction/DummyJpaTransactionManager.java rename to core/src/main/java/google/registry/persistence/transaction/DummyJpaTransactionManager.java index 6e0ba81ab..2cb334a0b 100644 --- a/core/src/main/java/google/registry/model/transaction/DummyJpaTransactionManager.java +++ b/core/src/main/java/google/registry/persistence/transaction/DummyJpaTransactionManager.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.model.transaction; +package google.registry.persistence.transaction; import java.lang.reflect.Proxy; diff --git a/core/src/main/java/google/registry/model/transaction/JpaTransactionManager.java b/core/src/main/java/google/registry/persistence/transaction/JpaTransactionManager.java similarity index 94% rename from core/src/main/java/google/registry/model/transaction/JpaTransactionManager.java rename to core/src/main/java/google/registry/persistence/transaction/JpaTransactionManager.java index 3a2290521..f334985d0 100644 --- a/core/src/main/java/google/registry/model/transaction/JpaTransactionManager.java +++ b/core/src/main/java/google/registry/persistence/transaction/JpaTransactionManager.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.model.transaction; +package google.registry.persistence.transaction; import javax.persistence.EntityManager; diff --git a/core/src/main/java/google/registry/model/transaction/JpaTransactionManagerImpl.java b/core/src/main/java/google/registry/persistence/transaction/JpaTransactionManagerImpl.java similarity index 99% rename from core/src/main/java/google/registry/model/transaction/JpaTransactionManagerImpl.java rename to core/src/main/java/google/registry/persistence/transaction/JpaTransactionManagerImpl.java index ccd850b7d..1ea490985 100644 --- a/core/src/main/java/google/registry/model/transaction/JpaTransactionManagerImpl.java +++ b/core/src/main/java/google/registry/persistence/transaction/JpaTransactionManagerImpl.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.model.transaction; +package google.registry.persistence.transaction; import com.google.common.flogger.FluentLogger; import google.registry.util.Clock; diff --git a/core/src/main/java/google/registry/model/transaction/TransactionManager.java b/core/src/main/java/google/registry/persistence/transaction/TransactionManager.java similarity index 98% rename from core/src/main/java/google/registry/model/transaction/TransactionManager.java rename to core/src/main/java/google/registry/persistence/transaction/TransactionManager.java index 7df737c26..91da778d4 100644 --- a/core/src/main/java/google/registry/model/transaction/TransactionManager.java +++ b/core/src/main/java/google/registry/persistence/transaction/TransactionManager.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.model.transaction; +package google.registry.persistence.transaction; import java.util.function.Supplier; import org.joda.time.DateTime; diff --git a/core/src/main/java/google/registry/model/transaction/TransactionManagerFactory.java b/core/src/main/java/google/registry/persistence/transaction/TransactionManagerFactory.java similarity index 98% rename from core/src/main/java/google/registry/model/transaction/TransactionManagerFactory.java rename to core/src/main/java/google/registry/persistence/transaction/TransactionManagerFactory.java index 9f71108a4..694d68474 100644 --- a/core/src/main/java/google/registry/model/transaction/TransactionManagerFactory.java +++ b/core/src/main/java/google/registry/persistence/transaction/TransactionManagerFactory.java @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.model.transaction; - +package google.registry.persistence.transaction; import com.google.appengine.api.utils.SystemProperty; import com.google.appengine.api.utils.SystemProperty.Environment.Value; diff --git a/core/src/main/java/google/registry/rdap/UpdateRegistrarRdapBaseUrlsAction.java b/core/src/main/java/google/registry/rdap/UpdateRegistrarRdapBaseUrlsAction.java index 7f1290f8c..3e8480d30 100644 --- a/core/src/main/java/google/registry/rdap/UpdateRegistrarRdapBaseUrlsAction.java +++ b/core/src/main/java/google/registry/rdap/UpdateRegistrarRdapBaseUrlsAction.java @@ -17,7 +17,7 @@ package google.registry.rdap; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static java.nio.charset.StandardCharsets.UTF_8; import com.google.api.client.http.GenericUrl; diff --git a/core/src/main/java/google/registry/rde/PendingDepositChecker.java b/core/src/main/java/google/registry/rde/PendingDepositChecker.java index a34c0956b..832ddb8a1 100644 --- a/core/src/main/java/google/registry/rde/PendingDepositChecker.java +++ b/core/src/main/java/google/registry/rde/PendingDepositChecker.java @@ -16,7 +16,7 @@ package google.registry.rde; import static com.google.common.base.Preconditions.checkArgument; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.DateTimeUtils.isBeforeOrAt; import com.google.common.collect.ImmutableSetMultimap; diff --git a/core/src/main/java/google/registry/rde/RdeStagingReducer.java b/core/src/main/java/google/registry/rde/RdeStagingReducer.java index 910692412..583a6b9eb 100644 --- a/core/src/main/java/google/registry/rde/RdeStagingReducer.java +++ b/core/src/main/java/google/registry/rde/RdeStagingReducer.java @@ -21,7 +21,7 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Verify.verify; import static google.registry.model.common.Cursor.getCursorTimeOrStartOfTime; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static java.nio.charset.StandardCharsets.UTF_8; import com.google.appengine.tools.cloudstorage.GcsFilename; diff --git a/core/src/main/java/google/registry/rde/RdeUploadAction.java b/core/src/main/java/google/registry/rde/RdeUploadAction.java index ae666bfde..e80cdc49c 100644 --- a/core/src/main/java/google/registry/rde/RdeUploadAction.java +++ b/core/src/main/java/google/registry/rde/RdeUploadAction.java @@ -22,7 +22,7 @@ import static google.registry.model.common.Cursor.CursorType.RDE_UPLOAD_SFTP; import static google.registry.model.common.Cursor.getCursorTimeOrStartOfTime; import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.rde.RdeMode.FULL; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.request.Action.Method.POST; import static google.registry.util.DateTimeUtils.isBeforeOrAt; import static java.util.Arrays.asList; diff --git a/core/src/main/java/google/registry/reporting/icann/IcannReportingUploadAction.java b/core/src/main/java/google/registry/reporting/icann/IcannReportingUploadAction.java index 4cf9db6f6..957819c82 100644 --- a/core/src/main/java/google/registry/reporting/icann/IcannReportingUploadAction.java +++ b/core/src/main/java/google/registry/reporting/icann/IcannReportingUploadAction.java @@ -19,7 +19,7 @@ import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.net.MediaType.PLAIN_TEXT_UTF_8; import static google.registry.model.common.Cursor.getCursorTimeOrStartOfTime; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.reporting.icann.IcannReportingModule.PARAM_SUBDIR; import static google.registry.request.Action.Method.POST; import static javax.servlet.http.HttpServletResponse.SC_OK; diff --git a/core/src/main/java/google/registry/schema/cursor/CursorDao.java b/core/src/main/java/google/registry/schema/cursor/CursorDao.java index 676023420..425af7b0d 100644 --- a/core/src/main/java/google/registry/schema/cursor/CursorDao.java +++ b/core/src/main/java/google/registry/schema/cursor/CursorDao.java @@ -16,8 +16,8 @@ package google.registry.schema.cursor; import static com.google.appengine.api.search.checkers.Preconditions.checkNotNull; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; diff --git a/core/src/main/java/google/registry/schema/tld/PremiumListDao.java b/core/src/main/java/google/registry/schema/tld/PremiumListDao.java index 508191c96..0e2e3d58b 100644 --- a/core/src/main/java/google/registry/schema/tld/PremiumListDao.java +++ b/core/src/main/java/google/registry/schema/tld/PremiumListDao.java @@ -15,7 +15,7 @@ package google.registry.schema.tld; import static com.google.common.base.Preconditions.checkArgument; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import com.google.common.cache.CacheLoader.InvalidCacheLoadException; import com.google.common.util.concurrent.UncheckedExecutionException; diff --git a/core/src/main/java/google/registry/schema/tld/ReservedListDao.java b/core/src/main/java/google/registry/schema/tld/ReservedListDao.java index 07ff5f6b4..847530b50 100644 --- a/core/src/main/java/google/registry/schema/tld/ReservedListDao.java +++ b/core/src/main/java/google/registry/schema/tld/ReservedListDao.java @@ -14,7 +14,7 @@ package google.registry.schema.tld; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import com.google.common.util.concurrent.UncheckedExecutionException; import java.util.Optional; diff --git a/core/src/main/java/google/registry/schema/tmch/ClaimsListDao.java b/core/src/main/java/google/registry/schema/tmch/ClaimsListDao.java index 2ff809a83..5bbef7775 100644 --- a/core/src/main/java/google/registry/schema/tmch/ClaimsListDao.java +++ b/core/src/main/java/google/registry/schema/tmch/ClaimsListDao.java @@ -16,7 +16,7 @@ package google.registry.schema.tmch; import static google.registry.config.RegistryConfig.getDomainLabelListCacheDuration; import static google.registry.model.CacheUtils.tryMemoizeWithExpiration; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import com.google.common.base.Supplier; import com.google.common.flogger.FluentLogger; diff --git a/core/src/main/java/google/registry/tmch/LordnTaskUtils.java b/core/src/main/java/google/registry/tmch/LordnTaskUtils.java index ab8fe8218..8d3450bdc 100644 --- a/core/src/main/java/google/registry/tmch/LordnTaskUtils.java +++ b/core/src/main/java/google/registry/tmch/LordnTaskUtils.java @@ -16,7 +16,7 @@ package google.registry.tmch; import static com.google.appengine.api.taskqueue.QueueFactory.getQueue; import static com.google.common.base.Preconditions.checkState; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.google.appengine.api.taskqueue.TaskOptions; import com.google.appengine.api.taskqueue.TaskOptions.Method; diff --git a/core/src/main/java/google/registry/tools/AckPollMessagesCommand.java b/core/src/main/java/google/registry/tools/AckPollMessagesCommand.java index b73a190b1..b34cafb3c 100644 --- a/core/src/main/java/google/registry/tools/AckPollMessagesCommand.java +++ b/core/src/main/java/google/registry/tools/AckPollMessagesCommand.java @@ -19,7 +19,7 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static google.registry.flows.poll.PollFlowUtils.getPollMessagesQuery; import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.poll.PollMessageExternalKeyConverter.makePollMessageExternalId; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.beust.jcommander.Parameter; import com.beust.jcommander.Parameters; diff --git a/core/src/main/java/google/registry/tools/CreateReservedListCommand.java b/core/src/main/java/google/registry/tools/CreateReservedListCommand.java index 0fd45c87b..e02fd7f8b 100644 --- a/core/src/main/java/google/registry/tools/CreateReservedListCommand.java +++ b/core/src/main/java/google/registry/tools/CreateReservedListCommand.java @@ -16,7 +16,7 @@ package google.registry.tools; import static com.google.common.base.Preconditions.checkArgument; import static google.registry.model.registry.Registries.assertTldExists; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import static google.registry.util.ListNamingUtils.convertFilePathToName; import static java.nio.charset.StandardCharsets.UTF_8; import static org.joda.time.DateTimeZone.UTC; diff --git a/core/src/main/java/google/registry/tools/DeleteAllocationTokensCommand.java b/core/src/main/java/google/registry/tools/DeleteAllocationTokensCommand.java index 9a5d66ab5..25a88f859 100644 --- a/core/src/main/java/google/registry/tools/DeleteAllocationTokensCommand.java +++ b/core/src/main/java/google/registry/tools/DeleteAllocationTokensCommand.java @@ -19,7 +19,7 @@ import static com.google.common.collect.Iterables.partition; import static com.google.common.collect.Streams.stream; import static google.registry.model.domain.token.AllocationToken.TokenType.SINGLE_USE; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.beust.jcommander.Parameter; import com.beust.jcommander.Parameters; diff --git a/core/src/main/java/google/registry/tools/DeleteTldCommand.java b/core/src/main/java/google/registry/tools/DeleteTldCommand.java index cbe246a11..ec9ac4eea 100644 --- a/core/src/main/java/google/registry/tools/DeleteTldCommand.java +++ b/core/src/main/java/google/registry/tools/DeleteTldCommand.java @@ -16,7 +16,7 @@ package google.registry.tools; import static com.google.common.base.Preconditions.checkState; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.beust.jcommander.Parameter; import com.beust.jcommander.Parameters; diff --git a/core/src/main/java/google/registry/tools/GenerateAllocationTokensCommand.java b/core/src/main/java/google/registry/tools/GenerateAllocationTokensCommand.java index d7ba3e622..d49a0d610 100644 --- a/core/src/main/java/google/registry/tools/GenerateAllocationTokensCommand.java +++ b/core/src/main/java/google/registry/tools/GenerateAllocationTokensCommand.java @@ -21,7 +21,7 @@ import static com.google.common.collect.Sets.difference; import static google.registry.model.domain.token.AllocationToken.TokenType.SINGLE_USE; import static google.registry.model.domain.token.AllocationToken.TokenType.UNLIMITED_USE; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.CollectionUtils.nullToEmpty; import static google.registry.util.StringGenerator.DEFAULT_PASSWORD_LENGTH; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/core/src/main/java/google/registry/tools/MutatingCommand.java b/core/src/main/java/google/registry/tools/MutatingCommand.java index a7f88898e..4cf4e8e1c 100644 --- a/core/src/main/java/google/registry/tools/MutatingCommand.java +++ b/core/src/main/java/google/registry/tools/MutatingCommand.java @@ -21,7 +21,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Strings.emptyToNull; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.DatastoreServiceUtils.getNameOrId; import static google.registry.util.DiffUtils.prettyPrintEntityDeepDiff; import static java.util.stream.Collectors.joining; diff --git a/core/src/main/java/google/registry/tools/RegistryToolEnvironment.java b/core/src/main/java/google/registry/tools/RegistryToolEnvironment.java index cd1e1ff56..e3233cd27 100644 --- a/core/src/main/java/google/registry/tools/RegistryToolEnvironment.java +++ b/core/src/main/java/google/registry/tools/RegistryToolEnvironment.java @@ -23,6 +23,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import google.registry.config.RegistryEnvironment; import google.registry.config.SystemPropertySetter; +import google.registry.persistence.transaction.TransactionManagerFactory; /** Enum of production environments, used for the {@code --environment} flag. */ public enum RegistryToolEnvironment { @@ -113,7 +114,7 @@ public enum RegistryToolEnvironment { /** * Returns true if the JpaTransactionManager is enabled. Note that JpaTm is actually enabled in - * {@link google.registry.model.transaction.TransactionManagerFactory} by reading this flag. + * {@link TransactionManagerFactory} by reading this flag. */ public static boolean isJpaTmEnabled() { return isJpaTmEnabled; diff --git a/core/src/main/java/google/registry/tools/ResaveEnvironmentEntitiesCommand.java b/core/src/main/java/google/registry/tools/ResaveEnvironmentEntitiesCommand.java index dd693c5b9..725c475b5 100644 --- a/core/src/main/java/google/registry/tools/ResaveEnvironmentEntitiesCommand.java +++ b/core/src/main/java/google/registry/tools/ResaveEnvironmentEntitiesCommand.java @@ -17,7 +17,7 @@ package google.registry.tools; import static com.google.common.collect.Lists.partition; import static google.registry.model.common.EntityGroupRoot.getCrossTldKey; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.beust.jcommander.Parameters; import com.googlecode.objectify.Key; diff --git a/core/src/main/java/google/registry/tools/UnrenewDomainCommand.java b/core/src/main/java/google/registry/tools/UnrenewDomainCommand.java index f49c267e6..2b776e617 100644 --- a/core/src/main/java/google/registry/tools/UnrenewDomainCommand.java +++ b/core/src/main/java/google/registry/tools/UnrenewDomainCommand.java @@ -21,7 +21,7 @@ import static google.registry.flows.domain.DomainFlowUtils.newAutorenewPollMessa import static google.registry.flows.domain.DomainFlowUtils.updateAutorenewRecurrenceEndTime; import static google.registry.model.EppResourceUtils.loadByForeignKey; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.DateTimeUtils.isBeforeOrAt; import static google.registry.util.DateTimeUtils.leapSafeSubtractYears; diff --git a/core/src/main/java/google/registry/tools/UpdateAllocationTokensCommand.java b/core/src/main/java/google/registry/tools/UpdateAllocationTokensCommand.java index b31fad518..b70bef123 100644 --- a/core/src/main/java/google/registry/tools/UpdateAllocationTokensCommand.java +++ b/core/src/main/java/google/registry/tools/UpdateAllocationTokensCommand.java @@ -19,7 +19,7 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Iterables.partition; import static com.google.common.collect.Streams.stream; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.beust.jcommander.Parameter; import com.beust.jcommander.Parameters; diff --git a/core/src/main/java/google/registry/tools/UpdateReservedListCommand.java b/core/src/main/java/google/registry/tools/UpdateReservedListCommand.java index 752f41887..bf32f5d50 100644 --- a/core/src/main/java/google/registry/tools/UpdateReservedListCommand.java +++ b/core/src/main/java/google/registry/tools/UpdateReservedListCommand.java @@ -15,7 +15,7 @@ package google.registry.tools; import static com.google.common.base.Preconditions.checkArgument; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import static google.registry.util.ListNamingUtils.convertFilePathToName; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/core/src/main/java/google/registry/tools/server/DeleteEntityAction.java b/core/src/main/java/google/registry/tools/server/DeleteEntityAction.java index cf96d81b0..19cfda228 100644 --- a/core/src/main/java/google/registry/tools/server/DeleteEntityAction.java +++ b/core/src/main/java/google/registry/tools/server/DeleteEntityAction.java @@ -17,7 +17,7 @@ package google.registry.tools.server; import static com.google.appengine.api.datastore.DatastoreServiceFactory.getDatastoreService; import static com.googlecode.objectify.Key.create; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.google.appengine.api.datastore.Entity; import com.google.appengine.api.datastore.EntityNotFoundException; diff --git a/core/src/main/java/google/registry/tools/server/KillAllEntitiesReducer.java b/core/src/main/java/google/registry/tools/server/KillAllEntitiesReducer.java index a99662b1a..2a53103cd 100644 --- a/core/src/main/java/google/registry/tools/server/KillAllEntitiesReducer.java +++ b/core/src/main/java/google/registry/tools/server/KillAllEntitiesReducer.java @@ -16,7 +16,7 @@ package google.registry.tools.server; import static com.google.common.collect.Iterators.partition; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.google.appengine.tools.mapreduce.Reducer; import com.google.appengine.tools.mapreduce.ReducerInput; diff --git a/core/src/main/java/google/registry/tools/server/ResaveAllHistoryEntriesAction.java b/core/src/main/java/google/registry/tools/server/ResaveAllHistoryEntriesAction.java index 24cb7529d..af151be7d 100644 --- a/core/src/main/java/google/registry/tools/server/ResaveAllHistoryEntriesAction.java +++ b/core/src/main/java/google/registry/tools/server/ResaveAllHistoryEntriesAction.java @@ -15,7 +15,7 @@ package google.registry.tools.server; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import com.google.appengine.tools.mapreduce.Mapper; import com.google.common.collect.ImmutableList; diff --git a/core/src/main/java/google/registry/ui/server/registrar/ConsoleRegistrarCreatorAction.java b/core/src/main/java/google/registry/ui/server/registrar/ConsoleRegistrarCreatorAction.java index e9397e276..b263e4faa 100644 --- a/core/src/main/java/google/registry/ui/server/registrar/ConsoleRegistrarCreatorAction.java +++ b/core/src/main/java/google/registry/ui/server/registrar/ConsoleRegistrarCreatorAction.java @@ -20,7 +20,7 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static google.registry.model.common.GaeUserIdConverter.convertEmailAddressToGaeUserId; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.ui.server.SoyTemplateUtils.CSS_RENAMING_MAP_SUPPLIER; import static javax.servlet.http.HttpServletResponse.SC_FORBIDDEN; diff --git a/core/src/main/java/google/registry/ui/server/registrar/RegistrarSettingsAction.java b/core/src/main/java/google/registry/ui/server/registrar/RegistrarSettingsAction.java index 3237830a9..6334f6b93 100644 --- a/core/src/main/java/google/registry/ui/server/registrar/RegistrarSettingsAction.java +++ b/core/src/main/java/google/registry/ui/server/registrar/RegistrarSettingsAction.java @@ -21,7 +21,7 @@ import static com.google.common.collect.Sets.difference; import static google.registry.config.RegistryEnvironment.PRODUCTION; import static google.registry.export.sheet.SyncRegistrarsSheetAction.enqueueRegistrarSheetSync; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.security.JsonResponseHelper.Status.ERROR; import static google.registry.security.JsonResponseHelper.Status.SUCCESS; import static google.registry.util.PreconditionsUtils.checkArgumentPresent; diff --git a/core/src/test/java/google/registry/backup/CommitLogCheckpointStrategyTest.java b/core/src/test/java/google/registry/backup/CommitLogCheckpointStrategyTest.java index 894151264..806958691 100644 --- a/core/src/test/java/google/registry/backup/CommitLogCheckpointStrategyTest.java +++ b/core/src/test/java/google/registry/backup/CommitLogCheckpointStrategyTest.java @@ -29,7 +29,7 @@ import google.registry.model.ofy.CommitLogCheckpoint; import google.registry.model.ofy.DatastoreTransactionManager; import google.registry.model.ofy.Ofy; import google.registry.model.registry.Registry; -import google.registry.model.transaction.TransactionManager; +import google.registry.persistence.transaction.TransactionManager; import google.registry.schema.cursor.CursorDao; import google.registry.testing.AppEngineRule; import google.registry.testing.FakeClock; diff --git a/core/src/test/java/google/registry/flows/custom/TestDomainCreateFlowCustomLogic.java b/core/src/test/java/google/registry/flows/custom/TestDomainCreateFlowCustomLogic.java index fb2451386..22b8822af 100644 --- a/core/src/test/java/google/registry/flows/custom/TestDomainCreateFlowCustomLogic.java +++ b/core/src/test/java/google/registry/flows/custom/TestDomainCreateFlowCustomLogic.java @@ -14,7 +14,7 @@ package google.registry.flows.custom; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import google.registry.flows.FlowMetadata; import google.registry.flows.SessionMetadata; diff --git a/core/src/test/java/google/registry/model/CreateAutoTimestampTest.java b/core/src/test/java/google/registry/model/CreateAutoTimestampTest.java index b361c7185..1dacd08f8 100644 --- a/core/src/test/java/google/registry/model/CreateAutoTimestampTest.java +++ b/core/src/test/java/google/registry/model/CreateAutoTimestampTest.java @@ -16,7 +16,7 @@ package google.registry.model; import static com.google.common.truth.Truth.assertThat; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static org.joda.time.DateTimeZone.UTC; import com.googlecode.objectify.ObjectifyService; diff --git a/core/src/test/java/google/registry/model/UpdateAutoTimestampTest.java b/core/src/test/java/google/registry/model/UpdateAutoTimestampTest.java index 3236d2039..e2a96cda4 100644 --- a/core/src/test/java/google/registry/model/UpdateAutoTimestampTest.java +++ b/core/src/test/java/google/registry/model/UpdateAutoTimestampTest.java @@ -16,7 +16,7 @@ package google.registry.model; import static com.google.common.truth.Truth.assertThat; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static org.joda.time.DateTimeZone.UTC; import com.googlecode.objectify.ObjectifyService; diff --git a/core/src/test/java/google/registry/model/common/GaeUserIdConverterTest.java b/core/src/test/java/google/registry/model/common/GaeUserIdConverterTest.java index 802b9094a..6676de746 100644 --- a/core/src/test/java/google/registry/model/common/GaeUserIdConverterTest.java +++ b/core/src/test/java/google/registry/model/common/GaeUserIdConverterTest.java @@ -16,7 +16,7 @@ package google.registry.model.common; import static com.google.common.truth.Truth.assertThat; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import google.registry.testing.AppEngineRule; import org.junit.After; diff --git a/core/src/test/java/google/registry/model/ofy/CommitLogMutationTest.java b/core/src/test/java/google/registry/model/ofy/CommitLogMutationTest.java index 45ae24a8f..73e74cf3c 100644 --- a/core/src/test/java/google/registry/model/ofy/CommitLogMutationTest.java +++ b/core/src/test/java/google/registry/model/ofy/CommitLogMutationTest.java @@ -16,7 +16,7 @@ package google.registry.model.ofy; import static com.google.common.truth.Truth.assertThat; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.testing.DatastoreHelper.createTld; import com.google.appengine.api.datastore.Entity; diff --git a/core/src/test/java/google/registry/model/ofy/OfyCommitLogTest.java b/core/src/test/java/google/registry/model/ofy/OfyCommitLogTest.java index 8872e5727..cdc0a2e47 100644 --- a/core/src/test/java/google/registry/model/ofy/OfyCommitLogTest.java +++ b/core/src/test/java/google/registry/model/ofy/OfyCommitLogTest.java @@ -20,7 +20,7 @@ import static com.googlecode.objectify.ObjectifyService.register; import static google.registry.model.common.EntityGroupRoot.getCrossTldKey; import static google.registry.model.ofy.CommitLogBucket.getBucketKey; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static org.junit.Assert.assertThrows; import com.google.common.collect.ImmutableSet; diff --git a/core/src/test/java/google/registry/model/ofy/OfyTest.java b/core/src/test/java/google/registry/model/ofy/OfyTest.java index f033ee95a..96cffe456 100644 --- a/core/src/test/java/google/registry/model/ofy/OfyTest.java +++ b/core/src/test/java/google/registry/model/ofy/OfyTest.java @@ -20,7 +20,7 @@ import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterrup import static google.registry.model.common.EntityGroupRoot.getCrossTldKey; import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.ofy.Ofy.getBaseEntityClassFromEntityOrKey; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.testing.DatastoreHelper.createTld; import static google.registry.testing.DatastoreHelper.newContactResource; import static google.registry.testing.DatastoreHelper.persistActiveContact; diff --git a/core/src/test/java/google/registry/model/rde/RdeRevisionTest.java b/core/src/test/java/google/registry/model/rde/RdeRevisionTest.java index 750c0b2e0..cdf2e82ac 100644 --- a/core/src/test/java/google/registry/model/rde/RdeRevisionTest.java +++ b/core/src/test/java/google/registry/model/rde/RdeRevisionTest.java @@ -19,7 +19,7 @@ import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.rde.RdeMode.FULL; import static google.registry.model.rde.RdeRevision.getNextRevision; import static google.registry.model.rde.RdeRevision.saveRevision; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static org.junit.Assert.assertThrows; import com.google.common.base.VerifyException; diff --git a/core/src/test/java/google/registry/model/registrar/RegistrarTest.java b/core/src/test/java/google/registry/model/registrar/RegistrarTest.java index eb8d0519b..8250a2116 100644 --- a/core/src/test/java/google/registry/model/registrar/RegistrarTest.java +++ b/core/src/test/java/google/registry/model/registrar/RegistrarTest.java @@ -18,7 +18,7 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth8.assertThat; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.testing.CertificateSamples.SAMPLE_CERT; import static google.registry.testing.CertificateSamples.SAMPLE_CERT2; import static google.registry.testing.CertificateSamples.SAMPLE_CERT2_HASH; diff --git a/core/src/test/java/google/registry/model/registry/RegistryLockDaoTest.java b/core/src/test/java/google/registry/model/registry/RegistryLockDaoTest.java index 20ed1d890..5055486ac 100644 --- a/core/src/test/java/google/registry/model/registry/RegistryLockDaoTest.java +++ b/core/src/test/java/google/registry/model/registry/RegistryLockDaoTest.java @@ -16,11 +16,11 @@ package google.registry.model.registry; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.truth.Truth.assertThat; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import static org.junit.Assert.assertThrows; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaIntegrationTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationTestRule; import google.registry.schema.domain.RegistryLock; import google.registry.testing.AppEngineRule; import java.util.Optional; diff --git a/core/src/test/java/google/registry/model/registry/label/PremiumListUtilsTest.java b/core/src/test/java/google/registry/model/registry/label/PremiumListUtilsTest.java index 7cf3ac8e3..a2cb684e4 100644 --- a/core/src/test/java/google/registry/model/registry/label/PremiumListUtilsTest.java +++ b/core/src/test/java/google/registry/model/registry/label/PremiumListUtilsTest.java @@ -30,7 +30,7 @@ import static google.registry.model.registry.label.PremiumListUtils.deletePremiu import static google.registry.model.registry.label.PremiumListUtils.doesPremiumListExist; import static google.registry.model.registry.label.PremiumListUtils.getPremiumPrice; import static google.registry.model.registry.label.PremiumListUtils.savePremiumListAndEntries; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.testing.DatastoreHelper.createTld; import static google.registry.testing.DatastoreHelper.loadPremiumListEntries; import static google.registry.testing.DatastoreHelper.persistPremiumList; diff --git a/core/src/test/java/google/registry/model/smd/SignedMarkRevocationListTest.java b/core/src/test/java/google/registry/model/smd/SignedMarkRevocationListTest.java index 21d117d9e..f6b022a9b 100644 --- a/core/src/test/java/google/registry/model/smd/SignedMarkRevocationListTest.java +++ b/core/src/test/java/google/registry/model/smd/SignedMarkRevocationListTest.java @@ -17,7 +17,7 @@ package google.registry.model.smd; import static com.google.common.truth.Truth.assertThat; import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.smd.SignedMarkRevocationList.SHARD_SIZE; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.DateTimeUtils.START_OF_TIME; import static org.joda.time.Duration.standardDays; import static org.junit.Assert.assertThrows; diff --git a/core/src/test/java/google/registry/model/tmch/ClaimsListShardTest.java b/core/src/test/java/google/registry/model/tmch/ClaimsListShardTest.java index 4e47264dd..ec24f5666 100644 --- a/core/src/test/java/google/registry/model/tmch/ClaimsListShardTest.java +++ b/core/src/test/java/google/registry/model/tmch/ClaimsListShardTest.java @@ -17,7 +17,7 @@ package google.registry.model.tmch; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth8.assertThat; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.util.DateTimeUtils.START_OF_TIME; import static org.joda.time.DateTimeZone.UTC; import static org.junit.Assert.assertThrows; diff --git a/core/src/test/java/google/registry/model/translators/CommitLogRevisionsTranslatorFactoryTest.java b/core/src/test/java/google/registry/model/translators/CommitLogRevisionsTranslatorFactoryTest.java index 7ff8b1ba2..c31e5219c 100644 --- a/core/src/test/java/google/registry/model/translators/CommitLogRevisionsTranslatorFactoryTest.java +++ b/core/src/test/java/google/registry/model/translators/CommitLogRevisionsTranslatorFactoryTest.java @@ -16,7 +16,7 @@ package google.registry.model.translators; import static com.google.common.truth.Truth.assertThat; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static org.joda.time.Duration.standardDays; import static org.joda.time.Duration.standardHours; diff --git a/core/src/test/java/google/registry/persistence/BloomFilterConverterTest.java b/core/src/test/java/google/registry/persistence/BloomFilterConverterTest.java index 9ef2e9b58..e73aa30bb 100644 --- a/core/src/test/java/google/registry/persistence/BloomFilterConverterTest.java +++ b/core/src/test/java/google/registry/persistence/BloomFilterConverterTest.java @@ -16,13 +16,13 @@ package google.registry.persistence; import static com.google.common.base.Charsets.US_ASCII; import static com.google.common.hash.Funnels.stringFunnel; import static com.google.common.truth.Truth.assertThat; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import com.google.common.collect.ImmutableSet; import com.google.common.hash.BloomFilter; import google.registry.model.ImmutableObject; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaUnitTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaUnitTestRule; import javax.persistence.Entity; import javax.persistence.Id; import org.junit.Rule; diff --git a/core/src/test/java/google/registry/persistence/CreateAutoTimestampConverterTest.java b/core/src/test/java/google/registry/persistence/CreateAutoTimestampConverterTest.java index 16a9b5225..beb117c37 100644 --- a/core/src/test/java/google/registry/persistence/CreateAutoTimestampConverterTest.java +++ b/core/src/test/java/google/registry/persistence/CreateAutoTimestampConverterTest.java @@ -14,12 +14,12 @@ package google.registry.persistence; import static com.google.common.truth.Truth.assertThat; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import google.registry.model.CreateAutoTimestamp; import google.registry.model.ImmutableObject; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaUnitTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaUnitTestRule; import javax.persistence.Entity; import javax.persistence.Id; import org.joda.time.DateTime; diff --git a/core/src/test/java/google/registry/persistence/CurrencyUnitConverterTest.java b/core/src/test/java/google/registry/persistence/CurrencyUnitConverterTest.java index bca02c8da..2a1e007fe 100644 --- a/core/src/test/java/google/registry/persistence/CurrencyUnitConverterTest.java +++ b/core/src/test/java/google/registry/persistence/CurrencyUnitConverterTest.java @@ -14,12 +14,12 @@ package google.registry.persistence; import static com.google.common.truth.Truth.assertThat; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import static org.junit.Assert.assertThrows; import google.registry.model.ImmutableObject; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaUnitTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaUnitTestRule; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.PersistenceException; diff --git a/core/src/test/java/google/registry/persistence/DateTimeConverterTest.java b/core/src/test/java/google/registry/persistence/DateTimeConverterTest.java index ca3087286..a209c76d5 100644 --- a/core/src/test/java/google/registry/persistence/DateTimeConverterTest.java +++ b/core/src/test/java/google/registry/persistence/DateTimeConverterTest.java @@ -15,11 +15,11 @@ package google.registry.persistence; import static com.google.common.truth.Truth.assertThat; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import google.registry.model.ImmutableObject; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaUnitTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaUnitTestRule; import java.sql.Timestamp; import javax.persistence.Entity; import javax.persistence.Id; diff --git a/core/src/test/java/google/registry/persistence/EnumSetUserTypeTest.java b/core/src/test/java/google/registry/persistence/EnumSetUserTypeTest.java index 50e90a944..e22655688 100644 --- a/core/src/test/java/google/registry/persistence/EnumSetUserTypeTest.java +++ b/core/src/test/java/google/registry/persistence/EnumSetUserTypeTest.java @@ -15,11 +15,11 @@ package google.registry.persistence; import static com.google.common.truth.Truth.assertThat; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import com.google.common.collect.ImmutableSet; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaUnitTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaUnitTestRule; import java.util.Set; import javax.persistence.Entity; import javax.persistence.Id; diff --git a/core/src/test/java/google/registry/persistence/JodaMoneyConverterTest.java b/core/src/test/java/google/registry/persistence/JodaMoneyConverterTest.java index e3b5067bc..283cbd615 100644 --- a/core/src/test/java/google/registry/persistence/JodaMoneyConverterTest.java +++ b/core/src/test/java/google/registry/persistence/JodaMoneyConverterTest.java @@ -14,12 +14,12 @@ package google.registry.persistence; import static com.google.common.truth.Truth.assertThat; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import com.google.common.collect.ImmutableMap; import google.registry.model.ImmutableObject; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaUnitTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaUnitTestRule; import java.math.BigDecimal; import java.util.Arrays; import java.util.List; diff --git a/core/src/test/java/google/registry/persistence/MapUserTypeTest.java b/core/src/test/java/google/registry/persistence/MapUserTypeTest.java index d31229ffd..8f0fb9a71 100644 --- a/core/src/test/java/google/registry/persistence/MapUserTypeTest.java +++ b/core/src/test/java/google/registry/persistence/MapUserTypeTest.java @@ -15,13 +15,13 @@ package google.registry.persistence; import static com.google.common.truth.Truth.assertThat; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import static org.junit.Assert.assertThrows; import com.google.common.collect.ImmutableMap; import google.registry.model.ImmutableObject; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaUnitTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaUnitTestRule; import java.util.Map; import javax.persistence.Entity; import javax.persistence.Id; diff --git a/core/src/test/java/google/registry/persistence/StringListUserTypeTest.java b/core/src/test/java/google/registry/persistence/StringListUserTypeTest.java index 6e16357da..cacd7cb03 100644 --- a/core/src/test/java/google/registry/persistence/StringListUserTypeTest.java +++ b/core/src/test/java/google/registry/persistence/StringListUserTypeTest.java @@ -15,13 +15,13 @@ package google.registry.persistence; import static com.google.common.truth.Truth.assertThat; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import static org.junit.Assert.assertThrows; import com.google.common.collect.ImmutableList; import google.registry.model.ImmutableObject; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaUnitTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaUnitTestRule; import java.util.List; import javax.persistence.Entity; import javax.persistence.Id; diff --git a/core/src/test/java/google/registry/persistence/StringSetUserTypeTest.java b/core/src/test/java/google/registry/persistence/StringSetUserTypeTest.java index 0900075ef..884d57963 100644 --- a/core/src/test/java/google/registry/persistence/StringSetUserTypeTest.java +++ b/core/src/test/java/google/registry/persistence/StringSetUserTypeTest.java @@ -15,12 +15,12 @@ package google.registry.persistence; import static com.google.common.truth.Truth.assertThat; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import com.google.common.collect.ImmutableSet; import google.registry.model.ImmutableObject; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaUnitTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaUnitTestRule; import java.util.Set; import javax.persistence.Entity; import javax.persistence.Id; diff --git a/core/src/test/java/google/registry/persistence/UpdateAutoTimestampConverterTest.java b/core/src/test/java/google/registry/persistence/UpdateAutoTimestampConverterTest.java index 6e7e2996f..8e772523f 100644 --- a/core/src/test/java/google/registry/persistence/UpdateAutoTimestampConverterTest.java +++ b/core/src/test/java/google/registry/persistence/UpdateAutoTimestampConverterTest.java @@ -14,12 +14,12 @@ package google.registry.persistence; import static com.google.common.truth.Truth.assertThat; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import google.registry.model.ImmutableObject; import google.registry.model.UpdateAutoTimestamp; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaUnitTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaUnitTestRule; import javax.persistence.Entity; import javax.persistence.Id; import org.junit.Rule; diff --git a/core/src/test/java/google/registry/persistence/ZonedDateTimeConverterTest.java b/core/src/test/java/google/registry/persistence/ZonedDateTimeConverterTest.java index 0a35b0910..41300e0cc 100644 --- a/core/src/test/java/google/registry/persistence/ZonedDateTimeConverterTest.java +++ b/core/src/test/java/google/registry/persistence/ZonedDateTimeConverterTest.java @@ -15,11 +15,11 @@ package google.registry.persistence; import static com.google.common.truth.Truth.assertThat; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import google.registry.model.ImmutableObject; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaUnitTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaUnitTestRule; import java.sql.Timestamp; import java.time.Instant; import java.time.ZonedDateTime; diff --git a/core/src/test/java/google/registry/model/transaction/DummyJpaTransactionManagerTest.java b/core/src/test/java/google/registry/persistence/transaction/DummyJpaTransactionManagerTest.java similarity index 89% rename from core/src/test/java/google/registry/model/transaction/DummyJpaTransactionManagerTest.java rename to core/src/test/java/google/registry/persistence/transaction/DummyJpaTransactionManagerTest.java index f01138605..c0831cd04 100644 --- a/core/src/test/java/google/registry/model/transaction/DummyJpaTransactionManagerTest.java +++ b/core/src/test/java/google/registry/persistence/transaction/DummyJpaTransactionManagerTest.java @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.model.transaction; +package google.registry.persistence.transaction; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import static org.junit.Assert.assertThrows; import org.junit.Test; diff --git a/core/src/test/java/google/registry/model/transaction/JpaTestRules.java b/core/src/test/java/google/registry/persistence/transaction/JpaTestRules.java similarity index 98% rename from core/src/test/java/google/registry/model/transaction/JpaTestRules.java rename to core/src/test/java/google/registry/persistence/transaction/JpaTestRules.java index d94e76aed..4b7aa5830 100644 --- a/core/src/test/java/google/registry/model/transaction/JpaTestRules.java +++ b/core/src/test/java/google/registry/persistence/transaction/JpaTestRules.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.model.transaction; +package google.registry.persistence.transaction; import static com.google.common.base.Preconditions.checkState; @@ -30,6 +30,7 @@ import java.util.Optional; * JpaTransactionManager} instances. */ public class JpaTestRules { + private static final String GOLDEN_SCHEMA_SQL_PATH = "sql/schema/nomulus.golden.sql"; /** diff --git a/core/src/test/java/google/registry/model/transaction/JpaTransactionManagerImplTest.java b/core/src/test/java/google/registry/persistence/transaction/JpaTransactionManagerImplTest.java similarity index 96% rename from core/src/test/java/google/registry/model/transaction/JpaTransactionManagerImplTest.java rename to core/src/test/java/google/registry/persistence/transaction/JpaTransactionManagerImplTest.java index dd509e9de..1107e4580 100644 --- a/core/src/test/java/google/registry/model/transaction/JpaTransactionManagerImplTest.java +++ b/core/src/test/java/google/registry/persistence/transaction/JpaTransactionManagerImplTest.java @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.model.transaction; +package google.registry.persistence.transaction; import static com.google.common.truth.Truth.assertThat; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import static google.registry.testing.TestDataHelper.fileClassPath; import static org.junit.Assert.assertThrows; -import google.registry.model.transaction.JpaTestRules.JpaUnitTestRule; +import google.registry.persistence.transaction.JpaTestRules.JpaUnitTestRule; import google.registry.testing.FakeClock; import java.math.BigInteger; import javax.persistence.EntityManager; @@ -32,6 +32,7 @@ import org.junit.runners.JUnit4; /** Unit tests for {@link JpaTransactionManagerImpl}. */ @RunWith(JUnit4.class) public class JpaTransactionManagerImplTest { + @Rule public final JpaUnitTestRule jpaRule = new JpaTestRules.Builder() diff --git a/core/src/test/java/google/registry/model/transaction/JpaTransactionManagerRule.java b/core/src/test/java/google/registry/persistence/transaction/JpaTransactionManagerRule.java similarity index 97% rename from core/src/test/java/google/registry/model/transaction/JpaTransactionManagerRule.java rename to core/src/test/java/google/registry/persistence/transaction/JpaTransactionManagerRule.java index bfc96d977..844dc9004 100644 --- a/core/src/test/java/google/registry/model/transaction/JpaTransactionManagerRule.java +++ b/core/src/test/java/google/registry/persistence/transaction/JpaTransactionManagerRule.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.model.transaction; +package google.registry.persistence.transaction; import static com.google.common.truth.Truth.assertThat; import static org.joda.time.DateTimeZone.UTC; @@ -23,11 +23,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; import com.google.common.io.Resources; -import google.registry.model.transaction.JpaTestRules.JpaIntegrationTestRule; import google.registry.persistence.HibernateSchemaExporter; import google.registry.persistence.NomulusPostgreSql; import google.registry.persistence.PersistenceModule; import google.registry.persistence.PersistenceXmlUtility; +import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationTestRule; import google.registry.testing.FakeClock; import java.io.File; import java.io.IOException; @@ -63,7 +63,7 @@ import org.testcontainers.containers.PostgreSQLContainer; */ abstract class JpaTransactionManagerRule extends ExternalResource { private static final String DB_CLEANUP_SQL_PATH = - "google/registry/model/transaction/cleanup_database.sql"; + "google/registry/persistence/transaction/cleanup_database.sql"; private static final String MANAGEMENT_DB_NAME = "management"; private static final String POSTGRES_DB_NAME = "postgres"; // The type of JDBC connections started by the tests. This string value diff --git a/core/src/test/java/google/registry/model/transaction/JpaTransactionManagerRuleTest.java b/core/src/test/java/google/registry/persistence/transaction/JpaTransactionManagerRuleTest.java similarity index 93% rename from core/src/test/java/google/registry/model/transaction/JpaTransactionManagerRuleTest.java rename to core/src/test/java/google/registry/persistence/transaction/JpaTransactionManagerRuleTest.java index 2ba56519d..c70e16f8c 100644 --- a/core/src/test/java/google/registry/model/transaction/JpaTransactionManagerRuleTest.java +++ b/core/src/test/java/google/registry/persistence/transaction/JpaTransactionManagerRuleTest.java @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -package google.registry.model.transaction; +package google.registry.persistence.transaction; import static com.google.common.truth.Truth.assertThat; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import static org.junit.Assert.assertThrows; import google.registry.model.ImmutableObject; -import google.registry.model.transaction.JpaTestRules.JpaUnitTestRule; +import google.registry.persistence.transaction.JpaTestRules.JpaUnitTestRule; import google.registry.schema.tmch.ClaimsList; import java.util.List; import javax.persistence.Entity; diff --git a/core/src/test/java/google/registry/rde/RdeUploadActionTest.java b/core/src/test/java/google/registry/rde/RdeUploadActionTest.java index 80cfee220..e9cde6b0a 100644 --- a/core/src/test/java/google/registry/rde/RdeUploadActionTest.java +++ b/core/src/test/java/google/registry/rde/RdeUploadActionTest.java @@ -20,7 +20,7 @@ import static com.google.common.truth.Truth.assertWithMessage; import static google.registry.model.common.Cursor.CursorType.RDE_STAGING; import static google.registry.model.common.Cursor.CursorType.RDE_UPLOAD_SFTP; import static google.registry.model.rde.RdeMode.FULL; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.testing.DatastoreHelper.createTld; import static google.registry.testing.DatastoreHelper.persistResource; import static google.registry.testing.DatastoreHelper.persistSimpleResource; diff --git a/core/src/test/java/google/registry/schema/cursor/CursorDaoTest.java b/core/src/test/java/google/registry/schema/cursor/CursorDaoTest.java index e7dca1893..1b60573a9 100644 --- a/core/src/test/java/google/registry/schema/cursor/CursorDaoTest.java +++ b/core/src/test/java/google/registry/schema/cursor/CursorDaoTest.java @@ -25,8 +25,8 @@ import com.google.common.collect.ImmutableSet; import com.google.common.testing.TestLogHandler; import google.registry.model.common.Cursor.CursorType; import google.registry.model.registry.Registry; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaIntegrationTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationTestRule; import google.registry.testing.AppEngineRule; import google.registry.testing.FakeClock; import java.util.List; diff --git a/core/src/test/java/google/registry/schema/integration/SqlIntegrationMembershipTest.java b/core/src/test/java/google/registry/schema/integration/SqlIntegrationMembershipTest.java index 30bf2bcb2..542c71e9b 100644 --- a/core/src/test/java/google/registry/schema/integration/SqlIntegrationMembershipTest.java +++ b/core/src/test/java/google/registry/schema/integration/SqlIntegrationMembershipTest.java @@ -19,7 +19,7 @@ import static com.google.common.truth.Truth.assertWithMessage; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; import com.google.common.collect.Sets.SetView; -import google.registry.model.transaction.JpaTestRules.JpaIntegrationTestRule; +import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationTestRule; import io.github.classgraph.ClassGraph; import io.github.classgraph.ScanResult; import java.lang.reflect.Field; diff --git a/core/src/test/java/google/registry/schema/integration/SqlIntegrationTestSuite.java b/core/src/test/java/google/registry/schema/integration/SqlIntegrationTestSuite.java index 00e39a77b..479439688 100644 --- a/core/src/test/java/google/registry/schema/integration/SqlIntegrationTestSuite.java +++ b/core/src/test/java/google/registry/schema/integration/SqlIntegrationTestSuite.java @@ -15,7 +15,7 @@ package google.registry.schema.integration; import google.registry.model.registry.RegistryLockDaoTest; -import google.registry.model.transaction.JpaTestRules.JpaIntegrationTestRule; +import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationTestRule; import google.registry.schema.cursor.CursorDaoTest; import google.registry.schema.tld.PremiumListDaoTest; import google.registry.schema.tld.PremiumListUtilsTest; diff --git a/core/src/test/java/google/registry/schema/tld/PremiumListDaoTest.java b/core/src/test/java/google/registry/schema/tld/PremiumListDaoTest.java index 33cdd5c50..82cf629d5 100644 --- a/core/src/test/java/google/registry/schema/tld/PremiumListDaoTest.java +++ b/core/src/test/java/google/registry/schema/tld/PremiumListDaoTest.java @@ -17,7 +17,7 @@ package google.registry.schema.tld; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth8.assertThat; import static google.registry.model.common.EntityGroupRoot.getCrossTldKey; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import static google.registry.testing.DatastoreHelper.createTld; import static google.registry.testing.DatastoreHelper.newRegistry; import static google.registry.testing.DatastoreHelper.persistResource; @@ -28,8 +28,8 @@ import static org.junit.Assert.assertThrows; import com.google.common.collect.ImmutableMap; import com.googlecode.objectify.Key; import google.registry.model.registry.Registry; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaIntegrationTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationTestRule; import google.registry.testing.AppEngineRule; import java.math.BigDecimal; import java.util.Optional; diff --git a/core/src/test/java/google/registry/schema/tld/PremiumListUtilsTest.java b/core/src/test/java/google/registry/schema/tld/PremiumListUtilsTest.java index e33f35df1..39afdd810 100644 --- a/core/src/test/java/google/registry/schema/tld/PremiumListUtilsTest.java +++ b/core/src/test/java/google/registry/schema/tld/PremiumListUtilsTest.java @@ -18,8 +18,8 @@ import static com.google.common.truth.Truth.assertThat; import static google.registry.schema.tld.PremiumListUtils.parseToPremiumList; import static org.junit.Assert.assertThrows; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaIntegrationTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationTestRule; import google.registry.testing.AppEngineRule; import java.math.BigDecimal; import org.junit.Rule; diff --git a/core/src/test/java/google/registry/schema/tld/ReservedListDaoTest.java b/core/src/test/java/google/registry/schema/tld/ReservedListDaoTest.java index a55da2c46..12eb25dab 100644 --- a/core/src/test/java/google/registry/schema/tld/ReservedListDaoTest.java +++ b/core/src/test/java/google/registry/schema/tld/ReservedListDaoTest.java @@ -15,12 +15,12 @@ package google.registry.schema.tld; import static com.google.common.truth.Truth.assertThat; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import com.google.common.collect.ImmutableMap; import google.registry.model.registry.label.ReservationType; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaIntegrationTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationTestRule; import google.registry.schema.tld.ReservedList.ReservedEntry; import org.junit.Rule; import org.junit.Test; diff --git a/core/src/test/java/google/registry/schema/tmch/ClaimsListDaoTest.java b/core/src/test/java/google/registry/schema/tmch/ClaimsListDaoTest.java index 1fb986383..d038d0bf6 100644 --- a/core/src/test/java/google/registry/schema/tmch/ClaimsListDaoTest.java +++ b/core/src/test/java/google/registry/schema/tmch/ClaimsListDaoTest.java @@ -17,8 +17,8 @@ package google.registry.schema.tmch; import static com.google.common.truth.Truth.assertThat; import com.google.common.collect.ImmutableMap; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaIntegrationTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationTestRule; import google.registry.testing.FakeClock; import org.junit.Rule; import org.junit.Test; diff --git a/core/src/test/java/google/registry/server/RegistryTestServerMain.java b/core/src/test/java/google/registry/server/RegistryTestServerMain.java index 7f9ebe086..a7526186e 100644 --- a/core/src/test/java/google/registry/server/RegistryTestServerMain.java +++ b/core/src/test/java/google/registry/server/RegistryTestServerMain.java @@ -19,7 +19,7 @@ import com.beust.jcommander.Parameter; import com.beust.jcommander.Parameters; import com.google.common.collect.ImmutableList; import com.google.common.net.HostAndPort; -import google.registry.model.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules; import google.registry.testing.AppEngineRule; import google.registry.testing.UserInfo; import google.registry.tools.params.HostAndPortParameter; diff --git a/core/src/test/java/google/registry/testing/DatastoreHelper.java b/core/src/test/java/google/registry/testing/DatastoreHelper.java index 3cc552a0b..1fd465ccf 100644 --- a/core/src/test/java/google/registry/testing/DatastoreHelper.java +++ b/core/src/test/java/google/registry/testing/DatastoreHelper.java @@ -30,7 +30,7 @@ import static google.registry.model.ResourceTransferUtils.createTransferResponse import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.registry.Registry.TldState.GENERAL_AVAILABILITY; import static google.registry.model.registry.label.PremiumListUtils.parentPremiumListEntriesOnRevision; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.pricing.PricingEngineProxy.getDomainRenewCost; import static google.registry.util.CollectionUtils.difference; import static google.registry.util.CollectionUtils.union; diff --git a/core/src/test/java/google/registry/tmch/LordnTaskUtilsTest.java b/core/src/test/java/google/registry/tmch/LordnTaskUtilsTest.java index b501d752d..d34bf72ce 100644 --- a/core/src/test/java/google/registry/tmch/LordnTaskUtilsTest.java +++ b/core/src/test/java/google/registry/tmch/LordnTaskUtilsTest.java @@ -16,7 +16,7 @@ package google.registry.tmch; import static com.google.common.truth.Truth.assertThat; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.transaction.TransactionManagerFactory.tm; +import static google.registry.persistence.transaction.TransactionManagerFactory.tm; import static google.registry.testing.DatastoreHelper.createTld; import static google.registry.testing.DatastoreHelper.loadRegistrar; import static google.registry.testing.DatastoreHelper.persistActiveContact; diff --git a/core/src/test/java/google/registry/tools/CreateOrUpdateReservedListCommandTestCase.java b/core/src/test/java/google/registry/tools/CreateOrUpdateReservedListCommandTestCase.java index f2c7b2465..9f7cb0bc7 100644 --- a/core/src/test/java/google/registry/tools/CreateOrUpdateReservedListCommandTestCase.java +++ b/core/src/test/java/google/registry/tools/CreateOrUpdateReservedListCommandTestCase.java @@ -16,7 +16,7 @@ package google.registry.tools; import static com.google.common.truth.Truth.assertThat; import static google.registry.model.registry.label.ReservationType.FULLY_BLOCKED; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import static google.registry.testing.TestDataHelper.loadFile; import static java.nio.charset.StandardCharsets.UTF_8; import static org.junit.Assert.assertThrows; @@ -25,8 +25,8 @@ import com.beust.jcommander.ParameterException; import com.google.common.io.Files; import com.google.common.truth.Truth8; import google.registry.model.registry.label.ReservedList; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaIntegrationTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationTestRule; import google.registry.schema.tld.ReservedList.ReservedEntry; import google.registry.schema.tld.ReservedListDao; import java.io.File; diff --git a/core/src/test/java/google/registry/tools/server/CreatePremiumListActionTest.java b/core/src/test/java/google/registry/tools/server/CreatePremiumListActionTest.java index 85699e09b..233f48033 100644 --- a/core/src/test/java/google/registry/tools/server/CreatePremiumListActionTest.java +++ b/core/src/test/java/google/registry/tools/server/CreatePremiumListActionTest.java @@ -24,8 +24,8 @@ import static javax.servlet.http.HttpServletResponse.SC_OK; import google.registry.model.registry.Registry; import google.registry.model.registry.label.PremiumList; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaIntegrationTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationTestRule; import google.registry.testing.AppEngineRule; import google.registry.testing.FakeJsonResponse; import org.joda.money.Money; diff --git a/core/src/test/java/google/registry/tools/server/UpdatePremiumListActionTest.java b/core/src/test/java/google/registry/tools/server/UpdatePremiumListActionTest.java index 314875446..178ba3238 100644 --- a/core/src/test/java/google/registry/tools/server/UpdatePremiumListActionTest.java +++ b/core/src/test/java/google/registry/tools/server/UpdatePremiumListActionTest.java @@ -17,7 +17,7 @@ package google.registry.tools.server; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth8.assertThat; import static google.registry.model.registry.label.PremiumListUtils.getPremiumPrice; -import static google.registry.model.transaction.TransactionManagerFactory.jpaTm; +import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm; import static google.registry.schema.tld.PremiumListUtils.parseToPremiumList; import static google.registry.testing.DatastoreHelper.createTlds; import static google.registry.testing.DatastoreHelper.loadPremiumListEntries; @@ -26,8 +26,8 @@ import static javax.servlet.http.HttpServletResponse.SC_OK; import google.registry.model.registry.Registry; import google.registry.model.registry.label.PremiumList; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaIntegrationTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationTestRule; import google.registry.schema.tld.PremiumListDao; import google.registry.testing.AppEngineRule; import google.registry.testing.DatastoreHelper; diff --git a/core/src/test/java/google/registry/ui/server/registrar/RegistryLockGetActionTest.java b/core/src/test/java/google/registry/ui/server/registrar/RegistryLockGetActionTest.java index 6b800186f..0fb8724b1 100644 --- a/core/src/test/java/google/registry/ui/server/registrar/RegistryLockGetActionTest.java +++ b/core/src/test/java/google/registry/ui/server/registrar/RegistryLockGetActionTest.java @@ -30,8 +30,8 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSetMultimap; import com.google.gson.Gson; import google.registry.model.registry.RegistryLockDao; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaIntegrationTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationTestRule; import google.registry.request.Action.Method; import google.registry.request.auth.AuthLevel; import google.registry.request.auth.AuthResult; diff --git a/core/src/test/java/google/registry/webdriver/TestServerRule.java b/core/src/test/java/google/registry/webdriver/TestServerRule.java index b66bdaaf8..52cc1564f 100644 --- a/core/src/test/java/google/registry/webdriver/TestServerRule.java +++ b/core/src/test/java/google/registry/webdriver/TestServerRule.java @@ -23,8 +23,8 @@ import static google.registry.util.NetworkUtils.pickUnusedPort; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.net.HostAndPort; -import google.registry.model.transaction.JpaTestRules; -import google.registry.model.transaction.JpaTestRules.JpaIntegrationTestRule; +import google.registry.persistence.transaction.JpaTestRules; +import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationTestRule; import google.registry.request.auth.AuthenticatedRegistrarAccessor; import google.registry.server.Fixture; import google.registry.server.Route; diff --git a/core/src/test/resources/google/registry/model/transaction/cleanup_database.sql b/core/src/test/resources/google/registry/persistence/transaction/cleanup_database.sql similarity index 100% rename from core/src/test/resources/google/registry/model/transaction/cleanup_database.sql rename to core/src/test/resources/google/registry/persistence/transaction/cleanup_database.sql diff --git a/core/src/test/resources/google/registry/model/transaction/test_schema.sql b/core/src/test/resources/google/registry/persistence/transaction/test_schema.sql similarity index 100% rename from core/src/test/resources/google/registry/model/transaction/test_schema.sql rename to core/src/test/resources/google/registry/persistence/transaction/test_schema.sql