diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/ConfigurationValidationTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/ConfigurationValidationTest.java index 1efa6e3256..2dc2565950 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/ConfigurationValidationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/ConfigurationValidationTest.java @@ -6,7 +6,6 @@ */ package org.hibernate.orm.test.multitenancy; -import org.hibernate.MultiTenancyStrategy; import org.hibernate.boot.MetadataSources; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.cfg.Environment; @@ -31,7 +30,6 @@ public class ConfigurationValidationTest extends BaseUnitTestCase { ServiceRegistryImplementor serviceRegistry = null; try { serviceRegistry = (ServiceRegistryImplementor) new StandardServiceRegistryBuilder() - .applySetting( Environment.MULTI_TENANT, MultiTenancyStrategy.SCHEMA ) .applySetting( Environment.MULTI_TENANT_CONNECTION_PROVIDER, "class.not.present.in.classpath" ) .build(); @@ -53,7 +51,6 @@ public class ConfigurationValidationTest extends BaseUnitTestCase { ServiceRegistryImplementor serviceRegistry = null; try { serviceRegistry = (ServiceRegistryImplementor) new StandardServiceRegistryBuilder() - .applySetting( Environment.MULTI_TENANT, MultiTenancyStrategy.SCHEMA ) .applySetting( Environment.CONNECTION_HANDLING, PhysicalConnectionHandlingMode.DELAYED_ACQUISITION_AND_RELEASE_AFTER_STATEMENT.name() ) .addService( MultiTenantConnectionProvider.class, diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/discriminator/DiscriminatorMultiTenancyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/discriminator/DiscriminatorMultiTenancyTest.java index f9d594efe4..4ba7a710a4 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/discriminator/DiscriminatorMultiTenancyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/discriminator/DiscriminatorMultiTenancyTest.java @@ -12,7 +12,6 @@ import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Consumer; -import org.hibernate.MultiTenancyStrategy; import org.hibernate.Session; import org.hibernate.boot.Metadata; import org.hibernate.boot.MetadataSources; @@ -59,7 +58,6 @@ public class DiscriminatorMultiTenancyTest extends BaseUnitTestCase { @Before public void setUp() { Map settings = new HashMap(); - settings.put(Environment.MULTI_TENANT, MultiTenancyStrategy.DISCRIMINATOR); settings.put(Environment.MULTI_TENANT_IDENTIFIER_RESOLVER, currentTenantResolver); settings.put(Environment.CACHE_REGION_FACTORY, CachingRegionFactory.class.getName()); settings.put(Environment.GENERATE_STATISTICS, "true"); diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/schema/AbstractSchemaBasedMultiTenancyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/schema/AbstractSchemaBasedMultiTenancyTest.java index 09f5f67852..ada265af86 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/schema/AbstractSchemaBasedMultiTenancyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/multitenancy/schema/AbstractSchemaBasedMultiTenancyTest.java @@ -9,7 +9,6 @@ package org.hibernate.orm.test.multitenancy.schema; import java.util.HashMap; import java.util.Map; -import org.hibernate.MultiTenancyStrategy; import org.hibernate.SessionBuilder; import org.hibernate.boot.Metadata; import org.hibernate.boot.MetadataSources; @@ -61,7 +60,6 @@ public abstract class AbstractSchemaBasedMultiTenancyTest { - Customer customer = (Customer) session.load( Customer.class, 1L ); + Customer customer = session.load( Customer.class, 1L ); Assert.assertEquals( "steve", customer.getName() ); // also, make sure this came from second level Assert.assertEquals( 1, sessionFactory.getStatistics().getSecondLevelCacheHitCount() ); @@ -187,7 +185,7 @@ public abstract class AbstractSchemaBasedMultiTenancyTest { - Customer customer = (Customer) session.load( Customer.class, 1L ); + Customer customer = session.load( Customer.class, 1L ); Assert.assertEquals( "john", customer.getName() ); // also, make sure this came from second level Assert.assertEquals( 1, sessionFactory.getStatistics().getSecondLevelCacheHitCount() ); @@ -198,7 +196,7 @@ public abstract class AbstractSchemaBasedMultiTenancyTest { - Customer customer = (Customer) session.load( Customer.class, 1L ); + Customer customer = session.load( Customer.class, 1L ); Assert.assertEquals( "steve", customer.getName() ); // also, make sure this came from second level Assert.assertEquals( 0, sessionFactory.getStatistics().getSecondLevelCacheHitCount() ); @@ -207,7 +205,7 @@ public abstract class AbstractSchemaBasedMultiTenancyTest { - Customer customer = (Customer) session.load( Customer.class, 1L ); + Customer customer = session.load( Customer.class, 1L ); Assert.assertEquals( "john", customer.getName() ); // also, make sure this came from second level Assert.assertEquals( 0, sessionFactory.getStatistics().getSecondLevelCacheHitCount() ); diff --git a/hibernate-core/src/test/java/org/hibernate/test/tenantid/Account.java b/hibernate-core/src/test/java/org/hibernate/test/tenantid/Account.java index a2b5b2bb37..aeaaa9b5ca 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/tenantid/Account.java +++ b/hibernate-core/src/test/java/org/hibernate/test/tenantid/Account.java @@ -8,10 +8,10 @@ package org.hibernate.test.tenantid; import org.hibernate.annotations.TenantId; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.ManyToOne; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; @Entity public class Account { diff --git a/hibernate-core/src/test/java/org/hibernate/test/tenantid/Client.java b/hibernate-core/src/test/java/org/hibernate/test/tenantid/Client.java index eee996dc2f..6bcc965af5 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/tenantid/Client.java +++ b/hibernate-core/src/test/java/org/hibernate/test/tenantid/Client.java @@ -8,10 +8,10 @@ package org.hibernate.test.tenantid; import org.hibernate.annotations.TenantId; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.OneToMany; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.OneToMany; import java.util.HashSet; import java.util.Set;