Fixed and reorganized tests in hibernate-jcache
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
This commit is contained in:
parent
60e97bcfca
commit
3ae6057311
|
@ -4,28 +4,29 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.jcache.test;
|
||||
package org.hibernate.orm.test.jcache;
|
||||
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
|
||||
import org.hibernate.testing.junit4.BaseUnitTestCase;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.hibernate.testing.orm.junit.BaseUnitTest;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
|
||||
/**
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public abstract class BaseFunctionalTest extends BaseUnitTestCase {
|
||||
@BaseUnitTest
|
||||
public abstract class BaseFunctionalTest {
|
||||
private SessionFactoryImplementor sessionFactory;
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void createSessionFactory() {
|
||||
assert sessionFactory == null || sessionFactory.isClosed();
|
||||
TestHelper.preBuildAllCaches();
|
||||
sessionFactory = TestHelper.buildStandardSessionFactory();
|
||||
}
|
||||
|
||||
@After
|
||||
@AfterEach
|
||||
public void releaseSessionFactory() {
|
||||
if ( sessionFactory != null ) {
|
||||
sessionFactory.close();
|
|
@ -4,27 +4,28 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.jcache.test;
|
||||
package org.hibernate.orm.test.jcache;
|
||||
|
||||
import org.hibernate.cache.spi.Region;
|
||||
import org.hibernate.cache.spi.access.AccessType;
|
||||
import org.hibernate.cache.spi.access.EntityDataAccess;
|
||||
import org.hibernate.cache.spi.support.DomainDataRegionTemplate;
|
||||
import org.hibernate.jcache.test.domain.Event;
|
||||
import org.hibernate.jcache.test.domain.Item;
|
||||
import org.hibernate.jcache.test.domain.VersionedItem;
|
||||
import org.hibernate.orm.test.jcache.domain.Event;
|
||||
import org.hibernate.orm.test.jcache.domain.Item;
|
||||
import org.hibernate.orm.test.jcache.domain.VersionedItem;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hibernate.testing.junit4.ExtraAssertions.assertTyping;
|
||||
import static org.hibernate.testing.orm.junit.ExtraAssertions.assertTyping;
|
||||
|
||||
/**
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public class DomainDataRegionTest extends BaseFunctionalTest {
|
||||
@Override
|
||||
@BeforeEach
|
||||
public void createSessionFactory() {
|
||||
TestHelper.createCache( "a.b.c" );
|
||||
super.createSessionFactory();
|
|
@ -4,7 +4,7 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.test.cache.jcache;
|
||||
package org.hibernate.orm.test.jcache;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
@ -15,25 +15,24 @@ import org.hibernate.cache.spi.access.SoftLock;
|
|||
import org.hibernate.cache.spi.support.AbstractReadWriteAccess;
|
||||
import org.hibernate.cache.spi.support.DomainDataRegionTemplate;
|
||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||
import org.hibernate.jcache.test.BaseFunctionalTest;
|
||||
import org.hibernate.jcache.test.domain.Event;
|
||||
import org.hibernate.jcache.test.domain.EventManager;
|
||||
import org.hibernate.jcache.test.domain.Item;
|
||||
import org.hibernate.jcache.test.domain.Person;
|
||||
import org.hibernate.jcache.test.domain.PhoneNumber;
|
||||
import org.hibernate.jcache.test.domain.VersionedItem;
|
||||
import org.hibernate.orm.test.jcache.domain.Event;
|
||||
import org.hibernate.orm.test.jcache.domain.EventManager;
|
||||
import org.hibernate.orm.test.jcache.domain.Item;
|
||||
import org.hibernate.orm.test.jcache.domain.Person;
|
||||
import org.hibernate.orm.test.jcache.domain.PhoneNumber;
|
||||
import org.hibernate.orm.test.jcache.domain.VersionedItem;
|
||||
import org.hibernate.stat.CacheRegionStatistics;
|
||||
import org.hibernate.stat.QueryStatistics;
|
||||
import org.hibernate.stat.Statistics;
|
||||
|
||||
import org.hibernate.testing.junit4.ExtraAssertions;
|
||||
import org.junit.Test;
|
||||
import org.hibernate.testing.orm.junit.ExtraAssertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
/**
|
||||
* @author Chris Dennis
|
||||
|
@ -41,7 +40,7 @@ import static org.junit.Assert.fail;
|
|||
*/
|
||||
public class HibernateCacheTest extends BaseFunctionalTest {
|
||||
@Test
|
||||
public void testQueryCacheInvalidation() throws Exception {
|
||||
public void testQueryCacheInvalidation() {
|
||||
Session s = sessionFactory().openSession();
|
||||
Transaction t = s.beginTransaction();
|
||||
Item i = new Item();
|
||||
|
@ -60,7 +59,7 @@ public class HibernateCacheTest extends BaseFunctionalTest {
|
|||
|
||||
s = sessionFactory().openSession();
|
||||
t = s.beginTransaction();
|
||||
i = (Item) s.get( Item.class, i.getId() );
|
||||
i = s.get( Item.class, i.getId() );
|
||||
|
||||
assertThat( slcs.getHitCount(), equalTo( 1L ) );
|
||||
assertThat( slcs.getMissCount(), equalTo( 0L ) );
|
|
@ -4,7 +4,7 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.jcache.test;
|
||||
package org.hibernate.orm.test.jcache;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
|
@ -19,18 +19,17 @@ import org.hibernate.cache.spi.support.DomainDataRegionTemplate;
|
|||
import org.hibernate.cfg.AvailableSettings;
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.service.ServiceRegistry;
|
||||
import org.hibernate.testing.orm.junit.ExtraAssertions;
|
||||
|
||||
import org.hibernate.testing.junit4.BaseUnitTestCase;
|
||||
import org.hibernate.testing.junit4.ExtraAssertions;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.hibernate.testing.transaction.TransactionUtil2.inTransaction;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* Tests for handling of data just inserted during a transaction being read from the database
|
||||
|
@ -39,12 +38,12 @@ import static org.junit.Assert.assertTrue;
|
|||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public class InsertedDataTest extends BaseUnitTestCase {
|
||||
public class InsertedDataTest {
|
||||
|
||||
private ServiceRegistry serviceRegistry;
|
||||
private SessionFactoryImplementor sessionFactory;
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void acquireResources() {
|
||||
serviceRegistry = TestHelper.getStandardServiceRegistryBuilder()
|
||||
.applySetting( AvailableSettings.CACHE_REGION_PREFIX, "" )
|
||||
|
@ -59,7 +58,7 @@ public class InsertedDataTest extends BaseUnitTestCase {
|
|||
sessionFactory = (SessionFactoryImplementor) metadata.buildSessionFactory();
|
||||
}
|
||||
|
||||
@After
|
||||
@AfterEach
|
||||
public void releaseResources() {
|
||||
if ( sessionFactory != null ) {
|
||||
sessionFactory.close();
|
||||
|
@ -87,9 +86,7 @@ public class InsertedDataTest extends BaseUnitTestCase {
|
|||
|
||||
inTransaction(
|
||||
sessionFactory,
|
||||
s -> {
|
||||
s.createQuery( "delete CacheableItem" ).executeUpdate();
|
||||
}
|
||||
s -> s.createQuery( "delete CacheableItem" ).executeUpdate()
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -215,7 +212,7 @@ public class InsertedDataTest extends BaseUnitTestCase {
|
|||
sessionFactory,
|
||||
s -> {
|
||||
CacheableItem item = s.get( CacheableItem.class, 1L );
|
||||
assertNull( "it should be null", item );
|
||||
assertNull( item, "it should be null" );
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -266,7 +263,7 @@ public class InsertedDataTest extends BaseUnitTestCase {
|
|||
sessionFactory,
|
||||
s -> {
|
||||
final CacheableItem item = s.get( CacheableItem.class, 1L );
|
||||
assertNull( "it should be null", item );
|
||||
assertNull( item, "it should be null" );
|
||||
}
|
||||
);
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.test.cache.jcache.config;
|
||||
package org.hibernate.orm.test.jcache;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -12,6 +12,7 @@ import org.hibernate.cache.jcache.ConfigSettings;
|
|||
import org.hibernate.cfg.Environment;
|
||||
|
||||
import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase;
|
||||
import org.hibernate.orm.test.jcache.domain.Product;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate;
|
|
@ -4,7 +4,7 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.test.cache.jcache.config;
|
||||
package org.hibernate.orm.test.jcache;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -12,6 +12,7 @@ import org.hibernate.cache.jcache.ConfigSettings;
|
|||
import org.hibernate.cfg.Environment;
|
||||
|
||||
import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase;
|
||||
import org.hibernate.orm.test.jcache.domain.Product;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate;
|
|
@ -4,7 +4,7 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.test.cache.jcache.config;
|
||||
package org.hibernate.orm.test.jcache;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -12,6 +12,7 @@ import org.hibernate.cache.jcache.ConfigSettings;
|
|||
import org.hibernate.cfg.Environment;
|
||||
|
||||
import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase;
|
||||
import org.hibernate.orm.test.jcache.domain.Product;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate;
|
|
@ -4,7 +4,7 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.test.cache.jcache;
|
||||
package org.hibernate.orm.test.jcache;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -4,7 +4,7 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.jcache.test;
|
||||
package org.hibernate.orm.test.jcache;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
@ -15,6 +15,7 @@ import org.hibernate.cache.CacheException;
|
|||
import org.hibernate.cache.jcache.ConfigSettings;
|
||||
import org.hibernate.cache.spi.SecondLevelCacheLogger;
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.orm.test.jcache.TestHelper;
|
||||
import org.hibernate.service.spi.ServiceException;
|
||||
|
||||
import org.hibernate.testing.junit4.BaseUnitTestCase;
|
|
@ -4,7 +4,7 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.jcache.test;
|
||||
package org.hibernate.orm.test.jcache;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -22,32 +22,36 @@ import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
|
|||
import org.hibernate.cfg.AvailableSettings;
|
||||
import org.hibernate.dialect.CockroachDialect;
|
||||
import org.hibernate.dialect.DerbyDialect;
|
||||
import org.hibernate.dialect.Dialect;
|
||||
import org.hibernate.dialect.H2Dialect;
|
||||
import org.hibernate.dialect.HSQLDialect;
|
||||
import org.hibernate.dialect.SybaseASEDialect;
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.service.ServiceRegistry;
|
||||
import org.hibernate.testing.SkipForDialect;
|
||||
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
import org.hibernate.testing.junit4.BaseUnitTestCase;
|
||||
import org.hibernate.testing.orm.junit.BaseUnitTest;
|
||||
import org.hibernate.testing.orm.junit.DialectContext;
|
||||
import org.hibernate.testing.orm.junit.SkipForDialect;
|
||||
|
||||
import org.hibernate.tool.schema.Action;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.hibernate.testing.transaction.TransactionUtil2.inTransaction;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* @author Zhenlei Huang
|
||||
*/
|
||||
@TestForIssue(jiraKey = "HHH-10649")
|
||||
public class RefreshUpdatedDataTest extends BaseUnitTestCase {
|
||||
@BaseUnitTest
|
||||
public class RefreshUpdatedDataTest {
|
||||
private ServiceRegistry serviceRegistry;
|
||||
private SessionFactoryImplementor sessionFactory;
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
@SuppressWarnings("unused")
|
||||
public void acquireResources() {
|
||||
final StandardServiceRegistryBuilder ssrb = new StandardServiceRegistryBuilder()
|
||||
|
@ -76,7 +80,7 @@ public class RefreshUpdatedDataTest extends BaseUnitTestCase {
|
|||
sessionFactory = (SessionFactoryImplementor) metadata.buildSessionFactory();
|
||||
}
|
||||
|
||||
@After
|
||||
@AfterEach
|
||||
@SuppressWarnings("unused")
|
||||
public void releaseResources() {
|
||||
if ( sessionFactory != null ) {
|
||||
|
@ -89,8 +93,10 @@ public class RefreshUpdatedDataTest extends BaseUnitTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@SkipForDialect(value = CockroachDialect.class, comment = "does not support nested transactions")
|
||||
@SkipForDialect(value = DerbyDialect.class, comment = "Derby does not support nested transactions")
|
||||
@SkipForDialect(dialectClass = CockroachDialect.class, matchSubTypes = true, reason = "does not support nested transactions")
|
||||
@SkipForDialect(dialectClass = DerbyDialect.class, matchSubTypes = true, reason = "Derby does not support nested transactions")
|
||||
@SkipForDialect(dialectClass = SybaseASEDialect.class, matchSubTypes = true)
|
||||
@SkipForDialect(dialectClass = HSQLDialect.class, matchSubTypes = true)
|
||||
public void testUpdateAndFlushThenRefresh() {
|
||||
final String BEFORE = "before";
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.jcache.test;
|
||||
package org.hibernate.orm.test.jcache;
|
||||
|
||||
import javax.cache.Cache;
|
||||
|
||||
|
@ -13,21 +13,22 @@ import org.hibernate.cache.spi.Region;
|
|||
import org.hibernate.cache.spi.support.DomainDataRegionTemplate;
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
|
||||
import org.hibernate.testing.junit4.BaseUnitTestCase;
|
||||
import org.junit.Test;
|
||||
import org.hibernate.testing.orm.junit.BaseUnitTest;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.hamcrest.CoreMatchers.nullValue;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hibernate.testing.transaction.TransactionUtil2.inSession;
|
||||
import static org.junit.Assert.fail;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
/**
|
||||
* Tests around {@link org.hibernate.cache.jcache.internal.JCacheAccessImpl}
|
||||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public class StorageAccessTest extends BaseUnitTestCase {
|
||||
@BaseUnitTest
|
||||
public class StorageAccessTest {
|
||||
|
||||
/**
|
||||
* Sort of the inverse test of {@link MissingCacheStrategyTest#testMissingCacheStrategyFail()}.
|
|
@ -4,7 +4,7 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.jcache.test;
|
||||
package org.hibernate.orm.test.jcache;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
@ -26,9 +26,9 @@ import org.hibernate.cfg.AvailableSettings;
|
|||
import org.hibernate.dialect.Dialect;
|
||||
import org.hibernate.dialect.H2Dialect;
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.jcache.test.domain.Item;
|
||||
import org.hibernate.jcache.test.domain.VersionedItem;
|
||||
import org.hibernate.jcache.test.domain.Event;
|
||||
import org.hibernate.orm.test.jcache.domain.Item;
|
||||
import org.hibernate.orm.test.jcache.domain.VersionedItem;
|
||||
import org.hibernate.orm.test.jcache.domain.Event;
|
||||
import org.hibernate.mapping.Collection;
|
||||
import org.hibernate.mapping.PersistentClass;
|
||||
import org.hibernate.tool.schema.Action;
|
||||
|
@ -45,7 +45,7 @@ public class TestHelper {
|
|||
Event.class.getName()
|
||||
};
|
||||
public static String[] collectionRegionNames = new String[] {
|
||||
org.hibernate.jcache.test.domain.Event.class.getName() + ".participants"
|
||||
Event.class.getName() + ".participants"
|
||||
};
|
||||
|
||||
public static String[] allDomainRegionNames =
|
||||
|
@ -117,7 +117,7 @@ public class TestHelper {
|
|||
.applySetting( AvailableSettings.HBM2DDL_AUTO, "create-drop" );
|
||||
|
||||
if ( H2Dialect.class.equals( Dialect.getDialect().getClass() ) ) {
|
||||
ssrb.applySetting( AvailableSettings.URL, "jdbc:h2:mem:db-mvcc;MVCC=true" );
|
||||
ssrb.applySetting( AvailableSettings.URL, "jdbc:h2:mem:db-mvcc" );
|
||||
}
|
||||
return ssrb;
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
|
||||
package org.hibernate.jcache.test.domain;
|
||||
package org.hibernate.orm.test.jcache.domain;
|
||||
|
||||
public class Account {
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.jcache.test.domain;
|
||||
package org.hibernate.orm.test.jcache.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
|
@ -4,7 +4,7 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.jcache.test.domain;
|
||||
package org.hibernate.orm.test.jcache.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
|
@ -4,7 +4,7 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.jcache.test.domain;
|
||||
package org.hibernate.orm.test.jcache.domain;
|
||||
|
||||
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.jcache.test.domain;
|
||||
package org.hibernate.orm.test.jcache.domain;
|
||||
|
||||
public class Item {
|
||||
private Long id;
|
|
@ -5,7 +5,7 @@
|
|||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
|
||||
package org.hibernate.jcache.test.domain;
|
||||
package org.hibernate.orm.test.jcache.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
|
@ -5,7 +5,7 @@
|
|||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
|
||||
package org.hibernate.jcache.test.domain;
|
||||
package org.hibernate.orm.test.jcache.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.test.cache.jcache.config;
|
||||
package org.hibernate.orm.test.jcache.domain;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
|
@ -4,7 +4,7 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.jcache.test.domain;
|
||||
package org.hibernate.orm.test.jcache.domain;
|
||||
|
||||
public class UuidItem {
|
||||
private String id;
|
|
@ -4,7 +4,7 @@
|
|||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.jcache.test.domain;
|
||||
package org.hibernate.orm.test.jcache.domain;
|
||||
|
||||
public class VersionedItem extends Item {
|
||||
private Long version;
|
|
@ -11,12 +11,12 @@
|
|||
|
||||
<hibernate-mapping>
|
||||
|
||||
<class name="org.hibernate.jcache.test.domain.Account" table="ACCOUNT" lazy="false">
|
||||
<class name="org.hibernate.orm.test.jcache.domain.Account" table="ACCOUNT" lazy="false">
|
||||
<id name="id" column="ACCOUNT_ID">
|
||||
<generator class="native"/>
|
||||
</id>
|
||||
|
||||
<many-to-one name="person" class="org.hibernate.jcache.test.domain.Person" cascade="save-update,lock"
|
||||
<many-to-one name="person" class="org.hibernate.orm.test.jcache.domain.Person" cascade="save-update,lock"
|
||||
column="person_id"
|
||||
unique="true"
|
||||
not-null="true"/>
|
||||
|
|
|
@ -11,21 +11,21 @@
|
|||
|
||||
<hibernate-mapping>
|
||||
|
||||
<class name="org.hibernate.jcache.test.domain.Event" table="EVENTS">
|
||||
<class name="org.hibernate.orm.test.jcache.domain.Event" table="EVENTS">
|
||||
<cache usage="read-write"/>
|
||||
<id name="id" column="EVENT_ID">
|
||||
<generator class="native"/>
|
||||
</id>
|
||||
<property name="date" type="timestamp" column="EVENT_DATE"/>
|
||||
<property name="title"/>
|
||||
<many-to-one name="organizer" column="EVENT_ORGANIZER" class="org.hibernate.jcache.test.domain.Person"/>
|
||||
<many-to-one name="organizer" column="EVENT_ORGANIZER" class="org.hibernate.orm.test.jcache.domain.Person"/>
|
||||
|
||||
<set name="participants" table="PERSON_EVENT" lazy="false"
|
||||
inverse="true" cascade="lock">
|
||||
<cache usage="read-write"/>
|
||||
<key column="EVENT_ID"/>
|
||||
<many-to-many column="PERSON_ID"
|
||||
class="org.hibernate.jcache.test.domain.Person"/>
|
||||
class="org.hibernate.orm.test.jcache.domain.Person"/>
|
||||
</set>
|
||||
</class>
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<hibernate-mapping>
|
||||
|
||||
<class name="org.hibernate.jcache.test.domain.HolidayCalendar" table="CALENDAR" lazy="false">
|
||||
<class name="org.hibernate.orm.test.jcache.domain.HolidayCalendar" table="CALENDAR" lazy="false">
|
||||
<id name="id" column="CALENDAR_ID">
|
||||
<generator class="native"/>
|
||||
</id>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
|
||||
<hibernate-mapping package="org.hibernate.jcache.test.domain">
|
||||
<hibernate-mapping package="org.hibernate.orm.test.jcache.domain">
|
||||
|
||||
|
||||
<class name="Item" table="Items">
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<hibernate-mapping>
|
||||
|
||||
<class name="org.hibernate.jcache.test.domain.Person" table="PERSON" lazy="true">
|
||||
<class name="org.hibernate.orm.test.jcache.domain.Person" table="PERSON" lazy="true">
|
||||
<id name="id" column="PERSON_ID">
|
||||
<generator class="native"/>
|
||||
</id>
|
||||
|
@ -22,7 +22,7 @@
|
|||
<list name="events" table="PERSON_EVENT" lazy="true">
|
||||
<key column="PERSON_ID"/>
|
||||
<list-index column="EVENT_ORDER"/>
|
||||
<many-to-many column="EVENT_ID" class="org.hibernate.jcache.test.domain.Event"/>
|
||||
<many-to-many column="EVENT_ID" class="org.hibernate.orm.test.jcache.domain.Event"/>
|
||||
</list>
|
||||
|
||||
<bag name="talismans" table="PERSON_TALISMAN" lazy="true">
|
||||
|
@ -37,7 +37,7 @@
|
|||
|
||||
<set name="phoneNumbers" cascade="all" lazy="true">
|
||||
<key column="PERSON_ID"/>
|
||||
<one-to-many class="org.hibernate.jcache.test.domain.PhoneNumber"/>
|
||||
<one-to-many class="org.hibernate.orm.test.jcache.domain.PhoneNumber"/>
|
||||
</set>
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<hibernate-mapping>
|
||||
|
||||
<class name="org.hibernate.jcache.test.domain.PhoneNumber" table="PHONE_NUMBERS">
|
||||
<class name="org.hibernate.orm.test.jcache.domain.PhoneNumber" table="PHONE_NUMBERS">
|
||||
<composite-id>
|
||||
<key-property column="PERSON_ID" name="personId" type="java.lang.Long"/>
|
||||
<key-property column="NUMBER_TYPE" name="numberType" type="java.lang.String"/>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<cache alias="ready-cache">
|
||||
<key-type>java.lang.Long</key-type>
|
||||
<value-type>org.hibernate.test.cache.jcache.config.Product</value-type>
|
||||
<value-type>org.hibernate.orm.test.jcache.domain.Product</value-type>
|
||||
<heap unit="entries">100</heap>
|
||||
</cache>
|
||||
|
||||
|
|
Loading…
Reference in New Issue