Author: adamw
Date: 2008-11-05 04:17:10 -0500 (Wed, 05 Nov 2008)
New Revision: 15518
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/AbstractEntityTest.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/FieldAccessType.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/MixedAccessType.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/PropertyAccessType.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/Delete.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/GlobalVersioned.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/ManyOperationsInTransaction.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/NotVersioned.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/NullProperties.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/Simple.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/SingleOperationInTransaction.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/UnversionedPropertiesChange.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/UnversionedProperty.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/cache/OneToManyCache.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/cache/OneToOneCache.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/cache/QueryCache.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/EnumSet.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/StringList.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/StringMap.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/StringSet.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/mapkey/ComponentMapKey.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/mapkey/IdMapKey.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/components/Components.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/customtype/CompositeCustom.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/customtype/ParametrizedCustom.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/Dates.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/Enums.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/Lobs.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/Serializables.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/DoubleFlushAddDel.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/DoubleFlushAddMod.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/DoubleFlushModDel.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/DoubleFlushModMod.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/ManualFlush.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/ids/CompositeIds.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/inheritance/single/ChildVersioning.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/inheritance/single/ParentVersioning.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/inheritance/single/childrelation/ChildReferencing.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/inheritance/single/relation/PolymorphicCollection.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/BasicList.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/BasicMap.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/BasicSet.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/ternary/TernaryMap.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/unidirectional/BasicUniList.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/unidirectional/BasicUniMap.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/unidirectional/BasicUniSet.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/BasicNaming.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/JoinNaming.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/OneToManyUnidirectionalNaming.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/VersionsJoinTableNaming.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/ids/JoinEmbIdNaming.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/ids/JoinMulIdNaming.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/notinsertable/NotInsertable.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicCollection.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicList.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicSet.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicSetWithEmbId.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicSetWithMulId.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicSetWithNullsDelete.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BidirectionalMapKey.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicDetachedList.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicDetachedSet.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicDetachedSetWithEmbId.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicDetachedSetWithMulId.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicJoinColumnSet.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/DataChangesDetachedSet.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/DoubleDetachedSet.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/Bidirectional.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/Bidirectional2.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/BidirectionalNoNulls.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/ids/EmbIdBidirectional.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/ids/MulIdBidirectional.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/unidirectional/Unidirectional.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/unidirectional/UnidirectionalWithNulls.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/properties/UnversionedOptimisticLockingField.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/properties/VersionsProperties.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/AggregateQuery.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/CustomRevEntityQuery.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/DeletedEntities.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/MaximalizePropertyQuery.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/OrderByLimitQuery.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/RevisionConstraintQuery.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/SimpleQuery.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/ids/EmbIdOneToManyQuery.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/ids/MulIdOneToManyQuery.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/Custom.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/CustomBoxed.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/CustomPropertyAccess.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/Inherited.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/Listener.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/LongRevNumber.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/revfordate/RevisionForDate.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/sameids/SameIds.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/secondary/BasicSecondary.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/secondary/NamingSecondary.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/secondary/ids/EmbIdSecondary.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/secondary/ids/MulIdSecondary.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/superclass/MappedSubclassing.java
Log:
HHH-3570: more renaming
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/AbstractEntityTest.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/AbstractEntityTest.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/AbstractEntityTest.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -40,7 +40,7 @@
public abstract class AbstractEntityTest {
private EntityManagerFactory emf;
private EntityManager entityManager;
- private AuditReader versionsReader;
+ private AuditReader auditReader;
private Ejb3Configuration cfg;
public abstract void configure(Ejb3Configuration cfg);
@@ -52,7 +52,7 @@
}
entityManager = emf.createEntityManager();
- versionsReader = AuditReaderFactory.get(entityManager);
+ auditReader = AuditReaderFactory.get(entityManager);
}
@BeforeClass
@@ -69,8 +69,8 @@
return entityManager;
}
- public AuditReader getVersionsReader() {
- return versionsReader;
+ public AuditReader getAuditReader() {
+ return auditReader;
}
public Ejb3Configuration getCfg() {
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/FieldAccessType.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/FieldAccessType.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/FieldAccessType.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -60,7 +60,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(FieldAccessTypeEntity.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(FieldAccessTypeEntity.class, id1));
}
@Test
@@ -68,7 +68,7 @@
FieldAccessTypeEntity ver1 = new FieldAccessTypeEntity(id1, "data");
FieldAccessTypeEntity ver2 = new FieldAccessTypeEntity(id1, "data2");
- assert getVersionsReader().find(FieldAccessTypeEntity.class, id1,
1).equals(ver1);
- assert getVersionsReader().find(FieldAccessTypeEntity.class, id1,
2).equals(ver2);
+ assert getAuditReader().find(FieldAccessTypeEntity.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(FieldAccessTypeEntity.class, id1, 2).equals(ver2);
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/MixedAccessType.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/MixedAccessType.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/MixedAccessType.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -59,7 +59,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(MixedAccessTypeEntity.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(MixedAccessTypeEntity.class, id1));
}
@Test
@@ -67,8 +67,8 @@
MixedAccessTypeEntity ver1 = new MixedAccessTypeEntity(id1, "data");
MixedAccessTypeEntity ver2 = new MixedAccessTypeEntity(id1, "data2");
- MixedAccessTypeEntity rev1 =
getVersionsReader().find(MixedAccessTypeEntity.class, id1, 1);
- MixedAccessTypeEntity rev2 =
getVersionsReader().find(MixedAccessTypeEntity.class, id1, 2);
+ MixedAccessTypeEntity rev1 = getAuditReader().find(MixedAccessTypeEntity.class,
id1, 1);
+ MixedAccessTypeEntity rev2 = getAuditReader().find(MixedAccessTypeEntity.class,
id1, 2);
assert rev1.isDataSet();
assert rev2.isDataSet();
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/PropertyAccessType.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/PropertyAccessType.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/PropertyAccessType.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -59,7 +59,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(PropertyAccessTypeEntity.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(PropertyAccessTypeEntity.class, id1));
}
@Test
@@ -67,8 +67,8 @@
PropertyAccessTypeEntity ver1 = new PropertyAccessTypeEntity(id1,
"data");
PropertyAccessTypeEntity ver2 = new PropertyAccessTypeEntity(id1,
"data2");
- PropertyAccessTypeEntity rev1 =
getVersionsReader().find(PropertyAccessTypeEntity.class, id1, 1);
- PropertyAccessTypeEntity rev2 =
getVersionsReader().find(PropertyAccessTypeEntity.class, id1, 2);
+ PropertyAccessTypeEntity rev1 =
getAuditReader().find(PropertyAccessTypeEntity.class, id1, 1);
+ PropertyAccessTypeEntity rev2 =
getAuditReader().find(PropertyAccessTypeEntity.class, id1, 2);
assert rev1.isIdSet();
assert rev2.isIdSet();
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/Delete.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/Delete.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/Delete.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -97,11 +97,11 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2,
4).equals(getVersionsReader().getRevisions(BasicTestEntity2.class, id1));
+ assert Arrays.asList(1, 2,
4).equals(getAuditReader().getRevisions(BasicTestEntity2.class, id1));
- assert Arrays.asList(1,
3).equals(getVersionsReader().getRevisions(BasicTestEntity2.class, id2));
+ assert Arrays.asList(1,
3).equals(getAuditReader().getRevisions(BasicTestEntity2.class, id2));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(BasicTestEntity2.class, id3));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(BasicTestEntity2.class, id3));
}
@Test
@@ -109,29 +109,29 @@
BasicTestEntity2 ver1 = new BasicTestEntity2(id1, "x", null);
BasicTestEntity2 ver2 = new BasicTestEntity2(id1, "x2", null);
- assert getVersionsReader().find(BasicTestEntity2.class, id1, 1).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity2.class, id1, 2).equals(ver2);
- assert getVersionsReader().find(BasicTestEntity2.class, id1, 3).equals(ver2);
- assert getVersionsReader().find(BasicTestEntity2.class, id1, 4) == null;
+ assert getAuditReader().find(BasicTestEntity2.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity2.class, id1, 2).equals(ver2);
+ assert getAuditReader().find(BasicTestEntity2.class, id1, 3).equals(ver2);
+ assert getAuditReader().find(BasicTestEntity2.class, id1, 4) == null;
}
@Test
public void testHistoryOfId2() {
BasicTestEntity2 ver1 = new BasicTestEntity2(id2, "y", null);
- assert getVersionsReader().find(BasicTestEntity2.class, id2, 1).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity2.class, id2, 2).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity2.class, id2, 3) == null;
- assert getVersionsReader().find(BasicTestEntity2.class, id2, 4) == null;
+ assert getAuditReader().find(BasicTestEntity2.class, id2, 1).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity2.class, id2, 2).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity2.class, id2, 3) == null;
+ assert getAuditReader().find(BasicTestEntity2.class, id2, 4) == null;
}
@Test
public void testHistoryOfId3() {
BasicTestEntity2 ver1 = new BasicTestEntity2(id3, "z", null);
- assert getVersionsReader().find(BasicTestEntity2.class, id3, 1).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity2.class, id3, 2) == null;
- assert getVersionsReader().find(BasicTestEntity2.class, id3, 3) == null;
- assert getVersionsReader().find(BasicTestEntity2.class, id3, 4) == null;
+ assert getAuditReader().find(BasicTestEntity2.class, id3, 1).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity2.class, id3, 2) == null;
+ assert getAuditReader().find(BasicTestEntity2.class, id3, 3) == null;
+ assert getAuditReader().find(BasicTestEntity2.class, id3, 4) == null;
}
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/GlobalVersioned.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/GlobalVersioned.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/GlobalVersioned.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -60,7 +60,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(BasicTestEntity4.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(BasicTestEntity4.class, id1));
}
@Test
@@ -68,7 +68,7 @@
BasicTestEntity4 ver1 = new BasicTestEntity4(id1, "x", "y");
BasicTestEntity4 ver2 = new BasicTestEntity4(id1, "a", "b");
- assert getVersionsReader().find(BasicTestEntity4.class, id1, 1).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity4.class, id1, 2).equals(ver2);
+ assert getAuditReader().find(BasicTestEntity4.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity4.class, id1, 2).equals(ver2);
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/ManyOperationsInTransaction.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/ManyOperationsInTransaction.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/ManyOperationsInTransaction.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -87,11 +87,11 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(BasicTestEntity1.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(BasicTestEntity1.class, id1));
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(BasicTestEntity1.class, id2));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(BasicTestEntity1.class, id2));
- assert Arrays.asList(2,
3).equals(getVersionsReader().getRevisions(BasicTestEntity1.class, id3));
+ assert Arrays.asList(2,
3).equals(getAuditReader().getRevisions(BasicTestEntity1.class, id3));
}
@Test
@@ -99,9 +99,9 @@
BasicTestEntity1 ver1 = new BasicTestEntity1(id1, "x", 1);
BasicTestEntity1 ver2 = new BasicTestEntity1(id1, "x2", 1);
- assert getVersionsReader().find(BasicTestEntity1.class, id1, 1).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity1.class, id1, 2).equals(ver2);
- assert getVersionsReader().find(BasicTestEntity1.class, id1, 3).equals(ver2);
+ assert getAuditReader().find(BasicTestEntity1.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id1, 2).equals(ver2);
+ assert getAuditReader().find(BasicTestEntity1.class, id1, 3).equals(ver2);
}
@Test
@@ -110,9 +110,9 @@
BasicTestEntity1 ver2 = new BasicTestEntity1(id2, "y", 21);
BasicTestEntity1 ver3 = new BasicTestEntity1(id2, "y3", 22);
- assert getVersionsReader().find(BasicTestEntity1.class, id2, 1).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity1.class, id2, 2).equals(ver2);
- assert getVersionsReader().find(BasicTestEntity1.class, id2, 3).equals(ver3);
+ assert getAuditReader().find(BasicTestEntity1.class, id2, 1).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id2, 2).equals(ver2);
+ assert getAuditReader().find(BasicTestEntity1.class, id2, 3).equals(ver3);
}
@Test
@@ -120,8 +120,8 @@
BasicTestEntity1 ver1 = new BasicTestEntity1(id3, "z", 300);
BasicTestEntity1 ver2 = new BasicTestEntity1(id3, "z3", 300);
- assert getVersionsReader().find(BasicTestEntity1.class, id3, 1) == null;
- assert getVersionsReader().find(BasicTestEntity1.class, id3, 2).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity1.class, id3, 3).equals(ver2);
+ assert getAuditReader().find(BasicTestEntity1.class, id3, 1) == null;
+ assert getAuditReader().find(BasicTestEntity1.class, id3, 2).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id3, 3).equals(ver2);
}
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/NotVersioned.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/NotVersioned.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/NotVersioned.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -60,11 +60,11 @@
@Test(expectedExceptions = NotAuditedException.class)
public void testRevisionsCounts() {
- getVersionsReader().getRevisions(BasicTestEntity3.class, id1);
+ getAuditReader().getRevisions(BasicTestEntity3.class, id1);
}
@Test(expectedExceptions = NotAuditedException.class)
public void testHistoryOfId1() {
- getVersionsReader().find(BasicTestEntity3.class, id1, 1);
+ getAuditReader().find(BasicTestEntity3.class, id1, 1);
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/NullProperties.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/NullProperties.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/NullProperties.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -73,9 +73,9 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
3).equals(getVersionsReader().getRevisions(BasicTestEntity1.class, id1));
+ assert Arrays.asList(1,
3).equals(getAuditReader().getRevisions(BasicTestEntity1.class, id1));
- assert Arrays.asList(2,
4).equals(getVersionsReader().getRevisions(BasicTestEntity1.class, id2));
+ assert Arrays.asList(2,
4).equals(getAuditReader().getRevisions(BasicTestEntity1.class, id2));
}
@Test
@@ -83,10 +83,10 @@
BasicTestEntity1 ver1 = new BasicTestEntity1(id1, "x", 1);
BasicTestEntity1 ver2 = new BasicTestEntity1(id1, null, 1);
- assert getVersionsReader().find(BasicTestEntity1.class, id1, 1).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity1.class, id1, 2).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity1.class, id1, 3).equals(ver2);
- assert getVersionsReader().find(BasicTestEntity1.class, id1, 4).equals(ver2);
+ assert getAuditReader().find(BasicTestEntity1.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id1, 2).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id1, 3).equals(ver2);
+ assert getAuditReader().find(BasicTestEntity1.class, id1, 4).equals(ver2);
}
@Test
@@ -94,9 +94,9 @@
BasicTestEntity1 ver1 = new BasicTestEntity1(id2, null, 20);
BasicTestEntity1 ver2 = new BasicTestEntity1(id2, "y2", 20);
- assert getVersionsReader().find(BasicTestEntity1.class, id2, 1) == null;
- assert getVersionsReader().find(BasicTestEntity1.class, id2, 2).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity1.class, id2, 3).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity1.class, id2, 4).equals(ver2);
+ assert getAuditReader().find(BasicTestEntity1.class, id2, 1) == null;
+ assert getAuditReader().find(BasicTestEntity1.class, id2, 2).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id2, 3).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id2, 4).equals(ver2);
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/Simple.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/Simple.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/Simple.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -60,7 +60,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(IntTestEntity.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(IntTestEntity.class, id1));
}
@Test
@@ -68,7 +68,7 @@
IntTestEntity ver1 = new IntTestEntity(10, id1);
IntTestEntity ver2 = new IntTestEntity(20, id1);
- assert getVersionsReader().find(IntTestEntity.class, id1, 1).equals(ver1);
- assert getVersionsReader().find(IntTestEntity.class, id1, 2).equals(ver2);
+ assert getAuditReader().find(IntTestEntity.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(IntTestEntity.class, id1, 2).equals(ver2);
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/SingleOperationInTransaction.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/SingleOperationInTransaction.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/SingleOperationInTransaction.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -79,29 +79,29 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 4,
6).equals(getVersionsReader().getRevisions(BasicTestEntity1.class, id1));
+ assert Arrays.asList(1, 4,
6).equals(getAuditReader().getRevisions(BasicTestEntity1.class, id1));
- assert Arrays.asList(2, 5,
7).equals(getVersionsReader().getRevisions(BasicTestEntity1.class, id2));
+ assert Arrays.asList(2, 5,
7).equals(getAuditReader().getRevisions(BasicTestEntity1.class, id2));
- assert
Arrays.asList(3).equals(getVersionsReader().getRevisions(BasicTestEntity1.class, id3));
+ assert
Arrays.asList(3).equals(getAuditReader().getRevisions(BasicTestEntity1.class, id3));
}
@Test
public void testRevisionsDates() {
for (int i=1; i<7; i++) {
- assert getVersionsReader().getRevisionDate(i).getTime() <=
- getVersionsReader().getRevisionDate(i+1).getTime();
+ assert getAuditReader().getRevisionDate(i).getTime() <=
+ getAuditReader().getRevisionDate(i+1).getTime();
}
}
@Test(expectedExceptions = RevisionDoesNotExistException.class)
public void testNotExistingRevision() {
- getVersionsReader().getRevisionDate(8);
+ getAuditReader().getRevisionDate(8);
}
@Test(expectedExceptions = IllegalArgumentException.class)
public void testIllegalRevision() {
- getVersionsReader().getRevisionDate(0);
+ getAuditReader().getRevisionDate(0);
}
@Test
@@ -110,13 +110,13 @@
BasicTestEntity1 ver2 = new BasicTestEntity1(id1, "x2", 2);
BasicTestEntity1 ver3 = new BasicTestEntity1(id1, "x3", 3);
- assert getVersionsReader().find(BasicTestEntity1.class, id1, 1).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity1.class, id1, 2).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity1.class, id1, 3).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity1.class, id1, 4).equals(ver2);
- assert getVersionsReader().find(BasicTestEntity1.class, id1, 5).equals(ver2);
- assert getVersionsReader().find(BasicTestEntity1.class, id1, 6).equals(ver3);
- assert getVersionsReader().find(BasicTestEntity1.class, id1, 7).equals(ver3);
+ assert getAuditReader().find(BasicTestEntity1.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id1, 2).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id1, 3).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id1, 4).equals(ver2);
+ assert getAuditReader().find(BasicTestEntity1.class, id1, 5).equals(ver2);
+ assert getAuditReader().find(BasicTestEntity1.class, id1, 6).equals(ver3);
+ assert getAuditReader().find(BasicTestEntity1.class, id1, 7).equals(ver3);
}
@Test
@@ -125,36 +125,36 @@
BasicTestEntity1 ver2 = new BasicTestEntity1(id2, "y2", 20);
BasicTestEntity1 ver3 = new BasicTestEntity1(id2, "y3", 21);
- assert getVersionsReader().find(BasicTestEntity1.class, id2, 1) == null;
- assert getVersionsReader().find(BasicTestEntity1.class, id2, 2).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity1.class, id2, 3).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity1.class, id2, 4).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity1.class, id2, 5).equals(ver2);
- assert getVersionsReader().find(BasicTestEntity1.class, id2, 6).equals(ver2);
- assert getVersionsReader().find(BasicTestEntity1.class, id2, 7).equals(ver3);
+ assert getAuditReader().find(BasicTestEntity1.class, id2, 1) == null;
+ assert getAuditReader().find(BasicTestEntity1.class, id2, 2).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id2, 3).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id2, 4).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id2, 5).equals(ver2);
+ assert getAuditReader().find(BasicTestEntity1.class, id2, 6).equals(ver2);
+ assert getAuditReader().find(BasicTestEntity1.class, id2, 7).equals(ver3);
}
@Test
public void testHistoryOfId3() {
BasicTestEntity1 ver1 = new BasicTestEntity1(id3, "z", 30);
- assert getVersionsReader().find(BasicTestEntity1.class, id3, 1) == null;
- assert getVersionsReader().find(BasicTestEntity1.class, id3, 2) == null;
- assert getVersionsReader().find(BasicTestEntity1.class, id3, 3).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity1.class, id3, 4).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity1.class, id3, 5).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity1.class, id3, 6).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity1.class, id3, 7).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id3, 1) == null;
+ assert getAuditReader().find(BasicTestEntity1.class, id3, 2) == null;
+ assert getAuditReader().find(BasicTestEntity1.class, id3, 3).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id3, 4).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id3, 5).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id3, 6).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity1.class, id3, 7).equals(ver1);
}
@Test
public void testHistoryOfNotExistingEntity() {
- assert getVersionsReader().find(BasicTestEntity1.class, id1+id2+id3, 1) == null;
- assert getVersionsReader().find(BasicTestEntity1.class, id1+id2+id3, 7) == null;
+ assert getAuditReader().find(BasicTestEntity1.class, id1+id2+id3, 1) == null;
+ assert getAuditReader().find(BasicTestEntity1.class, id1+id2+id3, 7) == null;
}
@Test
public void testRevisionsOfNotExistingEntity() {
- assert getVersionsReader().getRevisions(BasicTestEntity1.class,
id1+id2+id3).size() == 0;
+ assert getAuditReader().getRevisions(BasicTestEntity1.class, id1+id2+id3).size()
== 0;
}
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/UnversionedPropertiesChange.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/UnversionedPropertiesChange.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/UnversionedPropertiesChange.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -71,7 +71,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(BasicTestEntity2.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(BasicTestEntity2.class, id1));
}
@Test
@@ -79,7 +79,7 @@
BasicTestEntity2 ver1 = new BasicTestEntity2(id1, "x", null);
BasicTestEntity2 ver2 = new BasicTestEntity2(id1, "y", null);
- assert getVersionsReader().find(BasicTestEntity2.class, id1, 1).equals(ver1);
- assert getVersionsReader().find(BasicTestEntity2.class, id1, 2).equals(ver2);
+ assert getAuditReader().find(BasicTestEntity2.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(BasicTestEntity2.class, id1, 2).equals(ver2);
}
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/UnversionedProperty.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/UnversionedProperty.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/basic/UnversionedProperty.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -64,7 +64,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(UnversionedEntity.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(UnversionedEntity.class, id1));
}
@Test
@@ -72,7 +72,7 @@
UnversionedEntity rev1 = new UnversionedEntity(id1, "a1", null);
UnversionedEntity rev2 = new UnversionedEntity(id1, "a2", null);
- assert getVersionsReader().find(UnversionedEntity.class, id1, 1).equals(rev1);
- assert getVersionsReader().find(UnversionedEntity.class, id1, 2).equals(rev2);
+ assert getAuditReader().find(UnversionedEntity.class, id1, 1).equals(rev1);
+ assert getAuditReader().find(UnversionedEntity.class, id1, 2).equals(rev2);
}
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/cache/OneToManyCache.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/cache/OneToManyCache.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/cache/OneToManyCache.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -96,10 +96,10 @@
@Test
public void testCacheReferenceAccessAfterFind() {
- SetRefEdEntity ed1_rev1 = getVersionsReader().find(SetRefEdEntity.class, ed1_id,
1);
+ SetRefEdEntity ed1_rev1 = getAuditReader().find(SetRefEdEntity.class, ed1_id,
1);
- SetRefIngEntity ing1_rev1 = getVersionsReader().find(SetRefIngEntity.class,
ing1_id, 1);
- SetRefIngEntity ing2_rev1 = getVersionsReader().find(SetRefIngEntity.class,
ing2_id, 1);
+ SetRefIngEntity ing1_rev1 = getAuditReader().find(SetRefIngEntity.class, ing1_id,
1);
+ SetRefIngEntity ing2_rev1 = getAuditReader().find(SetRefIngEntity.class, ing2_id,
1);
// It should be exactly the same object
assert ing1_rev1.getReference() == ed1_rev1;
@@ -108,7 +108,7 @@
@Test
public void testCacheReferenceAccessAfterCollectionAccessRev1() {
- SetRefEdEntity ed1_rev1 = getVersionsReader().find(SetRefEdEntity.class, ed1_id,
1);
+ SetRefEdEntity ed1_rev1 = getAuditReader().find(SetRefEdEntity.class, ed1_id,
1);
// It should be exactly the same object
assert ed1_rev1.getReffering().size() == 2;
@@ -119,7 +119,7 @@
@Test
public void testCacheReferenceAccessAfterCollectionAccessRev2() {
- SetRefEdEntity ed2_rev2 = getVersionsReader().find(SetRefEdEntity.class, ed2_id,
2);
+ SetRefEdEntity ed2_rev2 = getAuditReader().find(SetRefEdEntity.class, ed2_id,
2);
assert ed2_rev2.getReffering().size() == 2;
for (SetRefIngEntity setRefIngEntity : ed2_rev2.getReffering()) {
@@ -129,13 +129,13 @@
@Test
public void testCacheFindAfterCollectionAccessRev1() {
- SetRefEdEntity ed1_rev1 = getVersionsReader().find(SetRefEdEntity.class, ed1_id,
1);
+ SetRefEdEntity ed1_rev1 = getAuditReader().find(SetRefEdEntity.class, ed1_id,
1);
// Reading the collection
assert ed1_rev1.getReffering().size() == 2;
- SetRefIngEntity ing1_rev1 = getVersionsReader().find(SetRefIngEntity.class,
ing1_id, 1);
- SetRefIngEntity ing2_rev1 = getVersionsReader().find(SetRefIngEntity.class,
ing2_id, 1);
+ SetRefIngEntity ing1_rev1 = getAuditReader().find(SetRefIngEntity.class, ing1_id,
1);
+ SetRefIngEntity ing2_rev1 = getAuditReader().find(SetRefIngEntity.class, ing2_id,
1);
for (SetRefIngEntity setRefIngEntity : ed1_rev1.getReffering()) {
assert setRefIngEntity == ing1_rev1 || setRefIngEntity == ing2_rev1;
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/cache/OneToOneCache.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/cache/OneToOneCache.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/cache/OneToOneCache.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -88,16 +88,16 @@
@Test
public void testCacheReferenceAccessAfterFindRev1() {
- BiRefEdEntity ed1_rev1 = getVersionsReader().find(BiRefEdEntity.class, ed1_id,
1);
- BiRefIngEntity ing1_rev1 = getVersionsReader().find(BiRefIngEntity.class,
ing1_id, 1);
+ BiRefEdEntity ed1_rev1 = getAuditReader().find(BiRefEdEntity.class, ed1_id, 1);
+ BiRefIngEntity ing1_rev1 = getAuditReader().find(BiRefIngEntity.class, ing1_id,
1);
assert ing1_rev1.getReference() == ed1_rev1;
}
@Test
public void testCacheReferenceAccessAfterFindRev2() {
- BiRefEdEntity ed2_rev2 = getVersionsReader().find(BiRefEdEntity.class, ed2_id,
2);
- BiRefIngEntity ing1_rev2 = getVersionsReader().find(BiRefIngEntity.class,
ing1_id, 2);
+ BiRefEdEntity ed2_rev2 = getAuditReader().find(BiRefEdEntity.class, ed2_id, 2);
+ BiRefIngEntity ing1_rev2 = getAuditReader().find(BiRefIngEntity.class, ing1_id,
2);
assert ing1_rev2.getReference() == ed2_rev2;
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/cache/QueryCache.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/cache/QueryCache.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/cache/QueryCache.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -63,12 +63,12 @@
@Test
public void testCacheFindAfterRevisionsOfEntityQuery() {
- List entsFromQuery = getVersionsReader().createQuery()
+ List entsFromQuery = getAuditReader().createQuery()
.forRevisionsOfEntity(IntTestEntity.class, true, false)
.getResultList();
- IntTestEntity entFromFindRev1 = getVersionsReader().find(IntTestEntity.class,
id1, 1);
- IntTestEntity entFromFindRev2 = getVersionsReader().find(IntTestEntity.class,
id1, 2);
+ IntTestEntity entFromFindRev1 = getAuditReader().find(IntTestEntity.class, id1,
1);
+ IntTestEntity entFromFindRev2 = getAuditReader().find(IntTestEntity.class, id1,
2);
assert entFromFindRev1 == entsFromQuery.get(0);
assert entFromFindRev2 == entsFromQuery.get(1);
@@ -76,11 +76,11 @@
@Test
public void testCacheFindAfterEntitiesAtRevisionQuery() {
- IntTestEntity entFromQuery = (IntTestEntity) getVersionsReader().createQuery()
+ IntTestEntity entFromQuery = (IntTestEntity) getAuditReader().createQuery()
.forEntitiesAtRevision(IntTestEntity.class, 1)
.getSingleResult();
- IntTestEntity entFromFind = getVersionsReader().find(IntTestEntity.class, id1,
1);
+ IntTestEntity entFromFind = getAuditReader().find(IntTestEntity.class, id1, 1);
assert entFromFind == entFromQuery;
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/EnumSet.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/EnumSet.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/EnumSet.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -89,14 +89,14 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(EnumSetEntity.class, sse1_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(EnumSetEntity.class, sse1_id));
}
@Test
public void testHistoryOfSse1() {
- EnumSetEntity rev1 = getVersionsReader().find(EnumSetEntity.class, sse1_id, 1);
- EnumSetEntity rev2 = getVersionsReader().find(EnumSetEntity.class, sse1_id, 2);
- EnumSetEntity rev3 = getVersionsReader().find(EnumSetEntity.class, sse1_id, 3);
+ EnumSetEntity rev1 = getAuditReader().find(EnumSetEntity.class, sse1_id, 1);
+ EnumSetEntity rev2 = getAuditReader().find(EnumSetEntity.class, sse1_id, 2);
+ EnumSetEntity rev3 = getAuditReader().find(EnumSetEntity.class, sse1_id, 3);
assert rev1.getEnums1().equals(TestTools.makeSet(E1.X));
assert rev2.getEnums1().equals(TestTools.makeSet(E1.X, E1.Y));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/StringList.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/StringList.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/StringList.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -97,15 +97,15 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(StringListEntity.class, sle1_id));
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(StringListEntity.class, sle2_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(StringListEntity.class, sle1_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(StringListEntity.class, sle2_id));
}
@Test
public void testHistoryOfSle1() {
- StringListEntity rev1 = getVersionsReader().find(StringListEntity.class, sle1_id,
1);
- StringListEntity rev2 = getVersionsReader().find(StringListEntity.class, sle1_id,
2);
- StringListEntity rev3 = getVersionsReader().find(StringListEntity.class, sle1_id,
3);
+ StringListEntity rev1 = getAuditReader().find(StringListEntity.class, sle1_id,
1);
+ StringListEntity rev2 = getAuditReader().find(StringListEntity.class, sle1_id,
2);
+ StringListEntity rev3 = getAuditReader().find(StringListEntity.class, sle1_id,
3);
assert rev1.getStrings().equals(Collections.EMPTY_LIST);
assert rev2.getStrings().equals(TestTools.makeList("sle1_string1",
"sle1_string2"));
@@ -114,9 +114,9 @@
@Test
public void testHistoryOfSse2() {
- StringListEntity rev1 = getVersionsReader().find(StringListEntity.class, sle2_id,
1);
- StringListEntity rev2 = getVersionsReader().find(StringListEntity.class, sle2_id,
2);
- StringListEntity rev3 = getVersionsReader().find(StringListEntity.class, sle2_id,
3);
+ StringListEntity rev1 = getAuditReader().find(StringListEntity.class, sle2_id,
1);
+ StringListEntity rev2 = getAuditReader().find(StringListEntity.class, sle2_id,
2);
+ StringListEntity rev3 = getAuditReader().find(StringListEntity.class, sle2_id,
3);
assert rev1.getStrings().equals(TestTools.makeList("sle2_string1",
"sle2_string2"));
assert rev2.getStrings().equals(TestTools.makeList("sle2_string1",
"sle2_string2", "sle2_string1"));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/StringMap.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/StringMap.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/StringMap.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -104,16 +104,16 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(StringMapEntity.class, sme1_id));
- assert Arrays.asList(1,
3).equals(getVersionsReader().getRevisions(StringMapEntity.class, sme2_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(StringMapEntity.class, sme1_id));
+ assert Arrays.asList(1,
3).equals(getAuditReader().getRevisions(StringMapEntity.class, sme2_id));
}
@Test
public void testHistoryOfSse1() {
- StringMapEntity rev1 = getVersionsReader().find(StringMapEntity.class, sme1_id,
1);
- StringMapEntity rev2 = getVersionsReader().find(StringMapEntity.class, sme1_id,
2);
- StringMapEntity rev3 = getVersionsReader().find(StringMapEntity.class, sme1_id,
3);
- StringMapEntity rev4 = getVersionsReader().find(StringMapEntity.class, sme1_id,
4);
+ StringMapEntity rev1 = getAuditReader().find(StringMapEntity.class, sme1_id, 1);
+ StringMapEntity rev2 = getAuditReader().find(StringMapEntity.class, sme1_id, 2);
+ StringMapEntity rev3 = getAuditReader().find(StringMapEntity.class, sme1_id, 3);
+ StringMapEntity rev4 = getAuditReader().find(StringMapEntity.class, sme1_id, 4);
assert rev1.getStrings().equals(Collections.EMPTY_MAP);
assert rev2.getStrings().equals(TestTools.makeMap("1", "a",
"2", "b"));
@@ -123,10 +123,10 @@
@Test
public void testHistoryOfSse2() {
- StringMapEntity rev1 = getVersionsReader().find(StringMapEntity.class, sme2_id,
1);
- StringMapEntity rev2 = getVersionsReader().find(StringMapEntity.class, sme2_id,
2);
- StringMapEntity rev3 = getVersionsReader().find(StringMapEntity.class, sme2_id,
3);
- StringMapEntity rev4 = getVersionsReader().find(StringMapEntity.class, sme2_id,
4);
+ StringMapEntity rev1 = getAuditReader().find(StringMapEntity.class, sme2_id, 1);
+ StringMapEntity rev2 = getAuditReader().find(StringMapEntity.class, sme2_id, 2);
+ StringMapEntity rev3 = getAuditReader().find(StringMapEntity.class, sme2_id, 3);
+ StringMapEntity rev4 = getAuditReader().find(StringMapEntity.class, sme2_id, 4);
assert rev1.getStrings().equals(TestTools.makeMap("1",
"a"));
assert rev2.getStrings().equals(TestTools.makeMap("1",
"a"));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/StringSet.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/StringSet.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/StringSet.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -96,15 +96,15 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(StringSetEntity.class, sse1_id));
- assert Arrays.asList(1,
3).equals(getVersionsReader().getRevisions(StringSetEntity.class, sse2_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(StringSetEntity.class, sse1_id));
+ assert Arrays.asList(1,
3).equals(getAuditReader().getRevisions(StringSetEntity.class, sse2_id));
}
@Test
public void testHistoryOfSse1() {
- StringSetEntity rev1 = getVersionsReader().find(StringSetEntity.class, sse1_id,
1);
- StringSetEntity rev2 = getVersionsReader().find(StringSetEntity.class, sse1_id,
2);
- StringSetEntity rev3 = getVersionsReader().find(StringSetEntity.class, sse1_id,
3);
+ StringSetEntity rev1 = getAuditReader().find(StringSetEntity.class, sse1_id, 1);
+ StringSetEntity rev2 = getAuditReader().find(StringSetEntity.class, sse1_id, 2);
+ StringSetEntity rev3 = getAuditReader().find(StringSetEntity.class, sse1_id, 3);
assert rev1.getStrings().equals(Collections.EMPTY_SET);
assert rev2.getStrings().equals(TestTools.makeSet("sse1_string1",
"sse1_string2"));
@@ -113,9 +113,9 @@
@Test
public void testHistoryOfSse2() {
- StringSetEntity rev1 = getVersionsReader().find(StringSetEntity.class, sse2_id,
1);
- StringSetEntity rev2 = getVersionsReader().find(StringSetEntity.class, sse2_id,
2);
- StringSetEntity rev3 = getVersionsReader().find(StringSetEntity.class, sse2_id,
3);
+ StringSetEntity rev1 = getAuditReader().find(StringSetEntity.class, sse2_id, 1);
+ StringSetEntity rev2 = getAuditReader().find(StringSetEntity.class, sse2_id, 2);
+ StringSetEntity rev3 = getAuditReader().find(StringSetEntity.class, sse2_id, 3);
assert rev1.getStrings().equals(TestTools.makeSet("sse2_string1",
"sse2_string2"));
assert rev2.getStrings().equals(TestTools.makeSet("sse2_string1",
"sse2_string2"));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/mapkey/ComponentMapKey.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/mapkey/ComponentMapKey.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/mapkey/ComponentMapKey.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -91,7 +91,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(ComponentMapKeyEntity.class, cmke_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(ComponentMapKeyEntity.class, cmke_id));
}
@Test
@@ -103,8 +103,8 @@
cte1.setComp2(null);
cte2.setComp2(null);
- ComponentMapKeyEntity rev1 =
getVersionsReader().find(ComponentMapKeyEntity.class, cmke_id, 1);
- ComponentMapKeyEntity rev2 =
getVersionsReader().find(ComponentMapKeyEntity.class, cmke_id, 2);
+ ComponentMapKeyEntity rev1 = getAuditReader().find(ComponentMapKeyEntity.class,
cmke_id, 1);
+ ComponentMapKeyEntity rev2 = getAuditReader().find(ComponentMapKeyEntity.class,
cmke_id, 2);
assert rev1.getIdmap().equals(TestTools.makeMap(cte1.getComp1(), cte1));
assert rev2.getIdmap().equals(TestTools.makeMap(cte1.getComp1(), cte1,
cte2.getComp1(), cte2));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/mapkey/IdMapKey.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/mapkey/IdMapKey.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/collection/mapkey/IdMapKey.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -89,7 +89,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(IdMapKeyEntity.class, imke_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(IdMapKeyEntity.class, imke_id));
}
@Test
@@ -97,8 +97,8 @@
StrTestEntity ste1 = getEntityManager().find(StrTestEntity.class, ste1_id);
StrTestEntity ste2 = getEntityManager().find(StrTestEntity.class, ste2_id);
- IdMapKeyEntity rev1 = getVersionsReader().find(IdMapKeyEntity.class, imke_id,
1);
- IdMapKeyEntity rev2 = getVersionsReader().find(IdMapKeyEntity.class, imke_id,
2);
+ IdMapKeyEntity rev1 = getAuditReader().find(IdMapKeyEntity.class, imke_id, 1);
+ IdMapKeyEntity rev2 = getAuditReader().find(IdMapKeyEntity.class, imke_id, 2);
assert rev1.getIdmap().equals(TestTools.makeMap(ste1.getId(), ste1));
assert rev2.getIdmap().equals(TestTools.makeMap(ste1.getId(), ste1, ste2.getId(),
ste2));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/components/Components.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/components/Components.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/components/Components.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -107,11 +107,11 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(ComponentTestEntity.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(ComponentTestEntity.class, id1));
- assert Arrays.asList(1, 2,
4).equals(getVersionsReader().getRevisions(ComponentTestEntity.class, id2));
+ assert Arrays.asList(1, 2,
4).equals(getAuditReader().getRevisions(ComponentTestEntity.class, id2));
- assert Arrays.asList(1,
3).equals(getVersionsReader().getRevisions(ComponentTestEntity.class, id3));
+ assert Arrays.asList(1,
3).equals(getAuditReader().getRevisions(ComponentTestEntity.class, id3));
}
@Test
@@ -119,10 +119,10 @@
ComponentTestEntity ver1 = new ComponentTestEntity(id1, new
Component1("a", "b"), null);
ComponentTestEntity ver2 = new ComponentTestEntity(id1, new
Component1("a'", "b'"), null);
- assert getVersionsReader().find(ComponentTestEntity.class, id1, 1).equals(ver1);
- assert getVersionsReader().find(ComponentTestEntity.class, id1, 2).equals(ver2);
- assert getVersionsReader().find(ComponentTestEntity.class, id1, 3).equals(ver2);
- assert getVersionsReader().find(ComponentTestEntity.class, id1, 4).equals(ver2);
+ assert getAuditReader().find(ComponentTestEntity.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(ComponentTestEntity.class, id1, 2).equals(ver2);
+ assert getAuditReader().find(ComponentTestEntity.class, id1, 3).equals(ver2);
+ assert getAuditReader().find(ComponentTestEntity.class, id1, 4).equals(ver2);
}
@Test
@@ -130,10 +130,10 @@
ComponentTestEntity ver1 = new ComponentTestEntity(id2, new
Component1("a2", "b2"), null);
ComponentTestEntity ver2 = new ComponentTestEntity(id2, new
Component1("a2'", "b2"), null);
- assert getVersionsReader().find(ComponentTestEntity.class, id2, 1).equals(ver1);
- assert getVersionsReader().find(ComponentTestEntity.class, id2, 2).equals(ver2);
- assert getVersionsReader().find(ComponentTestEntity.class, id2, 3).equals(ver2);
- assert getVersionsReader().find(ComponentTestEntity.class, id2, 4) == null;
+ assert getAuditReader().find(ComponentTestEntity.class, id2, 1).equals(ver1);
+ assert getAuditReader().find(ComponentTestEntity.class, id2, 2).equals(ver2);
+ assert getAuditReader().find(ComponentTestEntity.class, id2, 3).equals(ver2);
+ assert getAuditReader().find(ComponentTestEntity.class, id2, 4) == null;
}
@Test
@@ -141,9 +141,9 @@
ComponentTestEntity ver1 = new ComponentTestEntity(id3, new
Component1("a3", "b3"), null);
ComponentTestEntity ver2 = new ComponentTestEntity(id3, new
Component1("a3", "b3'"), null);
- assert getVersionsReader().find(ComponentTestEntity.class, id3, 1).equals(ver1);
- assert getVersionsReader().find(ComponentTestEntity.class, id3, 2).equals(ver1);
- assert getVersionsReader().find(ComponentTestEntity.class, id3, 3).equals(ver2);
- assert getVersionsReader().find(ComponentTestEntity.class, id3, 4).equals(ver2);
+ assert getAuditReader().find(ComponentTestEntity.class, id3, 1).equals(ver1);
+ assert getAuditReader().find(ComponentTestEntity.class, id3, 2).equals(ver1);
+ assert getAuditReader().find(ComponentTestEntity.class, id3, 3).equals(ver2);
+ assert getAuditReader().find(ComponentTestEntity.class, id3, 4).equals(ver2);
}
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/customtype/CompositeCustom.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/customtype/CompositeCustom.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/customtype/CompositeCustom.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -84,14 +84,14 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(CompositeCustomTypeEntity.class, ccte_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(CompositeCustomTypeEntity.class, ccte_id));
}
@Test
public void testHistoryOfCcte() {
- CompositeCustomTypeEntity rev1 =
getVersionsReader().find(CompositeCustomTypeEntity.class, ccte_id, 1);
- CompositeCustomTypeEntity rev2 =
getVersionsReader().find(CompositeCustomTypeEntity.class, ccte_id, 2);
- CompositeCustomTypeEntity rev3 =
getVersionsReader().find(CompositeCustomTypeEntity.class, ccte_id, 3);
+ CompositeCustomTypeEntity rev1 =
getAuditReader().find(CompositeCustomTypeEntity.class, ccte_id, 1);
+ CompositeCustomTypeEntity rev2 =
getAuditReader().find(CompositeCustomTypeEntity.class, ccte_id, 2);
+ CompositeCustomTypeEntity rev3 =
getAuditReader().find(CompositeCustomTypeEntity.class, ccte_id, 3);
assert rev1.getComponent().equals(new Component("a", 1));
assert rev2.getComponent().equals(new Component("b", 1));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/customtype/ParametrizedCustom.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/customtype/ParametrizedCustom.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/customtype/ParametrizedCustom.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -74,13 +74,13 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(ParametrizedCustomTypeEntity.class, pcte_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(ParametrizedCustomTypeEntity.class, pcte_id));
}
@Test
public void testHistoryOfCcte() {
- ParametrizedCustomTypeEntity rev1 =
getVersionsReader().find(ParametrizedCustomTypeEntity.class, pcte_id, 1);
- ParametrizedCustomTypeEntity rev2 =
getVersionsReader().find(ParametrizedCustomTypeEntity.class, pcte_id, 2);
+ ParametrizedCustomTypeEntity rev1 =
getAuditReader().find(ParametrizedCustomTypeEntity.class, pcte_id, 1);
+ ParametrizedCustomTypeEntity rev2 =
getAuditReader().find(ParametrizedCustomTypeEntity.class, pcte_id, 2);
assert "xUy".equals(rev1.getStr());
assert "xVy".equals(rev2.getStr());
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/Dates.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/Dates.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/Dates.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -60,7 +60,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(DateTestEntity.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(DateTestEntity.class, id1));
}
@Test
@@ -68,7 +68,7 @@
DateTestEntity ver1 = new DateTestEntity(id1, new Date(12345000));
DateTestEntity ver2 = new DateTestEntity(id1, new Date(45678000));
- assert getVersionsReader().find(DateTestEntity.class, id1, 1).equals(ver1);
- assert getVersionsReader().find(DateTestEntity.class, id1, 2).equals(ver2);
+ assert getAuditReader().find(DateTestEntity.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(DateTestEntity.class, id1, 2).equals(ver2);
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/Enums.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/Enums.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/Enums.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -62,7 +62,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(EnumTestEntity.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(EnumTestEntity.class, id1));
}
@Test
@@ -70,7 +70,7 @@
EnumTestEntity ver1 = new EnumTestEntity(id1, EnumTestEntity.E1.X,
EnumTestEntity.E2.A);
EnumTestEntity ver2 = new EnumTestEntity(id1, EnumTestEntity.E1.Y,
EnumTestEntity.E2.B);
- assert getVersionsReader().find(EnumTestEntity.class, id1, 1).equals(ver1);
- assert getVersionsReader().find(EnumTestEntity.class, id1, 2).equals(ver2);
+ assert getAuditReader().find(EnumTestEntity.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(EnumTestEntity.class, id1, 2).equals(ver2);
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/Lobs.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/Lobs.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/Lobs.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -61,7 +61,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(LobTestEntity.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(LobTestEntity.class, id1));
}
@Test
@@ -69,7 +69,7 @@
LobTestEntity ver1 = new LobTestEntity(id1, "abc", new byte[] { 0, 1, 2
}, new char[] { 'x', 'y', 'z' });
LobTestEntity ver2 = new LobTestEntity(id1, "def", new byte[] { 3, 4, 5
}, new char[] { 'h', 'i', 'j' });
- assert getVersionsReader().find(LobTestEntity.class, id1, 1).equals(ver1);
- assert getVersionsReader().find(LobTestEntity.class, id1, 2).equals(ver2);
+ assert getAuditReader().find(LobTestEntity.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(LobTestEntity.class, id1, 2).equals(ver2);
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/Serializables.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/Serializables.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/Serializables.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -59,7 +59,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(SerializableTestEntity.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(SerializableTestEntity.class, id1));
}
@Test
@@ -67,7 +67,7 @@
SerializableTestEntity ver1 = new SerializableTestEntity(id1, new
SerObject("d1"));
SerializableTestEntity ver2 = new SerializableTestEntity(id1, new
SerObject("d2"));
- assert getVersionsReader().find(SerializableTestEntity.class, id1,
1).equals(ver1);
- assert getVersionsReader().find(SerializableTestEntity.class, id1,
2).equals(ver2);
+ assert getAuditReader().find(SerializableTestEntity.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(SerializableTestEntity.class, id1, 2).equals(ver2);
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/DoubleFlushAddDel.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/DoubleFlushAddDel.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/DoubleFlushAddDel.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -66,11 +66,11 @@
@Test
public void testRevisionsCounts() {
- assert
Arrays.asList().equals(getVersionsReader().getRevisions(StrTestEntity.class, id));
+ assert Arrays.asList().equals(getAuditReader().getRevisions(StrTestEntity.class,
id));
}
@Test
public void testHistoryOfId() {
- assert getVersionsReader().find(StrTestEntity.class, id, 1) == null;
+ assert getAuditReader().find(StrTestEntity.class, id, 1) == null;
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/DoubleFlushAddMod.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/DoubleFlushAddMod.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/DoubleFlushAddMod.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -76,7 +76,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(StrTestEntity.class, id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(StrTestEntity.class, id));
}
@Test
@@ -84,7 +84,7 @@
StrTestEntity ver1 = new StrTestEntity("y", id);
StrTestEntity ver2 = new StrTestEntity("z", id);
- assert getVersionsReader().find(StrTestEntity.class, id, 1).equals(ver1);
- assert getVersionsReader().find(StrTestEntity.class, id, 2).equals(ver2);
+ assert getAuditReader().find(StrTestEntity.class, id, 1).equals(ver1);
+ assert getAuditReader().find(StrTestEntity.class, id, 2).equals(ver2);
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/DoubleFlushModDel.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/DoubleFlushModDel.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/DoubleFlushModDel.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -73,14 +73,14 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(StrTestEntity.class, id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(StrTestEntity.class, id));
}
@Test
public void testHistoryOfId() {
StrTestEntity ver1 = new StrTestEntity("x", id);
- assert getVersionsReader().find(StrTestEntity.class, id, 1).equals(ver1);
- assert getVersionsReader().find(StrTestEntity.class, id, 2) == null;
+ assert getAuditReader().find(StrTestEntity.class, id, 1).equals(ver1);
+ assert getAuditReader().find(StrTestEntity.class, id, 2) == null;
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/DoubleFlushModMod.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/DoubleFlushModMod.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/DoubleFlushModMod.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -73,7 +73,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(StrTestEntity.class, id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(StrTestEntity.class, id));
}
@Test
@@ -81,7 +81,7 @@
StrTestEntity ver1 = new StrTestEntity("x", id);
StrTestEntity ver2 = new StrTestEntity("z", id);
- assert getVersionsReader().find(StrTestEntity.class, id, 1).equals(ver1);
- assert getVersionsReader().find(StrTestEntity.class, id, 2).equals(ver2);
+ assert getAuditReader().find(StrTestEntity.class, id, 1).equals(ver1);
+ assert getAuditReader().find(StrTestEntity.class, id, 2).equals(ver2);
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/ManualFlush.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/ManualFlush.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/flush/ManualFlush.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -80,7 +80,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(StrTestEntity.class, id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(StrTestEntity.class, id));
}
@Test
@@ -88,8 +88,8 @@
StrTestEntity ver1 = new StrTestEntity("x", id);
StrTestEntity ver2 = new StrTestEntity("z", id);
- assert getVersionsReader().find(StrTestEntity.class, id, 1).equals(ver1);
- assert getVersionsReader().find(StrTestEntity.class, id, 2).equals(ver2);
+ assert getAuditReader().find(StrTestEntity.class, id, 1).equals(ver1);
+ assert getAuditReader().find(StrTestEntity.class, id, 2).equals(ver2);
}
@Test
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/ids/CompositeIds.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/ids/CompositeIds.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/ids/CompositeIds.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -119,13 +119,13 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 3,
4).equals(getVersionsReader().getRevisions(EmbIdTestEntity.class, id1));
+ assert Arrays.asList(1, 3,
4).equals(getAuditReader().getRevisions(EmbIdTestEntity.class, id1));
- assert Arrays.asList(2, 3, 4,
5).equals(getVersionsReader().getRevisions(EmbIdTestEntity.class, id2));
+ assert Arrays.asList(2, 3, 4,
5).equals(getAuditReader().getRevisions(EmbIdTestEntity.class, id2));
- assert Arrays.asList(1, 3,
4).equals(getVersionsReader().getRevisions(MulIdTestEntity.class, id3));
+ assert Arrays.asList(1, 3,
4).equals(getAuditReader().getRevisions(MulIdTestEntity.class, id3));
- assert Arrays.asList(2,
3).equals(getVersionsReader().getRevisions(MulIdTestEntity.class, id4));
+ assert Arrays.asList(2,
3).equals(getAuditReader().getRevisions(MulIdTestEntity.class, id4));
}
@Test
@@ -133,11 +133,11 @@
EmbIdTestEntity ver1 = new EmbIdTestEntity(id1, "x");
EmbIdTestEntity ver2 = new EmbIdTestEntity(id1, "x2");
- assert getVersionsReader().find(EmbIdTestEntity.class, id1, 1).equals(ver1);
- assert getVersionsReader().find(EmbIdTestEntity.class, id1, 2).equals(ver1);
- assert getVersionsReader().find(EmbIdTestEntity.class, id1, 3).equals(ver2);
- assert getVersionsReader().find(EmbIdTestEntity.class, id1, 4) == null;
- assert getVersionsReader().find(EmbIdTestEntity.class, id1, 5) == null;
+ assert getAuditReader().find(EmbIdTestEntity.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(EmbIdTestEntity.class, id1, 2).equals(ver1);
+ assert getAuditReader().find(EmbIdTestEntity.class, id1, 3).equals(ver2);
+ assert getAuditReader().find(EmbIdTestEntity.class, id1, 4) == null;
+ assert getAuditReader().find(EmbIdTestEntity.class, id1, 5) == null;
}
@Test
@@ -146,11 +146,11 @@
EmbIdTestEntity ver2 = new EmbIdTestEntity(id2, "y2");
EmbIdTestEntity ver3 = new EmbIdTestEntity(id2, "y3");
- assert getVersionsReader().find(EmbIdTestEntity.class, id2, 1) == null;
- assert getVersionsReader().find(EmbIdTestEntity.class, id2, 2).equals(ver1);
- assert getVersionsReader().find(EmbIdTestEntity.class, id2, 3).equals(ver2);
- assert getVersionsReader().find(EmbIdTestEntity.class, id2, 4).equals(ver3);
- assert getVersionsReader().find(EmbIdTestEntity.class, id2, 5) == null;
+ assert getAuditReader().find(EmbIdTestEntity.class, id2, 1) == null;
+ assert getAuditReader().find(EmbIdTestEntity.class, id2, 2).equals(ver1);
+ assert getAuditReader().find(EmbIdTestEntity.class, id2, 3).equals(ver2);
+ assert getAuditReader().find(EmbIdTestEntity.class, id2, 4).equals(ver3);
+ assert getAuditReader().find(EmbIdTestEntity.class, id2, 5) == null;
}
@Test
@@ -158,11 +158,11 @@
MulIdTestEntity ver1 = new MulIdTestEntity(id3.getId1(), id3.getId2(),
"a");
MulIdTestEntity ver2 = new MulIdTestEntity(id3.getId1(), id3.getId2(),
"a2");
- assert getVersionsReader().find(MulIdTestEntity.class, id3, 1).equals(ver1);
- assert getVersionsReader().find(MulIdTestEntity.class, id3, 2).equals(ver1);
- assert getVersionsReader().find(MulIdTestEntity.class, id3, 3).equals(ver2);
- assert getVersionsReader().find(MulIdTestEntity.class, id3, 4) == null;
- assert getVersionsReader().find(MulIdTestEntity.class, id3, 5) == null;
+ assert getAuditReader().find(MulIdTestEntity.class, id3, 1).equals(ver1);
+ assert getAuditReader().find(MulIdTestEntity.class, id3, 2).equals(ver1);
+ assert getAuditReader().find(MulIdTestEntity.class, id3, 3).equals(ver2);
+ assert getAuditReader().find(MulIdTestEntity.class, id3, 4) == null;
+ assert getAuditReader().find(MulIdTestEntity.class, id3, 5) == null;
}
@Test
@@ -170,10 +170,10 @@
MulIdTestEntity ver1 = new MulIdTestEntity(id4.getId1(), id4.getId2(),
"b");
MulIdTestEntity ver2 = new MulIdTestEntity(id4.getId1(), id4.getId2(),
"b2");
- assert getVersionsReader().find(MulIdTestEntity.class, id4, 1) == null;
- assert getVersionsReader().find(MulIdTestEntity.class, id4, 2).equals(ver1);
- assert getVersionsReader().find(MulIdTestEntity.class, id4, 3).equals(ver2);
- assert getVersionsReader().find(MulIdTestEntity.class, id4, 4).equals(ver2);
- assert getVersionsReader().find(MulIdTestEntity.class, id4, 5).equals(ver2);
+ assert getAuditReader().find(MulIdTestEntity.class, id4, 1) == null;
+ assert getAuditReader().find(MulIdTestEntity.class, id4, 2).equals(ver1);
+ assert getAuditReader().find(MulIdTestEntity.class, id4, 3).equals(ver2);
+ assert getAuditReader().find(MulIdTestEntity.class, id4, 4).equals(ver2);
+ assert getAuditReader().find(MulIdTestEntity.class, id4, 5).equals(ver2);
}
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/inheritance/single/ChildVersioning.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/inheritance/single/ChildVersioning.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/inheritance/single/ChildVersioning.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -64,7 +64,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(ChildEntity.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(ChildEntity.class, id1));
}
@Test
@@ -72,21 +72,21 @@
ChildEntity ver1 = new ChildEntity(id1, "x", 1l);
ChildEntity ver2 = new ChildEntity(id1, "y", 2l);
- assert getVersionsReader().find(ChildEntity.class, id1, 1).equals(ver1);
- assert getVersionsReader().find(ChildEntity.class, id1, 2).equals(ver2);
+ assert getAuditReader().find(ChildEntity.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(ChildEntity.class, id1, 2).equals(ver2);
- assert getVersionsReader().find(ParentEntity.class, id1, 1).equals(ver1);
- assert getVersionsReader().find(ParentEntity.class, id1, 2).equals(ver2);
+ assert getAuditReader().find(ParentEntity.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(ParentEntity.class, id1, 2).equals(ver2);
}
@Test
public void testPolymorphicQuery() {
ChildEntity childVer1 = new ChildEntity(id1, "x", 1l);
- assert getVersionsReader().createQuery().forEntitiesAtRevision(ChildEntity.class,
1).getSingleResult()
+ assert getAuditReader().createQuery().forEntitiesAtRevision(ChildEntity.class,
1).getSingleResult()
.equals(childVer1);
- assert
getVersionsReader().createQuery().forEntitiesAtRevision(ParentEntity.class,
1).getSingleResult()
+ assert getAuditReader().createQuery().forEntitiesAtRevision(ParentEntity.class,
1).getSingleResult()
.equals(childVer1);
}
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/inheritance/single/ParentVersioning.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/inheritance/single/ParentVersioning.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/inheritance/single/ParentVersioning.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -63,13 +63,13 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(ParentEntity.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(ParentEntity.class, id1));
}
@Test
public void testHistoryOfChildId1() {
- assert getVersionsReader().find(ChildEntity.class, id1, 1) == null;
- assert getVersionsReader().find(ChildEntity.class, id1, 2) == null;
+ assert getAuditReader().find(ChildEntity.class, id1, 1) == null;
+ assert getAuditReader().find(ChildEntity.class, id1, 2) == null;
}
@Test
@@ -77,17 +77,17 @@
ParentEntity ver1 = new ParentEntity(id1, "x");
ParentEntity ver2 = new ParentEntity(id1, "y");
- assert getVersionsReader().find(ParentEntity.class, id1, 1).equals(ver1);
- assert getVersionsReader().find(ParentEntity.class, id1, 2).equals(ver2);
+ assert getAuditReader().find(ParentEntity.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(ParentEntity.class, id1, 2).equals(ver2);
}
@Test
public void testPolymorphicQuery() {
ParentEntity parentVer1 = new ParentEntity(id1, "x");
- assert
getVersionsReader().createQuery().forEntitiesAtRevision(ParentEntity.class,
1).getSingleResult()
+ assert getAuditReader().createQuery().forEntitiesAtRevision(ParentEntity.class,
1).getSingleResult()
.equals(parentVer1);
- assert getVersionsReader().createQuery().forEntitiesAtRevision(ChildEntity.class,
1)
+ assert getAuditReader().createQuery().forEntitiesAtRevision(ChildEntity.class,
1)
.getResultList().size() == 0;
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/inheritance/single/childrelation/ChildReferencing.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/inheritance/single/childrelation/ChildReferencing.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/inheritance/single/childrelation/ChildReferencing.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -89,33 +89,33 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(ReferencedEntity.class, re_id1));
- assert Arrays.asList(1,
3).equals(getVersionsReader().getRevisions(ReferencedEntity.class, re_id2));
- assert Arrays.asList(2,
3).equals(getVersionsReader().getRevisions(ChildIngEntity.class, c_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(ReferencedEntity.class, re_id1));
+ assert Arrays.asList(1,
3).equals(getAuditReader().getRevisions(ReferencedEntity.class, re_id2));
+ assert Arrays.asList(2,
3).equals(getAuditReader().getRevisions(ChildIngEntity.class, c_id));
}
@Test
public void testHistoryOfReferencedCollection1() {
- assert getVersionsReader().find(ReferencedEntity.class, re_id1,
1).getReferencing().size() == 0;
- assert getVersionsReader().find(ReferencedEntity.class, re_id1,
2).getReferencing().equals(
+ assert getAuditReader().find(ReferencedEntity.class, re_id1,
1).getReferencing().size() == 0;
+ assert getAuditReader().find(ReferencedEntity.class, re_id1,
2).getReferencing().equals(
TestTools.makeSet(new ChildIngEntity(c_id, "y", 1l)));
- assert getVersionsReader().find(ReferencedEntity.class, re_id1,
3).getReferencing().size() == 0;
+ assert getAuditReader().find(ReferencedEntity.class, re_id1,
3).getReferencing().size() == 0;
}
@Test
public void testHistoryOfReferencedCollection2() {
- assert getVersionsReader().find(ReferencedEntity.class, re_id2,
1).getReferencing().size() == 0;
- assert getVersionsReader().find(ReferencedEntity.class, re_id2,
2).getReferencing().size() == 0;
- assert getVersionsReader().find(ReferencedEntity.class, re_id2,
3).getReferencing().equals(
+ assert getAuditReader().find(ReferencedEntity.class, re_id2,
1).getReferencing().size() == 0;
+ assert getAuditReader().find(ReferencedEntity.class, re_id2,
2).getReferencing().size() == 0;
+ assert getAuditReader().find(ReferencedEntity.class, re_id2,
3).getReferencing().equals(
TestTools.makeSet(new ChildIngEntity(c_id, "y", 1l)));
}
@Test
public void testChildHistory() {
- assert getVersionsReader().find(ChildIngEntity.class, c_id, 1) == null;
- assert getVersionsReader().find(ChildIngEntity.class, c_id,
2).getReferenced().equals(
+ assert getAuditReader().find(ChildIngEntity.class, c_id, 1) == null;
+ assert getAuditReader().find(ChildIngEntity.class, c_id,
2).getReferenced().equals(
new ReferencedEntity(re_id1));
- assert getVersionsReader().find(ChildIngEntity.class, c_id,
3).getReferenced().equals(
+ assert getAuditReader().find(ChildIngEntity.class, c_id,
3).getReferenced().equals(
new ReferencedEntity(re_id2));
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/inheritance/single/relation/PolymorphicCollection.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/inheritance/single/relation/PolymorphicCollection.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/inheritance/single/relation/PolymorphicCollection.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -87,17 +87,17 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(ReferencedEntity.class, ed_id1));
- assert
Arrays.asList(2).equals(getVersionsReader().getRevisions(ParentIngEntity.class, p_id));
- assert
Arrays.asList(3).equals(getVersionsReader().getRevisions(ChildIngEntity.class, c_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(ReferencedEntity.class, ed_id1));
+ assert
Arrays.asList(2).equals(getAuditReader().getRevisions(ParentIngEntity.class, p_id));
+ assert
Arrays.asList(3).equals(getAuditReader().getRevisions(ChildIngEntity.class, c_id));
}
@Test
public void testHistoryOfReferencedCollection() {
- assert getVersionsReader().find(ReferencedEntity.class, ed_id1,
1).getReferencing().size() == 0;
- assert getVersionsReader().find(ReferencedEntity.class, ed_id1,
2).getReferencing().equals(
+ assert getAuditReader().find(ReferencedEntity.class, ed_id1,
1).getReferencing().size() == 0;
+ assert getAuditReader().find(ReferencedEntity.class, ed_id1,
2).getReferencing().equals(
TestTools.makeSet(new ParentIngEntity(p_id, "x")));
- assert getVersionsReader().find(ReferencedEntity.class, ed_id1,
3).getReferencing().equals(
+ assert getAuditReader().find(ReferencedEntity.class, ed_id1,
3).getReferencing().equals(
TestTools.makeSet(new ParentIngEntity(p_id, "x"), new
ChildIngEntity(c_id, "y", 1l)));
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/BasicList.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/BasicList.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/BasicList.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -132,11 +132,11 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2,
4).equals(getVersionsReader().getRevisions(ListOwnedEntity.class, ed1_id));
- assert Arrays.asList(1, 2, 3,
5).equals(getVersionsReader().getRevisions(ListOwnedEntity.class, ed2_id));
+ assert Arrays.asList(1, 2,
4).equals(getAuditReader().getRevisions(ListOwnedEntity.class, ed1_id));
+ assert Arrays.asList(1, 2, 3,
5).equals(getAuditReader().getRevisions(ListOwnedEntity.class, ed2_id));
- assert Arrays.asList(1, 2, 3, 4,
5).equals(getVersionsReader().getRevisions(ListOwningEntity.class, ing1_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(ListOwningEntity.class, ing2_id));
+ assert Arrays.asList(1, 2, 3, 4,
5).equals(getAuditReader().getRevisions(ListOwningEntity.class, ing1_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(ListOwningEntity.class, ing2_id));
}
@Test
@@ -144,11 +144,11 @@
ListOwningEntity ing1 = getEntityManager().find(ListOwningEntity.class,
ing1_id);
ListOwningEntity ing2 = getEntityManager().find(ListOwningEntity.class,
ing2_id);
- ListOwnedEntity rev1 = getVersionsReader().find(ListOwnedEntity.class, ed1_id,
1);
- ListOwnedEntity rev2 = getVersionsReader().find(ListOwnedEntity.class, ed1_id,
2);
- ListOwnedEntity rev3 = getVersionsReader().find(ListOwnedEntity.class, ed1_id,
3);
- ListOwnedEntity rev4 = getVersionsReader().find(ListOwnedEntity.class, ed1_id,
4);
- ListOwnedEntity rev5 = getVersionsReader().find(ListOwnedEntity.class, ed1_id,
5);
+ ListOwnedEntity rev1 = getAuditReader().find(ListOwnedEntity.class, ed1_id, 1);
+ ListOwnedEntity rev2 = getAuditReader().find(ListOwnedEntity.class, ed1_id, 2);
+ ListOwnedEntity rev3 = getAuditReader().find(ListOwnedEntity.class, ed1_id, 3);
+ ListOwnedEntity rev4 = getAuditReader().find(ListOwnedEntity.class, ed1_id, 4);
+ ListOwnedEntity rev5 = getAuditReader().find(ListOwnedEntity.class, ed1_id, 5);
assert rev1.getReferencing().equals(Collections.EMPTY_LIST);
assert TestTools.checkList(rev2.getReferencing(), ing1, ing2);
@@ -162,11 +162,11 @@
ListOwningEntity ing1 = getEntityManager().find(ListOwningEntity.class,
ing1_id);
ListOwningEntity ing2 = getEntityManager().find(ListOwningEntity.class,
ing2_id);
- ListOwnedEntity rev1 = getVersionsReader().find(ListOwnedEntity.class, ed2_id,
1);
- ListOwnedEntity rev2 = getVersionsReader().find(ListOwnedEntity.class, ed2_id,
2);
- ListOwnedEntity rev3 = getVersionsReader().find(ListOwnedEntity.class, ed2_id,
3);
- ListOwnedEntity rev4 = getVersionsReader().find(ListOwnedEntity.class, ed2_id,
4);
- ListOwnedEntity rev5 = getVersionsReader().find(ListOwnedEntity.class, ed2_id,
5);
+ ListOwnedEntity rev1 = getAuditReader().find(ListOwnedEntity.class, ed2_id, 1);
+ ListOwnedEntity rev2 = getAuditReader().find(ListOwnedEntity.class, ed2_id, 2);
+ ListOwnedEntity rev3 = getAuditReader().find(ListOwnedEntity.class, ed2_id, 3);
+ ListOwnedEntity rev4 = getAuditReader().find(ListOwnedEntity.class, ed2_id, 4);
+ ListOwnedEntity rev5 = getAuditReader().find(ListOwnedEntity.class, ed2_id, 5);
assert rev1.getReferencing().equals(Collections.EMPTY_LIST);
assert TestTools.checkList(rev2.getReferencing(), ing2);
@@ -180,11 +180,11 @@
ListOwnedEntity ed1 = getEntityManager().find(ListOwnedEntity.class, ed1_id);
ListOwnedEntity ed2 = getEntityManager().find(ListOwnedEntity.class, ed2_id);
- ListOwningEntity rev1 = getVersionsReader().find(ListOwningEntity.class, ing1_id,
1);
- ListOwningEntity rev2 = getVersionsReader().find(ListOwningEntity.class, ing1_id,
2);
- ListOwningEntity rev3 = getVersionsReader().find(ListOwningEntity.class, ing1_id,
3);
- ListOwningEntity rev4 = getVersionsReader().find(ListOwningEntity.class, ing1_id,
4);
- ListOwningEntity rev5 = getVersionsReader().find(ListOwningEntity.class, ing1_id,
5);
+ ListOwningEntity rev1 = getAuditReader().find(ListOwningEntity.class, ing1_id,
1);
+ ListOwningEntity rev2 = getAuditReader().find(ListOwningEntity.class, ing1_id,
2);
+ ListOwningEntity rev3 = getAuditReader().find(ListOwningEntity.class, ing1_id,
3);
+ ListOwningEntity rev4 = getAuditReader().find(ListOwningEntity.class, ing1_id,
4);
+ ListOwningEntity rev5 = getAuditReader().find(ListOwningEntity.class, ing1_id,
5);
assert rev1.getReferences().equals(Collections.EMPTY_LIST);
assert TestTools.checkList(rev2.getReferences(), ed1);
@@ -198,11 +198,11 @@
ListOwnedEntity ed1 = getEntityManager().find(ListOwnedEntity.class, ed1_id);
ListOwnedEntity ed2 = getEntityManager().find(ListOwnedEntity.class, ed2_id);
- ListOwningEntity rev1 = getVersionsReader().find(ListOwningEntity.class, ing2_id,
1);
- ListOwningEntity rev2 = getVersionsReader().find(ListOwningEntity.class, ing2_id,
2);
- ListOwningEntity rev3 = getVersionsReader().find(ListOwningEntity.class, ing2_id,
3);
- ListOwningEntity rev4 = getVersionsReader().find(ListOwningEntity.class, ing2_id,
4);
- ListOwningEntity rev5 = getVersionsReader().find(ListOwningEntity.class, ing2_id,
5);
+ ListOwningEntity rev1 = getAuditReader().find(ListOwningEntity.class, ing2_id,
1);
+ ListOwningEntity rev2 = getAuditReader().find(ListOwningEntity.class, ing2_id,
2);
+ ListOwningEntity rev3 = getAuditReader().find(ListOwningEntity.class, ing2_id,
3);
+ ListOwningEntity rev4 = getAuditReader().find(ListOwningEntity.class, ing2_id,
4);
+ ListOwningEntity rev5 = getAuditReader().find(ListOwningEntity.class, ing2_id,
5);
assert rev1.getReferences().equals(Collections.EMPTY_LIST);
assert TestTools.checkList(rev2.getReferences(), ed1, ed2);
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/BasicMap.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/BasicMap.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/BasicMap.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -124,11 +124,11 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(MapOwnedEntity.class, ed1_id));
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(MapOwnedEntity.class, ed2_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(MapOwnedEntity.class, ed1_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(MapOwnedEntity.class, ed2_id));
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(MapOwningEntity.class, ing1_id));
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(MapOwningEntity.class, ing2_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(MapOwningEntity.class, ing1_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(MapOwningEntity.class, ing2_id));
}
@Test
@@ -136,9 +136,9 @@
MapOwningEntity ing1 = getEntityManager().find(MapOwningEntity.class, ing1_id);
MapOwningEntity ing2 = getEntityManager().find(MapOwningEntity.class, ing2_id);
- MapOwnedEntity rev1 = getVersionsReader().find(MapOwnedEntity.class, ed1_id, 1);
- MapOwnedEntity rev2 = getVersionsReader().find(MapOwnedEntity.class, ed1_id, 2);
- MapOwnedEntity rev3 = getVersionsReader().find(MapOwnedEntity.class, ed1_id, 3);
+ MapOwnedEntity rev1 = getAuditReader().find(MapOwnedEntity.class, ed1_id, 1);
+ MapOwnedEntity rev2 = getAuditReader().find(MapOwnedEntity.class, ed1_id, 2);
+ MapOwnedEntity rev3 = getAuditReader().find(MapOwnedEntity.class, ed1_id, 3);
assert rev1.getReferencing().equals(Collections.EMPTY_SET);
assert rev2.getReferencing().equals(TestTools.makeSet(ing1, ing2));
@@ -149,9 +149,9 @@
public void testHistoryOfEdId2() {
MapOwningEntity ing2 = getEntityManager().find(MapOwningEntity.class, ing2_id);
- MapOwnedEntity rev1 = getVersionsReader().find(MapOwnedEntity.class, ed2_id, 1);
- MapOwnedEntity rev2 = getVersionsReader().find(MapOwnedEntity.class, ed2_id, 2);
- MapOwnedEntity rev3 = getVersionsReader().find(MapOwnedEntity.class, ed2_id, 3);
+ MapOwnedEntity rev1 = getAuditReader().find(MapOwnedEntity.class, ed2_id, 1);
+ MapOwnedEntity rev2 = getAuditReader().find(MapOwnedEntity.class, ed2_id, 2);
+ MapOwnedEntity rev3 = getAuditReader().find(MapOwnedEntity.class, ed2_id, 3);
assert rev1.getReferencing().equals(TestTools.makeSet(ing2));
assert rev2.getReferencing().equals(Collections.EMPTY_SET);
@@ -162,9 +162,9 @@
public void testHistoryOfEdIng1() {
MapOwnedEntity ed1 = getEntityManager().find(MapOwnedEntity.class, ed1_id);
- MapOwningEntity rev1 = getVersionsReader().find(MapOwningEntity.class, ing1_id,
1);
- MapOwningEntity rev2 = getVersionsReader().find(MapOwningEntity.class, ing1_id,
2);
- MapOwningEntity rev3 = getVersionsReader().find(MapOwningEntity.class, ing1_id,
3);
+ MapOwningEntity rev1 = getAuditReader().find(MapOwningEntity.class, ing1_id, 1);
+ MapOwningEntity rev2 = getAuditReader().find(MapOwningEntity.class, ing1_id, 2);
+ MapOwningEntity rev3 = getAuditReader().find(MapOwningEntity.class, ing1_id, 3);
assert rev1.getReferences().equals(Collections.EMPTY_MAP);
assert rev2.getReferences().equals(TestTools.makeMap("1", ed1,
"2", ed1));
@@ -176,9 +176,9 @@
MapOwnedEntity ed1 = getEntityManager().find(MapOwnedEntity.class, ed1_id);
MapOwnedEntity ed2 = getEntityManager().find(MapOwnedEntity.class, ed2_id);
- MapOwningEntity rev1 = getVersionsReader().find(MapOwningEntity.class, ing2_id,
1);
- MapOwningEntity rev2 = getVersionsReader().find(MapOwningEntity.class, ing2_id,
2);
- MapOwningEntity rev3 = getVersionsReader().find(MapOwningEntity.class, ing2_id,
3);
+ MapOwningEntity rev1 = getAuditReader().find(MapOwningEntity.class, ing2_id, 1);
+ MapOwningEntity rev2 = getAuditReader().find(MapOwningEntity.class, ing2_id, 2);
+ MapOwningEntity rev3 = getAuditReader().find(MapOwningEntity.class, ing2_id, 3);
assert rev1.getReferences().equals(TestTools.makeMap("2", ed2));
assert rev2.getReferences().equals(TestTools.makeMap("2", ed1));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/BasicSet.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/BasicSet.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/BasicSet.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -132,11 +132,11 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2,
4).equals(getVersionsReader().getRevisions(SetOwnedEntity.class, ed1_id));
- assert Arrays.asList(1, 2, 3,
5).equals(getVersionsReader().getRevisions(SetOwnedEntity.class, ed2_id));
+ assert Arrays.asList(1, 2,
4).equals(getAuditReader().getRevisions(SetOwnedEntity.class, ed1_id));
+ assert Arrays.asList(1, 2, 3,
5).equals(getAuditReader().getRevisions(SetOwnedEntity.class, ed2_id));
- assert Arrays.asList(1, 2, 3, 4,
5).equals(getVersionsReader().getRevisions(SetOwningEntity.class, ing1_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(SetOwningEntity.class, ing2_id));
+ assert Arrays.asList(1, 2, 3, 4,
5).equals(getAuditReader().getRevisions(SetOwningEntity.class, ing1_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(SetOwningEntity.class, ing2_id));
}
@Test
@@ -144,11 +144,11 @@
SetOwningEntity ing1 = getEntityManager().find(SetOwningEntity.class, ing1_id);
SetOwningEntity ing2 = getEntityManager().find(SetOwningEntity.class, ing2_id);
- SetOwnedEntity rev1 = getVersionsReader().find(SetOwnedEntity.class, ed1_id, 1);
- SetOwnedEntity rev2 = getVersionsReader().find(SetOwnedEntity.class, ed1_id, 2);
- SetOwnedEntity rev3 = getVersionsReader().find(SetOwnedEntity.class, ed1_id, 3);
- SetOwnedEntity rev4 = getVersionsReader().find(SetOwnedEntity.class, ed1_id, 4);
- SetOwnedEntity rev5 = getVersionsReader().find(SetOwnedEntity.class, ed1_id, 5);
+ SetOwnedEntity rev1 = getAuditReader().find(SetOwnedEntity.class, ed1_id, 1);
+ SetOwnedEntity rev2 = getAuditReader().find(SetOwnedEntity.class, ed1_id, 2);
+ SetOwnedEntity rev3 = getAuditReader().find(SetOwnedEntity.class, ed1_id, 3);
+ SetOwnedEntity rev4 = getAuditReader().find(SetOwnedEntity.class, ed1_id, 4);
+ SetOwnedEntity rev5 = getAuditReader().find(SetOwnedEntity.class, ed1_id, 5);
assert rev1.getReferencing().equals(Collections.EMPTY_SET);
assert rev2.getReferencing().equals(TestTools.makeSet(ing1, ing2));
@@ -162,11 +162,11 @@
SetOwningEntity ing1 = getEntityManager().find(SetOwningEntity.class, ing1_id);
SetOwningEntity ing2 = getEntityManager().find(SetOwningEntity.class, ing2_id);
- SetOwnedEntity rev1 = getVersionsReader().find(SetOwnedEntity.class, ed2_id, 1);
- SetOwnedEntity rev2 = getVersionsReader().find(SetOwnedEntity.class, ed2_id, 2);
- SetOwnedEntity rev3 = getVersionsReader().find(SetOwnedEntity.class, ed2_id, 3);
- SetOwnedEntity rev4 = getVersionsReader().find(SetOwnedEntity.class, ed2_id, 4);
- SetOwnedEntity rev5 = getVersionsReader().find(SetOwnedEntity.class, ed2_id, 5);
+ SetOwnedEntity rev1 = getAuditReader().find(SetOwnedEntity.class, ed2_id, 1);
+ SetOwnedEntity rev2 = getAuditReader().find(SetOwnedEntity.class, ed2_id, 2);
+ SetOwnedEntity rev3 = getAuditReader().find(SetOwnedEntity.class, ed2_id, 3);
+ SetOwnedEntity rev4 = getAuditReader().find(SetOwnedEntity.class, ed2_id, 4);
+ SetOwnedEntity rev5 = getAuditReader().find(SetOwnedEntity.class, ed2_id, 5);
assert rev1.getReferencing().equals(Collections.EMPTY_SET);
assert rev2.getReferencing().equals(TestTools.makeSet(ing2));
@@ -180,11 +180,11 @@
SetOwnedEntity ed1 = getEntityManager().find(SetOwnedEntity.class, ed1_id);
SetOwnedEntity ed2 = getEntityManager().find(SetOwnedEntity.class, ed2_id);
- SetOwningEntity rev1 = getVersionsReader().find(SetOwningEntity.class, ing1_id,
1);
- SetOwningEntity rev2 = getVersionsReader().find(SetOwningEntity.class, ing1_id,
2);
- SetOwningEntity rev3 = getVersionsReader().find(SetOwningEntity.class, ing1_id,
3);
- SetOwningEntity rev4 = getVersionsReader().find(SetOwningEntity.class, ing1_id,
4);
- SetOwningEntity rev5 = getVersionsReader().find(SetOwningEntity.class, ing1_id,
5);
+ SetOwningEntity rev1 = getAuditReader().find(SetOwningEntity.class, ing1_id, 1);
+ SetOwningEntity rev2 = getAuditReader().find(SetOwningEntity.class, ing1_id, 2);
+ SetOwningEntity rev3 = getAuditReader().find(SetOwningEntity.class, ing1_id, 3);
+ SetOwningEntity rev4 = getAuditReader().find(SetOwningEntity.class, ing1_id, 4);
+ SetOwningEntity rev5 = getAuditReader().find(SetOwningEntity.class, ing1_id, 5);
assert rev1.getReferences().equals(Collections.EMPTY_SET);
assert rev2.getReferences().equals(TestTools.makeSet(ed1));
@@ -198,11 +198,11 @@
SetOwnedEntity ed1 = getEntityManager().find(SetOwnedEntity.class, ed1_id);
SetOwnedEntity ed2 = getEntityManager().find(SetOwnedEntity.class, ed2_id);
- SetOwningEntity rev1 = getVersionsReader().find(SetOwningEntity.class, ing2_id,
1);
- SetOwningEntity rev2 = getVersionsReader().find(SetOwningEntity.class, ing2_id,
2);
- SetOwningEntity rev3 = getVersionsReader().find(SetOwningEntity.class, ing2_id,
3);
- SetOwningEntity rev4 = getVersionsReader().find(SetOwningEntity.class, ing2_id,
4);
- SetOwningEntity rev5 = getVersionsReader().find(SetOwningEntity.class, ing2_id,
5);
+ SetOwningEntity rev1 = getAuditReader().find(SetOwningEntity.class, ing2_id, 1);
+ SetOwningEntity rev2 = getAuditReader().find(SetOwningEntity.class, ing2_id, 2);
+ SetOwningEntity rev3 = getAuditReader().find(SetOwningEntity.class, ing2_id, 3);
+ SetOwningEntity rev4 = getAuditReader().find(SetOwningEntity.class, ing2_id, 4);
+ SetOwningEntity rev5 = getAuditReader().find(SetOwningEntity.class, ing2_id, 5);
assert rev1.getReferences().equals(Collections.EMPTY_SET);
assert rev2.getReferences().equals(TestTools.makeSet(ed1, ed2));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/ternary/TernaryMap.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/ternary/TernaryMap.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/ternary/TernaryMap.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -150,14 +150,14 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2,
4).equals(getVersionsReader().getRevisions(TernaryMapEntity.class, map1_id));
- assert Arrays.asList(1, 2, 3,
4).equals(getVersionsReader().getRevisions(TernaryMapEntity.class, map2_id));
+ assert Arrays.asList(1, 2,
4).equals(getAuditReader().getRevisions(TernaryMapEntity.class, map1_id));
+ assert Arrays.asList(1, 2, 3,
4).equals(getAuditReader().getRevisions(TernaryMapEntity.class, map2_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, str1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, str2_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
str1_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
str2_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(IntTestEntity.class, int1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(IntTestEntity.class, int2_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(IntTestEntity.class,
int1_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(IntTestEntity.class,
int2_id));
}
@Test
@@ -168,10 +168,10 @@
IntTestEntity int1 = getEntityManager().find(IntTestEntity.class, int1_id);
IntTestEntity int2 = getEntityManager().find(IntTestEntity.class, int2_id);
- TernaryMapEntity rev1 = getVersionsReader().find(TernaryMapEntity.class, map1_id,
1);
- TernaryMapEntity rev2 = getVersionsReader().find(TernaryMapEntity.class, map1_id,
2);
- TernaryMapEntity rev3 = getVersionsReader().find(TernaryMapEntity.class, map1_id,
3);
- TernaryMapEntity rev4 = getVersionsReader().find(TernaryMapEntity.class, map1_id,
4);
+ TernaryMapEntity rev1 = getAuditReader().find(TernaryMapEntity.class, map1_id,
1);
+ TernaryMapEntity rev2 = getAuditReader().find(TernaryMapEntity.class, map1_id,
2);
+ TernaryMapEntity rev3 = getAuditReader().find(TernaryMapEntity.class, map1_id,
3);
+ TernaryMapEntity rev4 = getAuditReader().find(TernaryMapEntity.class, map1_id,
4);
assert rev1.getMap().equals(TestTools.makeMap(int1, str1));
assert rev2.getMap().equals(TestTools.makeMap(int1, str2));
@@ -187,10 +187,10 @@
IntTestEntity int1 = getEntityManager().find(IntTestEntity.class, int1_id);
IntTestEntity int2 = getEntityManager().find(IntTestEntity.class, int2_id);
- TernaryMapEntity rev1 = getVersionsReader().find(TernaryMapEntity.class, map2_id,
1);
- TernaryMapEntity rev2 = getVersionsReader().find(TernaryMapEntity.class, map2_id,
2);
- TernaryMapEntity rev3 = getVersionsReader().find(TernaryMapEntity.class, map2_id,
3);
- TernaryMapEntity rev4 = getVersionsReader().find(TernaryMapEntity.class, map2_id,
4);
+ TernaryMapEntity rev1 = getAuditReader().find(TernaryMapEntity.class, map2_id,
1);
+ TernaryMapEntity rev2 = getAuditReader().find(TernaryMapEntity.class, map2_id,
2);
+ TernaryMapEntity rev3 = getAuditReader().find(TernaryMapEntity.class, map2_id,
3);
+ TernaryMapEntity rev4 = getAuditReader().find(TernaryMapEntity.class, map2_id,
4);
assert rev1.getMap().equals(TestTools.makeMap());
assert rev2.getMap().equals(TestTools.makeMap(int1, str1, int2, str1));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/unidirectional/BasicUniList.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/unidirectional/BasicUniList.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/unidirectional/BasicUniList.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -132,11 +132,11 @@
@Test
public void testRevisionsCounts() {
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, ed1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, ed2_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
ed1_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
ed2_id));
- assert Arrays.asList(1, 2, 3, 4,
5).equals(getVersionsReader().getRevisions(ListUniEntity.class, ing1_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(ListUniEntity.class, ing2_id));
+ assert Arrays.asList(1, 2, 3, 4,
5).equals(getAuditReader().getRevisions(ListUniEntity.class, ing1_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(ListUniEntity.class, ing2_id));
}
@Test
@@ -144,11 +144,11 @@
StrTestEntity ed1 = getEntityManager().find(StrTestEntity.class, ed1_id);
StrTestEntity ed2 = getEntityManager().find(StrTestEntity.class, ed2_id);
- ListUniEntity rev1 = getVersionsReader().find(ListUniEntity.class, ing1_id, 1);
- ListUniEntity rev2 = getVersionsReader().find(ListUniEntity.class, ing1_id, 2);
- ListUniEntity rev3 = getVersionsReader().find(ListUniEntity.class, ing1_id, 3);
- ListUniEntity rev4 = getVersionsReader().find(ListUniEntity.class, ing1_id, 4);
- ListUniEntity rev5 = getVersionsReader().find(ListUniEntity.class, ing1_id, 5);
+ ListUniEntity rev1 = getAuditReader().find(ListUniEntity.class, ing1_id, 1);
+ ListUniEntity rev2 = getAuditReader().find(ListUniEntity.class, ing1_id, 2);
+ ListUniEntity rev3 = getAuditReader().find(ListUniEntity.class, ing1_id, 3);
+ ListUniEntity rev4 = getAuditReader().find(ListUniEntity.class, ing1_id, 4);
+ ListUniEntity rev5 = getAuditReader().find(ListUniEntity.class, ing1_id, 5);
assert rev1.getReferences().equals(Collections.EMPTY_LIST);
assert TestTools.checkList(rev2.getReferences(), ed1);
@@ -162,11 +162,11 @@
StrTestEntity ed1 = getEntityManager().find(StrTestEntity.class, ed1_id);
StrTestEntity ed2 = getEntityManager().find(StrTestEntity.class, ed2_id);
- ListUniEntity rev1 = getVersionsReader().find(ListUniEntity.class, ing2_id, 1);
- ListUniEntity rev2 = getVersionsReader().find(ListUniEntity.class, ing2_id, 2);
- ListUniEntity rev3 = getVersionsReader().find(ListUniEntity.class, ing2_id, 3);
- ListUniEntity rev4 = getVersionsReader().find(ListUniEntity.class, ing2_id, 4);
- ListUniEntity rev5 = getVersionsReader().find(ListUniEntity.class, ing2_id, 5);
+ ListUniEntity rev1 = getAuditReader().find(ListUniEntity.class, ing2_id, 1);
+ ListUniEntity rev2 = getAuditReader().find(ListUniEntity.class, ing2_id, 2);
+ ListUniEntity rev3 = getAuditReader().find(ListUniEntity.class, ing2_id, 3);
+ ListUniEntity rev4 = getAuditReader().find(ListUniEntity.class, ing2_id, 4);
+ ListUniEntity rev5 = getAuditReader().find(ListUniEntity.class, ing2_id, 5);
assert rev1.getReferences().equals(Collections.EMPTY_LIST);
assert TestTools.checkList(rev2.getReferences(), ed1, ed2);
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/unidirectional/BasicUniMap.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/unidirectional/BasicUniMap.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/unidirectional/BasicUniMap.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -110,10 +110,10 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2, 3,
4).equals(getVersionsReader().getRevisions(MapUniEntity.class, coll1_id));
+ assert Arrays.asList(1, 2, 3,
4).equals(getAuditReader().getRevisions(MapUniEntity.class, coll1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, str1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, str2_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
str1_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
str2_id));
}
@Test
@@ -121,10 +121,10 @@
StrTestEntity str1 = getEntityManager().find(StrTestEntity.class, str1_id);
StrTestEntity str2 = getEntityManager().find(StrTestEntity.class, str2_id);
- MapUniEntity rev1 = getVersionsReader().find(MapUniEntity.class, coll1_id, 1);
- MapUniEntity rev2 = getVersionsReader().find(MapUniEntity.class, coll1_id, 2);
- MapUniEntity rev3 = getVersionsReader().find(MapUniEntity.class, coll1_id, 3);
- MapUniEntity rev4 = getVersionsReader().find(MapUniEntity.class, coll1_id, 4);
+ MapUniEntity rev1 = getAuditReader().find(MapUniEntity.class, coll1_id, 1);
+ MapUniEntity rev2 = getAuditReader().find(MapUniEntity.class, coll1_id, 2);
+ MapUniEntity rev3 = getAuditReader().find(MapUniEntity.class, coll1_id, 3);
+ MapUniEntity rev4 = getAuditReader().find(MapUniEntity.class, coll1_id, 4);
assert rev1.getMap().equals(TestTools.makeMap("1", str1));
assert rev2.getMap().equals(TestTools.makeMap("1", str1, "2",
str2));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/unidirectional/BasicUniSet.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/unidirectional/BasicUniSet.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/unidirectional/BasicUniSet.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -132,11 +132,11 @@
@Test
public void testRevisionsCounts() {
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, ed1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, ed2_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
ed1_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
ed2_id));
- assert Arrays.asList(1, 2, 3, 4,
5).equals(getVersionsReader().getRevisions(SetUniEntity.class, ing1_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(SetUniEntity.class, ing2_id));
+ assert Arrays.asList(1, 2, 3, 4,
5).equals(getAuditReader().getRevisions(SetUniEntity.class, ing1_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(SetUniEntity.class, ing2_id));
}
@Test
@@ -144,11 +144,11 @@
StrTestEntity ed1 = getEntityManager().find(StrTestEntity.class, ed1_id);
StrTestEntity ed2 = getEntityManager().find(StrTestEntity.class, ed2_id);
- SetUniEntity rev1 = getVersionsReader().find(SetUniEntity.class, ing1_id, 1);
- SetUniEntity rev2 = getVersionsReader().find(SetUniEntity.class, ing1_id, 2);
- SetUniEntity rev3 = getVersionsReader().find(SetUniEntity.class, ing1_id, 3);
- SetUniEntity rev4 = getVersionsReader().find(SetUniEntity.class, ing1_id, 4);
- SetUniEntity rev5 = getVersionsReader().find(SetUniEntity.class, ing1_id, 5);
+ SetUniEntity rev1 = getAuditReader().find(SetUniEntity.class, ing1_id, 1);
+ SetUniEntity rev2 = getAuditReader().find(SetUniEntity.class, ing1_id, 2);
+ SetUniEntity rev3 = getAuditReader().find(SetUniEntity.class, ing1_id, 3);
+ SetUniEntity rev4 = getAuditReader().find(SetUniEntity.class, ing1_id, 4);
+ SetUniEntity rev5 = getAuditReader().find(SetUniEntity.class, ing1_id, 5);
assert rev1.getReferences().equals(Collections.EMPTY_SET);
assert rev2.getReferences().equals(TestTools.makeSet(ed1));
@@ -162,11 +162,11 @@
StrTestEntity ed1 = getEntityManager().find(StrTestEntity.class, ed1_id);
StrTestEntity ed2 = getEntityManager().find(StrTestEntity.class, ed2_id);
- SetUniEntity rev1 = getVersionsReader().find(SetUniEntity.class, ing2_id, 1);
- SetUniEntity rev2 = getVersionsReader().find(SetUniEntity.class, ing2_id, 2);
- SetUniEntity rev3 = getVersionsReader().find(SetUniEntity.class, ing2_id, 3);
- SetUniEntity rev4 = getVersionsReader().find(SetUniEntity.class, ing2_id, 4);
- SetUniEntity rev5 = getVersionsReader().find(SetUniEntity.class, ing2_id, 5);
+ SetUniEntity rev1 = getAuditReader().find(SetUniEntity.class, ing2_id, 1);
+ SetUniEntity rev2 = getAuditReader().find(SetUniEntity.class, ing2_id, 2);
+ SetUniEntity rev3 = getAuditReader().find(SetUniEntity.class, ing2_id, 3);
+ SetUniEntity rev4 = getAuditReader().find(SetUniEntity.class, ing2_id, 4);
+ SetUniEntity rev5 = getAuditReader().find(SetUniEntity.class, ing2_id, 5);
assert rev1.getReferences().equals(Collections.EMPTY_SET);
assert rev2.getReferences().equals(TestTools.makeSet(ed1, ed2));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/BasicNaming.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/BasicNaming.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/BasicNaming.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -81,9 +81,9 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(NamingTestEntity1.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(NamingTestEntity1.class, id1));
- assert Arrays.asList(1,
3).equals(getVersionsReader().getRevisions(NamingTestEntity1.class, id2));
+ assert Arrays.asList(1,
3).equals(getAuditReader().getRevisions(NamingTestEntity1.class, id2));
}
@Test
@@ -91,9 +91,9 @@
NamingTestEntity1 ver1 = new NamingTestEntity1(id1, "data1");
NamingTestEntity1 ver2 = new NamingTestEntity1(id1, "data1'");
- assert getVersionsReader().find(NamingTestEntity1.class, id1, 1).equals(ver1);
- assert getVersionsReader().find(NamingTestEntity1.class, id1, 2).equals(ver2);
- assert getVersionsReader().find(NamingTestEntity1.class, id1, 3).equals(ver2);
+ assert getAuditReader().find(NamingTestEntity1.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(NamingTestEntity1.class, id1, 2).equals(ver2);
+ assert getAuditReader().find(NamingTestEntity1.class, id1, 3).equals(ver2);
}
@Test
@@ -101,9 +101,9 @@
NamingTestEntity1 ver1 = new NamingTestEntity1(id2, "data2");
NamingTestEntity1 ver2 = new NamingTestEntity1(id2, "data2'");
- assert getVersionsReader().find(NamingTestEntity1.class, id2, 1).equals(ver1);
- assert getVersionsReader().find(NamingTestEntity1.class, id2, 2).equals(ver1);
- assert getVersionsReader().find(NamingTestEntity1.class, id2, 3).equals(ver2);
+ assert getAuditReader().find(NamingTestEntity1.class, id2, 1).equals(ver1);
+ assert getAuditReader().find(NamingTestEntity1.class, id2, 2).equals(ver1);
+ assert getAuditReader().find(NamingTestEntity1.class, id2, 3).equals(ver2);
}
@Test
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/JoinNaming.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/JoinNaming.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/JoinNaming.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -84,25 +84,25 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(JoinNamingRefEdEntity.class, ed_id1));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(JoinNamingRefEdEntity.class, ed_id2));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(JoinNamingRefIngEntity.class, ing_id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(JoinNamingRefEdEntity.class, ed_id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(JoinNamingRefEdEntity.class, ed_id2));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(JoinNamingRefIngEntity.class, ing_id1));
}
@Test
public void testHistoryOfEdId1() {
JoinNamingRefEdEntity ver1 = new JoinNamingRefEdEntity(ed_id1,
"data1");
- assert getVersionsReader().find(JoinNamingRefEdEntity.class, ed_id1,
1).equals(ver1);
- assert getVersionsReader().find(JoinNamingRefEdEntity.class, ed_id1,
2).equals(ver1);
+ assert getAuditReader().find(JoinNamingRefEdEntity.class, ed_id1,
1).equals(ver1);
+ assert getAuditReader().find(JoinNamingRefEdEntity.class, ed_id1,
2).equals(ver1);
}
@Test
public void testHistoryOfEdId2() {
JoinNamingRefEdEntity ver1 = new JoinNamingRefEdEntity(ed_id2,
"data2");
- assert getVersionsReader().find(JoinNamingRefEdEntity.class, ed_id2,
1).equals(ver1);
- assert getVersionsReader().find(JoinNamingRefEdEntity.class, ed_id2,
2).equals(ver1);
+ assert getAuditReader().find(JoinNamingRefEdEntity.class, ed_id2,
1).equals(ver1);
+ assert getAuditReader().find(JoinNamingRefEdEntity.class, ed_id2,
2).equals(ver1);
}
@Test
@@ -110,12 +110,12 @@
JoinNamingRefIngEntity ver1 = new JoinNamingRefIngEntity(ing_id1, "x",
null);
JoinNamingRefIngEntity ver2 = new JoinNamingRefIngEntity(ing_id1, "y",
null);
- assert getVersionsReader().find(JoinNamingRefIngEntity.class, ing_id1,
1).equals(ver1);
- assert getVersionsReader().find(JoinNamingRefIngEntity.class, ing_id1,
2).equals(ver2);
+ assert getAuditReader().find(JoinNamingRefIngEntity.class, ing_id1,
1).equals(ver1);
+ assert getAuditReader().find(JoinNamingRefIngEntity.class, ing_id1,
2).equals(ver2);
- assert getVersionsReader().find(JoinNamingRefIngEntity.class, ing_id1,
1).getReference().equals(
+ assert getAuditReader().find(JoinNamingRefIngEntity.class, ing_id1,
1).getReference().equals(
new JoinNamingRefEdEntity(ed_id1, "data1"));
- assert getVersionsReader().find(JoinNamingRefIngEntity.class, ing_id1,
2).getReference().equals(
+ assert getAuditReader().find(JoinNamingRefIngEntity.class, ing_id1,
2).getReference().equals(
new JoinNamingRefEdEntity(ed_id2, "data2"));
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/OneToManyUnidirectionalNaming.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/OneToManyUnidirectionalNaming.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/OneToManyUnidirectionalNaming.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -81,16 +81,16 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(DetachedNamingTestEntity.class, uni1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, str1_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(DetachedNamingTestEntity.class, uni1_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
str1_id));
}
@Test
public void testHistoryOfUniId1() {
StrTestEntity str1 = getEntityManager().find(StrTestEntity.class, str1_id);
- DetachedNamingTestEntity rev1 =
getVersionsReader().find(DetachedNamingTestEntity.class, uni1_id, 1);
- DetachedNamingTestEntity rev2 =
getVersionsReader().find(DetachedNamingTestEntity.class, uni1_id, 2);
+ DetachedNamingTestEntity rev1 =
getAuditReader().find(DetachedNamingTestEntity.class, uni1_id, 1);
+ DetachedNamingTestEntity rev2 =
getAuditReader().find(DetachedNamingTestEntity.class, uni1_id, 2);
assert rev1.getCollection().equals(TestTools.makeSet());
assert rev2.getCollection().equals(TestTools.makeSet(str1));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/VersionsJoinTableNaming.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/VersionsJoinTableNaming.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/VersionsJoinTableNaming.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -81,16 +81,16 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(VersionsJoinTableTestEntity.class, uni1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, str1_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(VersionsJoinTableTestEntity.class, uni1_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
str1_id));
}
@Test
public void testHistoryOfUniId1() {
StrTestEntity str1 = getEntityManager().find(StrTestEntity.class, str1_id);
- VersionsJoinTableTestEntity rev1 =
getVersionsReader().find(VersionsJoinTableTestEntity.class, uni1_id, 1);
- VersionsJoinTableTestEntity rev2 =
getVersionsReader().find(VersionsJoinTableTestEntity.class, uni1_id, 2);
+ VersionsJoinTableTestEntity rev1 =
getAuditReader().find(VersionsJoinTableTestEntity.class, uni1_id, 1);
+ VersionsJoinTableTestEntity rev2 =
getAuditReader().find(VersionsJoinTableTestEntity.class, uni1_id, 2);
assert rev1.getCollection().equals(TestTools.makeSet());
assert rev2.getCollection().equals(TestTools.makeSet(str1));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/ids/JoinEmbIdNaming.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/ids/JoinEmbIdNaming.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/ids/JoinEmbIdNaming.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -82,25 +82,25 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(JoinEmbIdNamingRefEdEntity.class, ed_id1));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(JoinEmbIdNamingRefEdEntity.class, ed_id2));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(JoinEmbIdNamingRefIngEntity.class, ing_id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(JoinEmbIdNamingRefEdEntity.class, ed_id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(JoinEmbIdNamingRefEdEntity.class, ed_id2));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(JoinEmbIdNamingRefIngEntity.class, ing_id1));
}
@Test
public void testHistoryOfEdId1() {
JoinEmbIdNamingRefEdEntity ver1 = new JoinEmbIdNamingRefEdEntity(ed_id1,
"data1");
- assert getVersionsReader().find(JoinEmbIdNamingRefEdEntity.class, ed_id1,
1).equals(ver1);
- assert getVersionsReader().find(JoinEmbIdNamingRefEdEntity.class, ed_id1,
2).equals(ver1);
+ assert getAuditReader().find(JoinEmbIdNamingRefEdEntity.class, ed_id1,
1).equals(ver1);
+ assert getAuditReader().find(JoinEmbIdNamingRefEdEntity.class, ed_id1,
2).equals(ver1);
}
@Test
public void testHistoryOfEdId2() {
JoinEmbIdNamingRefEdEntity ver1 = new JoinEmbIdNamingRefEdEntity(ed_id2,
"data2");
- assert getVersionsReader().find(JoinEmbIdNamingRefEdEntity.class, ed_id2,
1).equals(ver1);
- assert getVersionsReader().find(JoinEmbIdNamingRefEdEntity.class, ed_id2,
2).equals(ver1);
+ assert getAuditReader().find(JoinEmbIdNamingRefEdEntity.class, ed_id2,
1).equals(ver1);
+ assert getAuditReader().find(JoinEmbIdNamingRefEdEntity.class, ed_id2,
2).equals(ver1);
}
@Test
@@ -108,12 +108,12 @@
JoinEmbIdNamingRefIngEntity ver1 = new JoinEmbIdNamingRefIngEntity(ing_id1,
"x", null);
JoinEmbIdNamingRefIngEntity ver2 = new JoinEmbIdNamingRefIngEntity(ing_id1,
"y", null);
- assert getVersionsReader().find(JoinEmbIdNamingRefIngEntity.class, ing_id1,
1).equals(ver1);
- assert getVersionsReader().find(JoinEmbIdNamingRefIngEntity.class, ing_id1,
2).equals(ver2);
+ assert getAuditReader().find(JoinEmbIdNamingRefIngEntity.class, ing_id1,
1).equals(ver1);
+ assert getAuditReader().find(JoinEmbIdNamingRefIngEntity.class, ing_id1,
2).equals(ver2);
- assert getVersionsReader().find(JoinEmbIdNamingRefIngEntity.class, ing_id1,
1).getReference().equals(
+ assert getAuditReader().find(JoinEmbIdNamingRefIngEntity.class, ing_id1,
1).getReference().equals(
new JoinEmbIdNamingRefEdEntity(ed_id1, "data1"));
- assert getVersionsReader().find(JoinEmbIdNamingRefIngEntity.class, ing_id1,
2).getReference().equals(
+ assert getAuditReader().find(JoinEmbIdNamingRefIngEntity.class, ing_id1,
2).getReference().equals(
new JoinEmbIdNamingRefEdEntity(ed_id2, "data2"));
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/ids/JoinMulIdNaming.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/ids/JoinMulIdNaming.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/naming/ids/JoinMulIdNaming.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -82,25 +82,25 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(JoinMulIdNamingRefEdEntity.class, ed_id1));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(JoinMulIdNamingRefEdEntity.class, ed_id2));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(JoinMulIdNamingRefIngEntity.class, ing_id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(JoinMulIdNamingRefEdEntity.class, ed_id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(JoinMulIdNamingRefEdEntity.class, ed_id2));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(JoinMulIdNamingRefIngEntity.class, ing_id1));
}
@Test
public void testHistoryOfEdId1() {
JoinMulIdNamingRefEdEntity ver1 = new JoinMulIdNamingRefEdEntity(ed_id1,
"data1");
- assert getVersionsReader().find(JoinMulIdNamingRefEdEntity.class, ed_id1,
1).equals(ver1);
- assert getVersionsReader().find(JoinMulIdNamingRefEdEntity.class, ed_id1,
2).equals(ver1);
+ assert getAuditReader().find(JoinMulIdNamingRefEdEntity.class, ed_id1,
1).equals(ver1);
+ assert getAuditReader().find(JoinMulIdNamingRefEdEntity.class, ed_id1,
2).equals(ver1);
}
@Test
public void testHistoryOfEdId2() {
JoinMulIdNamingRefEdEntity ver1 = new JoinMulIdNamingRefEdEntity(ed_id2,
"data2");
- assert getVersionsReader().find(JoinMulIdNamingRefEdEntity.class, ed_id2,
1).equals(ver1);
- assert getVersionsReader().find(JoinMulIdNamingRefEdEntity.class, ed_id2,
2).equals(ver1);
+ assert getAuditReader().find(JoinMulIdNamingRefEdEntity.class, ed_id2,
1).equals(ver1);
+ assert getAuditReader().find(JoinMulIdNamingRefEdEntity.class, ed_id2,
2).equals(ver1);
}
@Test
@@ -108,12 +108,12 @@
JoinMulIdNamingRefIngEntity ver1 = new JoinMulIdNamingRefIngEntity(ing_id1,
"x", null);
JoinMulIdNamingRefIngEntity ver2 = new JoinMulIdNamingRefIngEntity(ing_id1,
"y", null);
- assert getVersionsReader().find(JoinMulIdNamingRefIngEntity.class, ing_id1,
1).equals(ver1);
- assert getVersionsReader().find(JoinMulIdNamingRefIngEntity.class, ing_id1,
2).equals(ver2);
+ assert getAuditReader().find(JoinMulIdNamingRefIngEntity.class, ing_id1,
1).equals(ver1);
+ assert getAuditReader().find(JoinMulIdNamingRefIngEntity.class, ing_id1,
2).equals(ver2);
- assert getVersionsReader().find(JoinMulIdNamingRefIngEntity.class, ing_id1,
1).getReference().equals(
+ assert getAuditReader().find(JoinMulIdNamingRefIngEntity.class, ing_id1,
1).getReference().equals(
new JoinMulIdNamingRefEdEntity(ed_id1, "data1"));
- assert getVersionsReader().find(JoinMulIdNamingRefIngEntity.class, ing_id1,
2).getReference().equals(
+ assert getAuditReader().find(JoinMulIdNamingRefIngEntity.class, ing_id1,
2).getReference().equals(
new JoinMulIdNamingRefEdEntity(ed_id2, "data2"));
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/notinsertable/NotInsertable.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/notinsertable/NotInsertable.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/notinsertable/NotInsertable.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -59,7 +59,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(NotInsertableTestEntity.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(NotInsertableTestEntity.class, id1));
}
@Test
@@ -67,7 +67,7 @@
NotInsertableTestEntity ver1 = new NotInsertableTestEntity(id1,
"data1", "data1");
NotInsertableTestEntity ver2 = new NotInsertableTestEntity(id1,
"data2", "data2");
- assert getVersionsReader().find(NotInsertableTestEntity.class, id1,
1).equals(ver1);
- assert getVersionsReader().find(NotInsertableTestEntity.class, id1,
2).equals(ver2);
+ assert getAuditReader().find(NotInsertableTestEntity.class, id1,
1).equals(ver1);
+ assert getAuditReader().find(NotInsertableTestEntity.class, id1,
2).equals(ver2);
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicCollection.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicCollection.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicCollection.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -104,11 +104,11 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(CollectionRefEdEntity.class, ed1_id));
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(CollectionRefEdEntity.class, ed2_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(CollectionRefEdEntity.class, ed1_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(CollectionRefEdEntity.class, ed2_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(CollectionRefIngEntity.class, ing1_id));
- assert Arrays.asList(1,
3).equals(getVersionsReader().getRevisions(CollectionRefIngEntity.class, ing2_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(CollectionRefIngEntity.class, ing1_id));
+ assert Arrays.asList(1,
3).equals(getAuditReader().getRevisions(CollectionRefIngEntity.class, ing2_id));
}
private <T> Set<T> makeSet(T... objects) {
@@ -123,9 +123,9 @@
CollectionRefIngEntity ing1 =
getEntityManager().find(CollectionRefIngEntity.class, ing1_id);
CollectionRefIngEntity ing2 =
getEntityManager().find(CollectionRefIngEntity.class, ing2_id);
- CollectionRefEdEntity rev1 =
getVersionsReader().find(CollectionRefEdEntity.class, ed1_id, 1);
- CollectionRefEdEntity rev2 =
getVersionsReader().find(CollectionRefEdEntity.class, ed1_id, 2);
- CollectionRefEdEntity rev3 =
getVersionsReader().find(CollectionRefEdEntity.class, ed1_id, 3);
+ CollectionRefEdEntity rev1 = getAuditReader().find(CollectionRefEdEntity.class,
ed1_id, 1);
+ CollectionRefEdEntity rev2 = getAuditReader().find(CollectionRefEdEntity.class,
ed1_id, 2);
+ CollectionRefEdEntity rev3 = getAuditReader().find(CollectionRefEdEntity.class,
ed1_id, 3);
assert rev1.getReffering().containsAll(makeSet(ing1, ing2));
assert rev1.getReffering().size() == 2;
@@ -142,9 +142,9 @@
CollectionRefIngEntity ing1 =
getEntityManager().find(CollectionRefIngEntity.class, ing1_id);
CollectionRefIngEntity ing2 =
getEntityManager().find(CollectionRefIngEntity.class, ing2_id);
- CollectionRefEdEntity rev1 =
getVersionsReader().find(CollectionRefEdEntity.class, ed2_id, 1);
- CollectionRefEdEntity rev2 =
getVersionsReader().find(CollectionRefEdEntity.class, ed2_id, 2);
- CollectionRefEdEntity rev3 =
getVersionsReader().find(CollectionRefEdEntity.class, ed2_id, 3);
+ CollectionRefEdEntity rev1 = getAuditReader().find(CollectionRefEdEntity.class,
ed2_id, 1);
+ CollectionRefEdEntity rev2 = getAuditReader().find(CollectionRefEdEntity.class,
ed2_id, 2);
+ CollectionRefEdEntity rev3 = getAuditReader().find(CollectionRefEdEntity.class,
ed2_id, 3);
assert rev1.getReffering().containsAll(Collections.EMPTY_SET);
assert rev1.getReffering().size() == 0;
@@ -162,9 +162,9 @@
CollectionRefEdEntity ed1 = getEntityManager().find(CollectionRefEdEntity.class,
ed1_id);
CollectionRefEdEntity ed2 = getEntityManager().find(CollectionRefEdEntity.class,
ed2_id);
- CollectionRefIngEntity rev1 =
getVersionsReader().find(CollectionRefIngEntity.class, ing1_id, 1);
- CollectionRefIngEntity rev2 =
getVersionsReader().find(CollectionRefIngEntity.class, ing1_id, 2);
- CollectionRefIngEntity rev3 =
getVersionsReader().find(CollectionRefIngEntity.class, ing1_id, 3);
+ CollectionRefIngEntity rev1 = getAuditReader().find(CollectionRefIngEntity.class,
ing1_id, 1);
+ CollectionRefIngEntity rev2 = getAuditReader().find(CollectionRefIngEntity.class,
ing1_id, 2);
+ CollectionRefIngEntity rev3 = getAuditReader().find(CollectionRefIngEntity.class,
ing1_id, 3);
assert rev1.getReference().equals(ed1);
assert rev2.getReference().equals(ed2);
@@ -176,9 +176,9 @@
CollectionRefEdEntity ed1 = getEntityManager().find(CollectionRefEdEntity.class,
ed1_id);
CollectionRefEdEntity ed2 = getEntityManager().find(CollectionRefEdEntity.class,
ed2_id);
- CollectionRefIngEntity rev1 =
getVersionsReader().find(CollectionRefIngEntity.class, ing2_id, 1);
- CollectionRefIngEntity rev2 =
getVersionsReader().find(CollectionRefIngEntity.class, ing2_id, 2);
- CollectionRefIngEntity rev3 =
getVersionsReader().find(CollectionRefIngEntity.class, ing2_id, 3);
+ CollectionRefIngEntity rev1 = getAuditReader().find(CollectionRefIngEntity.class,
ing2_id, 1);
+ CollectionRefIngEntity rev2 = getAuditReader().find(CollectionRefIngEntity.class,
ing2_id, 2);
+ CollectionRefIngEntity rev3 = getAuditReader().find(CollectionRefIngEntity.class,
ing2_id, 3);
assert rev1.getReference().equals(ed1);
assert rev2.getReference().equals(ed1);
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicList.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicList.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicList.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -102,20 +102,20 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(ListRefEdEntity.class, ed1_id));
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(ListRefEdEntity.class, ed2_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(ListRefEdEntity.class, ed1_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(ListRefEdEntity.class, ed2_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(ListRefIngEntity.class, ing1_id));
- assert Arrays.asList(1,
3).equals(getVersionsReader().getRevisions(ListRefIngEntity.class, ing2_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(ListRefIngEntity.class, ing1_id));
+ assert Arrays.asList(1,
3).equals(getAuditReader().getRevisions(ListRefIngEntity.class, ing2_id));
}
@Test
public void testHistoryOfEdId1() {
ListRefIngEntity ing1 = getEntityManager().find(ListRefIngEntity.class,
ing1_id);
ListRefIngEntity ing2 = getEntityManager().find(ListRefIngEntity.class,
ing2_id);
- ListRefEdEntity rev1 = getVersionsReader().find(ListRefEdEntity.class, ed1_id,
1);
- ListRefEdEntity rev2 = getVersionsReader().find(ListRefEdEntity.class, ed1_id,
2);
- ListRefEdEntity rev3 = getVersionsReader().find(ListRefEdEntity.class, ed1_id,
3);
+ ListRefEdEntity rev1 = getAuditReader().find(ListRefEdEntity.class, ed1_id, 1);
+ ListRefEdEntity rev2 = getAuditReader().find(ListRefEdEntity.class, ed1_id, 2);
+ ListRefEdEntity rev3 = getAuditReader().find(ListRefEdEntity.class, ed1_id, 3);
assert TestTools.checkList(rev1.getReffering(), ing1, ing2);
assert TestTools.checkList(rev2.getReffering(), ing2);
@@ -127,9 +127,9 @@
ListRefIngEntity ing1 = getEntityManager().find(ListRefIngEntity.class,
ing1_id);
ListRefIngEntity ing2 = getEntityManager().find(ListRefIngEntity.class,
ing2_id);
- ListRefEdEntity rev1 = getVersionsReader().find(ListRefEdEntity.class, ed2_id,
1);
- ListRefEdEntity rev2 = getVersionsReader().find(ListRefEdEntity.class, ed2_id,
2);
- ListRefEdEntity rev3 = getVersionsReader().find(ListRefEdEntity.class, ed2_id,
3);
+ ListRefEdEntity rev1 = getAuditReader().find(ListRefEdEntity.class, ed2_id, 1);
+ ListRefEdEntity rev2 = getAuditReader().find(ListRefEdEntity.class, ed2_id, 2);
+ ListRefEdEntity rev3 = getAuditReader().find(ListRefEdEntity.class, ed2_id, 3);
assert TestTools.checkList(rev1.getReffering());
assert TestTools.checkList(rev2.getReffering(), ing1);
@@ -141,9 +141,9 @@
ListRefEdEntity ed1 = getEntityManager().find(ListRefEdEntity.class, ed1_id);
ListRefEdEntity ed2 = getEntityManager().find(ListRefEdEntity.class, ed2_id);
- ListRefIngEntity rev1 = getVersionsReader().find(ListRefIngEntity.class, ing1_id,
1);
- ListRefIngEntity rev2 = getVersionsReader().find(ListRefIngEntity.class, ing1_id,
2);
- ListRefIngEntity rev3 = getVersionsReader().find(ListRefIngEntity.class, ing1_id,
3);
+ ListRefIngEntity rev1 = getAuditReader().find(ListRefIngEntity.class, ing1_id,
1);
+ ListRefIngEntity rev2 = getAuditReader().find(ListRefIngEntity.class, ing1_id,
2);
+ ListRefIngEntity rev3 = getAuditReader().find(ListRefIngEntity.class, ing1_id,
3);
assert rev1.getReference().equals(ed1);
assert rev2.getReference().equals(ed2);
@@ -155,9 +155,9 @@
ListRefEdEntity ed1 = getEntityManager().find(ListRefEdEntity.class, ed1_id);
ListRefEdEntity ed2 = getEntityManager().find(ListRefEdEntity.class, ed2_id);
- ListRefIngEntity rev1 = getVersionsReader().find(ListRefIngEntity.class, ing2_id,
1);
- ListRefIngEntity rev2 = getVersionsReader().find(ListRefIngEntity.class, ing2_id,
2);
- ListRefIngEntity rev3 = getVersionsReader().find(ListRefIngEntity.class, ing2_id,
3);
+ ListRefIngEntity rev1 = getAuditReader().find(ListRefIngEntity.class, ing2_id,
1);
+ ListRefIngEntity rev2 = getAuditReader().find(ListRefIngEntity.class, ing2_id,
2);
+ ListRefIngEntity rev3 = getAuditReader().find(ListRefIngEntity.class, ing2_id,
3);
assert rev1.getReference().equals(ed1);
assert rev2.getReference().equals(ed1);
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicSet.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicSet.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicSet.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -114,11 +114,11 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2, 3,
4).equals(getVersionsReader().getRevisions(SetRefEdEntity.class, ed1_id));
- assert Arrays.asList(1, 3,
4).equals(getVersionsReader().getRevisions(SetRefEdEntity.class, ed2_id));
+ assert Arrays.asList(1, 2, 3,
4).equals(getAuditReader().getRevisions(SetRefEdEntity.class, ed1_id));
+ assert Arrays.asList(1, 3,
4).equals(getAuditReader().getRevisions(SetRefEdEntity.class, ed2_id));
- assert Arrays.asList(2,
3).equals(getVersionsReader().getRevisions(SetRefIngEntity.class, ing1_id));
- assert Arrays.asList(2,
4).equals(getVersionsReader().getRevisions(SetRefIngEntity.class, ing2_id));
+ assert Arrays.asList(2,
3).equals(getAuditReader().getRevisions(SetRefIngEntity.class, ing1_id));
+ assert Arrays.asList(2,
4).equals(getAuditReader().getRevisions(SetRefIngEntity.class, ing2_id));
}
@Test
@@ -126,10 +126,10 @@
SetRefIngEntity ing1 = getEntityManager().find(SetRefIngEntity.class, ing1_id);
SetRefIngEntity ing2 = getEntityManager().find(SetRefIngEntity.class, ing2_id);
- SetRefEdEntity rev1 = getVersionsReader().find(SetRefEdEntity.class, ed1_id, 1);
- SetRefEdEntity rev2 = getVersionsReader().find(SetRefEdEntity.class, ed1_id, 2);
- SetRefEdEntity rev3 = getVersionsReader().find(SetRefEdEntity.class, ed1_id, 3);
- SetRefEdEntity rev4 = getVersionsReader().find(SetRefEdEntity.class, ed1_id, 4);
+ SetRefEdEntity rev1 = getAuditReader().find(SetRefEdEntity.class, ed1_id, 1);
+ SetRefEdEntity rev2 = getAuditReader().find(SetRefEdEntity.class, ed1_id, 2);
+ SetRefEdEntity rev3 = getAuditReader().find(SetRefEdEntity.class, ed1_id, 3);
+ SetRefEdEntity rev4 = getAuditReader().find(SetRefEdEntity.class, ed1_id, 4);
assert rev1.getReffering().equals(Collections.EMPTY_SET);
assert rev2.getReffering().equals(TestTools.makeSet(ing1, ing2));
@@ -142,10 +142,10 @@
SetRefIngEntity ing1 = getEntityManager().find(SetRefIngEntity.class, ing1_id);
SetRefIngEntity ing2 = getEntityManager().find(SetRefIngEntity.class, ing2_id);
- SetRefEdEntity rev1 = getVersionsReader().find(SetRefEdEntity.class, ed2_id, 1);
- SetRefEdEntity rev2 = getVersionsReader().find(SetRefEdEntity.class, ed2_id, 2);
- SetRefEdEntity rev3 = getVersionsReader().find(SetRefEdEntity.class, ed2_id, 3);
- SetRefEdEntity rev4 = getVersionsReader().find(SetRefEdEntity.class, ed2_id, 4);
+ SetRefEdEntity rev1 = getAuditReader().find(SetRefEdEntity.class, ed2_id, 1);
+ SetRefEdEntity rev2 = getAuditReader().find(SetRefEdEntity.class, ed2_id, 2);
+ SetRefEdEntity rev3 = getAuditReader().find(SetRefEdEntity.class, ed2_id, 3);
+ SetRefEdEntity rev4 = getAuditReader().find(SetRefEdEntity.class, ed2_id, 4);
assert rev1.getReffering().equals(Collections.EMPTY_SET);
assert rev2.getReffering().equals(Collections.EMPTY_SET);
@@ -158,10 +158,10 @@
SetRefEdEntity ed1 = getEntityManager().find(SetRefEdEntity.class, ed1_id);
SetRefEdEntity ed2 = getEntityManager().find(SetRefEdEntity.class, ed2_id);
- SetRefIngEntity rev1 = getVersionsReader().find(SetRefIngEntity.class, ing1_id,
1);
- SetRefIngEntity rev2 = getVersionsReader().find(SetRefIngEntity.class, ing1_id,
2);
- SetRefIngEntity rev3 = getVersionsReader().find(SetRefIngEntity.class, ing1_id,
3);
- SetRefIngEntity rev4 = getVersionsReader().find(SetRefIngEntity.class, ing1_id,
4);
+ SetRefIngEntity rev1 = getAuditReader().find(SetRefIngEntity.class, ing1_id, 1);
+ SetRefIngEntity rev2 = getAuditReader().find(SetRefIngEntity.class, ing1_id, 2);
+ SetRefIngEntity rev3 = getAuditReader().find(SetRefIngEntity.class, ing1_id, 3);
+ SetRefIngEntity rev4 = getAuditReader().find(SetRefIngEntity.class, ing1_id, 4);
assert rev1 == null;
assert rev2.getReference().equals(ed1);
@@ -174,10 +174,10 @@
SetRefEdEntity ed1 = getEntityManager().find(SetRefEdEntity.class, ed1_id);
SetRefEdEntity ed2 = getEntityManager().find(SetRefEdEntity.class, ed2_id);
- SetRefIngEntity rev1 = getVersionsReader().find(SetRefIngEntity.class, ing2_id,
1);
- SetRefIngEntity rev2 = getVersionsReader().find(SetRefIngEntity.class, ing2_id,
2);
- SetRefIngEntity rev3 = getVersionsReader().find(SetRefIngEntity.class, ing2_id,
3);
- SetRefIngEntity rev4 = getVersionsReader().find(SetRefIngEntity.class, ing2_id,
4);
+ SetRefIngEntity rev1 = getAuditReader().find(SetRefIngEntity.class, ing2_id, 1);
+ SetRefIngEntity rev2 = getAuditReader().find(SetRefIngEntity.class, ing2_id, 2);
+ SetRefIngEntity rev3 = getAuditReader().find(SetRefIngEntity.class, ing2_id, 3);
+ SetRefIngEntity rev4 = getAuditReader().find(SetRefIngEntity.class, ing2_id, 4);
assert rev1 == null;
assert rev2.getReference().equals(ed1);
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicSetWithEmbId.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicSetWithEmbId.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicSetWithEmbId.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -103,11 +103,11 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(SetRefEdEmbIdEntity.class, ed1_id));
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(SetRefEdEmbIdEntity.class, ed2_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(SetRefEdEmbIdEntity.class, ed1_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(SetRefEdEmbIdEntity.class, ed2_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(SetRefIngEmbIdEntity.class, ing1_id));
- assert Arrays.asList(1,
3).equals(getVersionsReader().getRevisions(SetRefIngEmbIdEntity.class, ing2_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(SetRefIngEmbIdEntity.class, ing1_id));
+ assert Arrays.asList(1,
3).equals(getAuditReader().getRevisions(SetRefIngEmbIdEntity.class, ing2_id));
}
private <T> Set<T> makeSet(T... objects) {
@@ -122,9 +122,9 @@
SetRefIngEmbIdEntity ing1 = getEntityManager().find(SetRefIngEmbIdEntity.class,
ing1_id);
SetRefIngEmbIdEntity ing2 = getEntityManager().find(SetRefIngEmbIdEntity.class,
ing2_id);
- SetRefEdEmbIdEntity rev1 = getVersionsReader().find(SetRefEdEmbIdEntity.class,
ed1_id, 1);
- SetRefEdEmbIdEntity rev2 = getVersionsReader().find(SetRefEdEmbIdEntity.class,
ed1_id, 2);
- SetRefEdEmbIdEntity rev3 = getVersionsReader().find(SetRefEdEmbIdEntity.class,
ed1_id, 3);
+ SetRefEdEmbIdEntity rev1 = getAuditReader().find(SetRefEdEmbIdEntity.class,
ed1_id, 1);
+ SetRefEdEmbIdEntity rev2 = getAuditReader().find(SetRefEdEmbIdEntity.class,
ed1_id, 2);
+ SetRefEdEmbIdEntity rev3 = getAuditReader().find(SetRefEdEmbIdEntity.class,
ed1_id, 3);
assert rev1.getReffering().equals(makeSet(ing1, ing2));
assert rev2.getReffering().equals(makeSet(ing2));
@@ -136,9 +136,9 @@
SetRefIngEmbIdEntity ing1 = getEntityManager().find(SetRefIngEmbIdEntity.class,
ing1_id);
SetRefIngEmbIdEntity ing2 = getEntityManager().find(SetRefIngEmbIdEntity.class,
ing2_id);
- SetRefEdEmbIdEntity rev1 = getVersionsReader().find(SetRefEdEmbIdEntity.class,
ed2_id, 1);
- SetRefEdEmbIdEntity rev2 = getVersionsReader().find(SetRefEdEmbIdEntity.class,
ed2_id, 2);
- SetRefEdEmbIdEntity rev3 = getVersionsReader().find(SetRefEdEmbIdEntity.class,
ed2_id, 3);
+ SetRefEdEmbIdEntity rev1 = getAuditReader().find(SetRefEdEmbIdEntity.class,
ed2_id, 1);
+ SetRefEdEmbIdEntity rev2 = getAuditReader().find(SetRefEdEmbIdEntity.class,
ed2_id, 2);
+ SetRefEdEmbIdEntity rev3 = getAuditReader().find(SetRefEdEmbIdEntity.class,
ed2_id, 3);
assert rev1.getReffering().equals(Collections.EMPTY_SET);
assert rev2.getReffering().equals(makeSet(ing1));
@@ -150,9 +150,9 @@
SetRefEdEmbIdEntity ed1 = getEntityManager().find(SetRefEdEmbIdEntity.class,
ed1_id);
SetRefEdEmbIdEntity ed2 = getEntityManager().find(SetRefEdEmbIdEntity.class,
ed2_id);
- SetRefIngEmbIdEntity rev1 = getVersionsReader().find(SetRefIngEmbIdEntity.class,
ing1_id, 1);
- SetRefIngEmbIdEntity rev2 = getVersionsReader().find(SetRefIngEmbIdEntity.class,
ing1_id, 2);
- SetRefIngEmbIdEntity rev3 = getVersionsReader().find(SetRefIngEmbIdEntity.class,
ing1_id, 3);
+ SetRefIngEmbIdEntity rev1 = getAuditReader().find(SetRefIngEmbIdEntity.class,
ing1_id, 1);
+ SetRefIngEmbIdEntity rev2 = getAuditReader().find(SetRefIngEmbIdEntity.class,
ing1_id, 2);
+ SetRefIngEmbIdEntity rev3 = getAuditReader().find(SetRefIngEmbIdEntity.class,
ing1_id, 3);
assert rev1.getReference().equals(ed1);
assert rev2.getReference().equals(ed2);
@@ -164,9 +164,9 @@
SetRefEdEmbIdEntity ed1 = getEntityManager().find(SetRefEdEmbIdEntity.class,
ed1_id);
SetRefEdEmbIdEntity ed2 = getEntityManager().find(SetRefEdEmbIdEntity.class,
ed2_id);
- SetRefIngEmbIdEntity rev1 = getVersionsReader().find(SetRefIngEmbIdEntity.class,
ing2_id, 1);
- SetRefIngEmbIdEntity rev2 = getVersionsReader().find(SetRefIngEmbIdEntity.class,
ing2_id, 2);
- SetRefIngEmbIdEntity rev3 = getVersionsReader().find(SetRefIngEmbIdEntity.class,
ing2_id, 3);
+ SetRefIngEmbIdEntity rev1 = getAuditReader().find(SetRefIngEmbIdEntity.class,
ing2_id, 1);
+ SetRefIngEmbIdEntity rev2 = getAuditReader().find(SetRefIngEmbIdEntity.class,
ing2_id, 2);
+ SetRefIngEmbIdEntity rev3 = getAuditReader().find(SetRefIngEmbIdEntity.class,
ing2_id, 3);
assert rev1.getReference().equals(ed1);
assert rev2.getReference().equals(ed1);
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicSetWithMulId.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicSetWithMulId.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicSetWithMulId.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -103,11 +103,11 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(SetRefEdMulIdEntity.class, ed1_id));
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(SetRefEdMulIdEntity.class, ed2_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(SetRefEdMulIdEntity.class, ed1_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(SetRefEdMulIdEntity.class, ed2_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(SetRefIngMulIdEntity.class, ing1_id));
- assert Arrays.asList(1,
3).equals(getVersionsReader().getRevisions(SetRefIngMulIdEntity.class, ing2_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(SetRefIngMulIdEntity.class, ing1_id));
+ assert Arrays.asList(1,
3).equals(getAuditReader().getRevisions(SetRefIngMulIdEntity.class, ing2_id));
}
private <T> Set<T> makeSet(T... objects) {
@@ -122,9 +122,9 @@
SetRefIngMulIdEntity ing1 = getEntityManager().find(SetRefIngMulIdEntity.class,
ing1_id);
SetRefIngMulIdEntity ing2 = getEntityManager().find(SetRefIngMulIdEntity.class,
ing2_id);
- SetRefEdMulIdEntity rev1 = getVersionsReader().find(SetRefEdMulIdEntity.class,
ed1_id, 1);
- SetRefEdMulIdEntity rev2 = getVersionsReader().find(SetRefEdMulIdEntity.class,
ed1_id, 2);
- SetRefEdMulIdEntity rev3 = getVersionsReader().find(SetRefEdMulIdEntity.class,
ed1_id, 3);
+ SetRefEdMulIdEntity rev1 = getAuditReader().find(SetRefEdMulIdEntity.class,
ed1_id, 1);
+ SetRefEdMulIdEntity rev2 = getAuditReader().find(SetRefEdMulIdEntity.class,
ed1_id, 2);
+ SetRefEdMulIdEntity rev3 = getAuditReader().find(SetRefEdMulIdEntity.class,
ed1_id, 3);
assert rev1.getReffering().equals(makeSet(ing1, ing2));
assert rev2.getReffering().equals(makeSet(ing2));
@@ -136,9 +136,9 @@
SetRefIngMulIdEntity ing1 = getEntityManager().find(SetRefIngMulIdEntity.class,
ing1_id);
SetRefIngMulIdEntity ing2 = getEntityManager().find(SetRefIngMulIdEntity.class,
ing2_id);
- SetRefEdMulIdEntity rev1 = getVersionsReader().find(SetRefEdMulIdEntity.class,
ed2_id, 1);
- SetRefEdMulIdEntity rev2 = getVersionsReader().find(SetRefEdMulIdEntity.class,
ed2_id, 2);
- SetRefEdMulIdEntity rev3 = getVersionsReader().find(SetRefEdMulIdEntity.class,
ed2_id, 3);
+ SetRefEdMulIdEntity rev1 = getAuditReader().find(SetRefEdMulIdEntity.class,
ed2_id, 1);
+ SetRefEdMulIdEntity rev2 = getAuditReader().find(SetRefEdMulIdEntity.class,
ed2_id, 2);
+ SetRefEdMulIdEntity rev3 = getAuditReader().find(SetRefEdMulIdEntity.class,
ed2_id, 3);
assert rev1.getReffering().equals(Collections.EMPTY_SET);
assert rev2.getReffering().equals(makeSet(ing1));
@@ -150,9 +150,9 @@
SetRefEdMulIdEntity ed1 = getEntityManager().find(SetRefEdMulIdEntity.class,
ed1_id);
SetRefEdMulIdEntity ed2 = getEntityManager().find(SetRefEdMulIdEntity.class,
ed2_id);
- SetRefIngMulIdEntity rev1 = getVersionsReader().find(SetRefIngMulIdEntity.class,
ing1_id, 1);
- SetRefIngMulIdEntity rev2 = getVersionsReader().find(SetRefIngMulIdEntity.class,
ing1_id, 2);
- SetRefIngMulIdEntity rev3 = getVersionsReader().find(SetRefIngMulIdEntity.class,
ing1_id, 3);
+ SetRefIngMulIdEntity rev1 = getAuditReader().find(SetRefIngMulIdEntity.class,
ing1_id, 1);
+ SetRefIngMulIdEntity rev2 = getAuditReader().find(SetRefIngMulIdEntity.class,
ing1_id, 2);
+ SetRefIngMulIdEntity rev3 = getAuditReader().find(SetRefIngMulIdEntity.class,
ing1_id, 3);
assert rev1.getReference().equals(ed1);
assert rev2.getReference().equals(ed2);
@@ -164,9 +164,9 @@
SetRefEdMulIdEntity ed1 = getEntityManager().find(SetRefEdMulIdEntity.class,
ed1_id);
SetRefEdMulIdEntity ed2 = getEntityManager().find(SetRefEdMulIdEntity.class,
ed2_id);
- SetRefIngMulIdEntity rev1 = getVersionsReader().find(SetRefIngMulIdEntity.class,
ing2_id, 1);
- SetRefIngMulIdEntity rev2 = getVersionsReader().find(SetRefIngMulIdEntity.class,
ing2_id, 2);
- SetRefIngMulIdEntity rev3 = getVersionsReader().find(SetRefIngMulIdEntity.class,
ing2_id, 3);
+ SetRefIngMulIdEntity rev1 = getAuditReader().find(SetRefIngMulIdEntity.class,
ing2_id, 1);
+ SetRefIngMulIdEntity rev2 = getAuditReader().find(SetRefIngMulIdEntity.class,
ing2_id, 2);
+ SetRefIngMulIdEntity rev3 = getAuditReader().find(SetRefIngMulIdEntity.class,
ing2_id, 3);
assert rev1.getReference().equals(ed1);
assert rev2.getReference().equals(ed1);
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicSetWithNullsDelete.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicSetWithNullsDelete.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BasicSetWithNullsDelete.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -127,13 +127,13 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2, 3, 4,
5).equals(getVersionsReader().getRevisions(SetRefEdEntity.class, ed1_id));
- assert Arrays.asList(1,
4).equals(getVersionsReader().getRevisions(SetRefEdEntity.class, ed2_id));
+ assert Arrays.asList(1, 2, 3, 4,
5).equals(getAuditReader().getRevisions(SetRefEdEntity.class, ed1_id));
+ assert Arrays.asList(1,
4).equals(getAuditReader().getRevisions(SetRefEdEntity.class, ed2_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(SetRefIngEntity.class, ing1_id));
- assert Arrays.asList(1,
3).equals(getVersionsReader().getRevisions(SetRefIngEntity.class, ing2_id));
- assert Arrays.asList(1,
4).equals(getVersionsReader().getRevisions(SetRefIngEntity.class, ing3_id));
- assert Arrays.asList(1,
5).equals(getVersionsReader().getRevisions(SetRefIngEntity.class, ing4_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(SetRefIngEntity.class, ing1_id));
+ assert Arrays.asList(1,
3).equals(getAuditReader().getRevisions(SetRefIngEntity.class, ing2_id));
+ assert Arrays.asList(1,
4).equals(getAuditReader().getRevisions(SetRefIngEntity.class, ing3_id));
+ assert Arrays.asList(1,
5).equals(getAuditReader().getRevisions(SetRefIngEntity.class, ing4_id));
}
private <T> Set<T> makeSet(T... objects) {
@@ -150,11 +150,11 @@
SetRefIngEntity ing3 = getEntityManager().find(SetRefIngEntity.class, ing3_id);
SetRefIngEntity ing4 = getEntityManager().find(SetRefIngEntity.class, ing4_id);
- SetRefEdEntity rev1 = getVersionsReader().find(SetRefEdEntity.class, ed1_id, 1);
- SetRefEdEntity rev2 = getVersionsReader().find(SetRefEdEntity.class, ed1_id, 2);
- SetRefEdEntity rev3 = getVersionsReader().find(SetRefEdEntity.class, ed1_id, 3);
- SetRefEdEntity rev4 = getVersionsReader().find(SetRefEdEntity.class, ed1_id, 4);
- SetRefEdEntity rev5 = getVersionsReader().find(SetRefEdEntity.class, ed1_id, 5);
+ SetRefEdEntity rev1 = getAuditReader().find(SetRefEdEntity.class, ed1_id, 1);
+ SetRefEdEntity rev2 = getAuditReader().find(SetRefEdEntity.class, ed1_id, 2);
+ SetRefEdEntity rev3 = getAuditReader().find(SetRefEdEntity.class, ed1_id, 3);
+ SetRefEdEntity rev4 = getAuditReader().find(SetRefEdEntity.class, ed1_id, 4);
+ SetRefEdEntity rev5 = getAuditReader().find(SetRefEdEntity.class, ed1_id, 5);
assert rev1.getReffering().equals(makeSet(ing1, ing2, ing3, ing4));
assert rev2.getReffering().equals(makeSet(ing2, ing3, ing4));
@@ -167,11 +167,11 @@
public void testHistoryOfEdId2() {
SetRefIngEntity ing3 = getEntityManager().find(SetRefIngEntity.class, ing3_id);
- SetRefEdEntity rev1 = getVersionsReader().find(SetRefEdEntity.class, ed2_id, 1);
- SetRefEdEntity rev2 = getVersionsReader().find(SetRefEdEntity.class, ed2_id, 2);
- SetRefEdEntity rev3 = getVersionsReader().find(SetRefEdEntity.class, ed2_id, 3);
- SetRefEdEntity rev4 = getVersionsReader().find(SetRefEdEntity.class, ed2_id, 4);
- SetRefEdEntity rev5 = getVersionsReader().find(SetRefEdEntity.class, ed2_id, 5);
+ SetRefEdEntity rev1 = getAuditReader().find(SetRefEdEntity.class, ed2_id, 1);
+ SetRefEdEntity rev2 = getAuditReader().find(SetRefEdEntity.class, ed2_id, 2);
+ SetRefEdEntity rev3 = getAuditReader().find(SetRefEdEntity.class, ed2_id, 3);
+ SetRefEdEntity rev4 = getAuditReader().find(SetRefEdEntity.class, ed2_id, 4);
+ SetRefEdEntity rev5 = getAuditReader().find(SetRefEdEntity.class, ed2_id, 5);
assert rev1.getReffering().equals(Collections.EMPTY_SET);
assert rev2.getReffering().equals(Collections.EMPTY_SET);
@@ -184,11 +184,11 @@
public void testHistoryOfEdIng1() {
SetRefEdEntity ed1 = new SetRefEdEntity(1, "data_ed_1");
- SetRefIngEntity rev1 = getVersionsReader().find(SetRefIngEntity.class, ing1_id,
1);
- SetRefIngEntity rev2 = getVersionsReader().find(SetRefIngEntity.class, ing1_id,
2);
- SetRefIngEntity rev3 = getVersionsReader().find(SetRefIngEntity.class, ing1_id,
3);
- SetRefIngEntity rev4 = getVersionsReader().find(SetRefIngEntity.class, ing1_id,
4);
- SetRefIngEntity rev5 = getVersionsReader().find(SetRefIngEntity.class, ing1_id,
5);
+ SetRefIngEntity rev1 = getAuditReader().find(SetRefIngEntity.class, ing1_id, 1);
+ SetRefIngEntity rev2 = getAuditReader().find(SetRefIngEntity.class, ing1_id, 2);
+ SetRefIngEntity rev3 = getAuditReader().find(SetRefIngEntity.class, ing1_id, 3);
+ SetRefIngEntity rev4 = getAuditReader().find(SetRefIngEntity.class, ing1_id, 4);
+ SetRefIngEntity rev5 = getAuditReader().find(SetRefIngEntity.class, ing1_id, 5);
assert rev1.getReference().equals(ed1);
assert rev2.getReference() == null;
@@ -201,11 +201,11 @@
public void testHistoryOfEdIng2() {
SetRefEdEntity ed1 = new SetRefEdEntity(1, "data_ed_1");
- SetRefIngEntity rev1 = getVersionsReader().find(SetRefIngEntity.class, ing2_id,
1);
- SetRefIngEntity rev2 = getVersionsReader().find(SetRefIngEntity.class, ing2_id,
2);
- SetRefIngEntity rev3 = getVersionsReader().find(SetRefIngEntity.class, ing2_id,
3);
- SetRefIngEntity rev4 = getVersionsReader().find(SetRefIngEntity.class, ing2_id,
4);
- SetRefIngEntity rev5 = getVersionsReader().find(SetRefIngEntity.class, ing2_id,
5);
+ SetRefIngEntity rev1 = getAuditReader().find(SetRefIngEntity.class, ing2_id, 1);
+ SetRefIngEntity rev2 = getAuditReader().find(SetRefIngEntity.class, ing2_id, 2);
+ SetRefIngEntity rev3 = getAuditReader().find(SetRefIngEntity.class, ing2_id, 3);
+ SetRefIngEntity rev4 = getAuditReader().find(SetRefIngEntity.class, ing2_id, 4);
+ SetRefIngEntity rev5 = getAuditReader().find(SetRefIngEntity.class, ing2_id, 5);
assert rev1.getReference().equals(ed1);
assert rev2.getReference().equals(ed1);
@@ -219,11 +219,11 @@
SetRefEdEntity ed1 = new SetRefEdEntity(1, "data_ed_1");
SetRefEdEntity ed2 = new SetRefEdEntity(2, "data_ed_2");
- SetRefIngEntity rev1 = getVersionsReader().find(SetRefIngEntity.class, ing3_id,
1);
- SetRefIngEntity rev2 = getVersionsReader().find(SetRefIngEntity.class, ing3_id,
2);
- SetRefIngEntity rev3 = getVersionsReader().find(SetRefIngEntity.class, ing3_id,
3);
- SetRefIngEntity rev4 = getVersionsReader().find(SetRefIngEntity.class, ing3_id,
4);
- SetRefIngEntity rev5 = getVersionsReader().find(SetRefIngEntity.class, ing3_id,
5);
+ SetRefIngEntity rev1 = getAuditReader().find(SetRefIngEntity.class, ing3_id, 1);
+ SetRefIngEntity rev2 = getAuditReader().find(SetRefIngEntity.class, ing3_id, 2);
+ SetRefIngEntity rev3 = getAuditReader().find(SetRefIngEntity.class, ing3_id, 3);
+ SetRefIngEntity rev4 = getAuditReader().find(SetRefIngEntity.class, ing3_id, 4);
+ SetRefIngEntity rev5 = getAuditReader().find(SetRefIngEntity.class, ing3_id, 5);
assert rev1.getReference().equals(ed1);
assert rev2.getReference().equals(ed1);
@@ -236,11 +236,11 @@
public void testHistoryOfEdIng4() {
SetRefEdEntity ed1 = new SetRefEdEntity(1, "data_ed_1");
- SetRefIngEntity rev1 = getVersionsReader().find(SetRefIngEntity.class, ing4_id,
1);
- SetRefIngEntity rev2 = getVersionsReader().find(SetRefIngEntity.class, ing4_id,
2);
- SetRefIngEntity rev3 = getVersionsReader().find(SetRefIngEntity.class, ing4_id,
3);
- SetRefIngEntity rev4 = getVersionsReader().find(SetRefIngEntity.class, ing4_id,
4);
- SetRefIngEntity rev5 = getVersionsReader().find(SetRefIngEntity.class, ing4_id,
5);
+ SetRefIngEntity rev1 = getAuditReader().find(SetRefIngEntity.class, ing4_id, 1);
+ SetRefIngEntity rev2 = getAuditReader().find(SetRefIngEntity.class, ing4_id, 2);
+ SetRefIngEntity rev3 = getAuditReader().find(SetRefIngEntity.class, ing4_id, 3);
+ SetRefIngEntity rev4 = getAuditReader().find(SetRefIngEntity.class, ing4_id, 4);
+ SetRefIngEntity rev5 = getAuditReader().find(SetRefIngEntity.class, ing4_id, 5);
assert rev1.getReference().equals(ed1);
assert rev2.getReference().equals(ed1);
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BidirectionalMapKey.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BidirectionalMapKey.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/BidirectionalMapKey.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -90,10 +90,10 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(RefEdMapKeyEntity.class, ed_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(RefEdMapKeyEntity.class, ed_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(RefIngMapKeyEntity.class,
ing1_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(RefIngMapKeyEntity.class, ing2_id));
+ assert
Arrays.asList(1).equals(getAuditReader().getRevisions(RefIngMapKeyEntity.class,
ing1_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(RefIngMapKeyEntity.class, ing2_id));
}
@Test
@@ -101,8 +101,8 @@
RefIngMapKeyEntity ing1 = getEntityManager().find(RefIngMapKeyEntity.class,
ing1_id);
RefIngMapKeyEntity ing2 = getEntityManager().find(RefIngMapKeyEntity.class,
ing2_id);
- RefEdMapKeyEntity rev1 = getVersionsReader().find(RefEdMapKeyEntity.class, ed_id,
1);
- RefEdMapKeyEntity rev2 = getVersionsReader().find(RefEdMapKeyEntity.class, ed_id,
2);
+ RefEdMapKeyEntity rev1 = getAuditReader().find(RefEdMapKeyEntity.class, ed_id,
1);
+ RefEdMapKeyEntity rev2 = getAuditReader().find(RefEdMapKeyEntity.class, ed_id,
2);
assert rev1.getIdmap().equals(TestTools.makeMap("a", ing1));
assert rev2.getIdmap().equals(TestTools.makeMap("a", ing1,
"b", ing2));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicDetachedList.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicDetachedList.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicDetachedList.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -110,10 +110,10 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2, 3,
4).equals(getVersionsReader().getRevisions(ListRefCollEntity.class, coll1_id));
+ assert Arrays.asList(1, 2, 3,
4).equals(getAuditReader().getRevisions(ListRefCollEntity.class, coll1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, str1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, str2_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
str1_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
str2_id));
}
@Test
@@ -121,10 +121,10 @@
StrTestEntity str1 = getEntityManager().find(StrTestEntity.class, str1_id);
StrTestEntity str2 = getEntityManager().find(StrTestEntity.class, str2_id);
- ListRefCollEntity rev1 = getVersionsReader().find(ListRefCollEntity.class,
coll1_id, 1);
- ListRefCollEntity rev2 = getVersionsReader().find(ListRefCollEntity.class,
coll1_id, 2);
- ListRefCollEntity rev3 = getVersionsReader().find(ListRefCollEntity.class,
coll1_id, 3);
- ListRefCollEntity rev4 = getVersionsReader().find(ListRefCollEntity.class,
coll1_id, 4);
+ ListRefCollEntity rev1 = getAuditReader().find(ListRefCollEntity.class, coll1_id,
1);
+ ListRefCollEntity rev2 = getAuditReader().find(ListRefCollEntity.class, coll1_id,
2);
+ ListRefCollEntity rev3 = getAuditReader().find(ListRefCollEntity.class, coll1_id,
3);
+ ListRefCollEntity rev4 = getAuditReader().find(ListRefCollEntity.class, coll1_id,
4);
assert TestTools.checkList(rev1.getCollection(), str1);
assert TestTools.checkList(rev2.getCollection(), str1, str2);
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicDetachedSet.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicDetachedSet.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicDetachedSet.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -110,10 +110,10 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2, 3,
4).equals(getVersionsReader().getRevisions(SetRefCollEntity.class, coll1_id));
+ assert Arrays.asList(1, 2, 3,
4).equals(getAuditReader().getRevisions(SetRefCollEntity.class, coll1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, str1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, str2_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
str1_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
str2_id));
}
@Test
@@ -121,10 +121,10 @@
StrTestEntity str1 = getEntityManager().find(StrTestEntity.class, str1_id);
StrTestEntity str2 = getEntityManager().find(StrTestEntity.class, str2_id);
- SetRefCollEntity rev1 = getVersionsReader().find(SetRefCollEntity.class,
coll1_id, 1);
- SetRefCollEntity rev2 = getVersionsReader().find(SetRefCollEntity.class,
coll1_id, 2);
- SetRefCollEntity rev3 = getVersionsReader().find(SetRefCollEntity.class,
coll1_id, 3);
- SetRefCollEntity rev4 = getVersionsReader().find(SetRefCollEntity.class,
coll1_id, 4);
+ SetRefCollEntity rev1 = getAuditReader().find(SetRefCollEntity.class, coll1_id,
1);
+ SetRefCollEntity rev2 = getAuditReader().find(SetRefCollEntity.class, coll1_id,
2);
+ SetRefCollEntity rev3 = getAuditReader().find(SetRefCollEntity.class, coll1_id,
3);
+ SetRefCollEntity rev4 = getAuditReader().find(SetRefCollEntity.class, coll1_id,
4);
assert rev1.getCollection().equals(TestTools.makeSet(str1));
assert rev2.getCollection().equals(TestTools.makeSet(str1, str2));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicDetachedSetWithEmbId.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicDetachedSetWithEmbId.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicDetachedSetWithEmbId.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -109,10 +109,10 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2, 3,
4).equals(getVersionsReader().getRevisions(SetRefCollEntityEmbId.class, coll1_id));
+ assert Arrays.asList(1, 2, 3,
4).equals(getAuditReader().getRevisions(SetRefCollEntityEmbId.class, coll1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(EmbIdTestEntity.class,
str1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(EmbIdTestEntity.class,
str2_id));
+ assert
Arrays.asList(1).equals(getAuditReader().getRevisions(EmbIdTestEntity.class, str1_id));
+ assert
Arrays.asList(1).equals(getAuditReader().getRevisions(EmbIdTestEntity.class, str2_id));
}
@Test
@@ -120,10 +120,10 @@
EmbIdTestEntity str1 = getEntityManager().find(EmbIdTestEntity.class, str1_id);
EmbIdTestEntity str2 = getEntityManager().find(EmbIdTestEntity.class, str2_id);
- SetRefCollEntityEmbId rev1 =
getVersionsReader().find(SetRefCollEntityEmbId.class, coll1_id, 1);
- SetRefCollEntityEmbId rev2 =
getVersionsReader().find(SetRefCollEntityEmbId.class, coll1_id, 2);
- SetRefCollEntityEmbId rev3 =
getVersionsReader().find(SetRefCollEntityEmbId.class, coll1_id, 3);
- SetRefCollEntityEmbId rev4 =
getVersionsReader().find(SetRefCollEntityEmbId.class, coll1_id, 4);
+ SetRefCollEntityEmbId rev1 = getAuditReader().find(SetRefCollEntityEmbId.class,
coll1_id, 1);
+ SetRefCollEntityEmbId rev2 = getAuditReader().find(SetRefCollEntityEmbId.class,
coll1_id, 2);
+ SetRefCollEntityEmbId rev3 = getAuditReader().find(SetRefCollEntityEmbId.class,
coll1_id, 3);
+ SetRefCollEntityEmbId rev4 = getAuditReader().find(SetRefCollEntityEmbId.class,
coll1_id, 4);
assert rev1.getCollection().equals(TestTools.makeSet(str1));
assert rev2.getCollection().equals(TestTools.makeSet(str1, str2));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicDetachedSetWithMulId.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicDetachedSetWithMulId.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicDetachedSetWithMulId.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -109,10 +109,10 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2, 3,
4).equals(getVersionsReader().getRevisions(SetRefCollEntityMulId.class, coll1_id));
+ assert Arrays.asList(1, 2, 3,
4).equals(getAuditReader().getRevisions(SetRefCollEntityMulId.class, coll1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(MulIdTestEntity.class,
str1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(MulIdTestEntity.class,
str2_id));
+ assert
Arrays.asList(1).equals(getAuditReader().getRevisions(MulIdTestEntity.class, str1_id));
+ assert
Arrays.asList(1).equals(getAuditReader().getRevisions(MulIdTestEntity.class, str2_id));
}
@Test
@@ -120,10 +120,10 @@
MulIdTestEntity str1 = getEntityManager().find(MulIdTestEntity.class, str1_id);
MulIdTestEntity str2 = getEntityManager().find(MulIdTestEntity.class, str2_id);
- SetRefCollEntityMulId rev1 =
getVersionsReader().find(SetRefCollEntityMulId.class, coll1_id, 1);
- SetRefCollEntityMulId rev2 =
getVersionsReader().find(SetRefCollEntityMulId.class, coll1_id, 2);
- SetRefCollEntityMulId rev3 =
getVersionsReader().find(SetRefCollEntityMulId.class, coll1_id, 3);
- SetRefCollEntityMulId rev4 =
getVersionsReader().find(SetRefCollEntityMulId.class, coll1_id, 4);
+ SetRefCollEntityMulId rev1 = getAuditReader().find(SetRefCollEntityMulId.class,
coll1_id, 1);
+ SetRefCollEntityMulId rev2 = getAuditReader().find(SetRefCollEntityMulId.class,
coll1_id, 2);
+ SetRefCollEntityMulId rev3 = getAuditReader().find(SetRefCollEntityMulId.class,
coll1_id, 3);
+ SetRefCollEntityMulId rev4 = getAuditReader().find(SetRefCollEntityMulId.class,
coll1_id, 4);
assert rev1.getCollection().equals(TestTools.makeSet(str1));
assert rev2.getCollection().equals(TestTools.makeSet(str1, str2));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicJoinColumnSet.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicJoinColumnSet.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/BasicJoinColumnSet.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -110,10 +110,10 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2, 3,
4).equals(getVersionsReader().getRevisions(SetJoinColumnRefCollEntity.class, coll1_id));
+ assert Arrays.asList(1, 2, 3,
4).equals(getAuditReader().getRevisions(SetJoinColumnRefCollEntity.class, coll1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, str1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, str2_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
str1_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
str2_id));
}
@Test
@@ -121,10 +121,10 @@
StrTestEntity str1 = getEntityManager().find(StrTestEntity.class, str1_id);
StrTestEntity str2 = getEntityManager().find(StrTestEntity.class, str2_id);
- SetJoinColumnRefCollEntity rev1 =
getVersionsReader().find(SetJoinColumnRefCollEntity.class, coll1_id, 1);
- SetJoinColumnRefCollEntity rev2 =
getVersionsReader().find(SetJoinColumnRefCollEntity.class, coll1_id, 2);
- SetJoinColumnRefCollEntity rev3 =
getVersionsReader().find(SetJoinColumnRefCollEntity.class, coll1_id, 3);
- SetJoinColumnRefCollEntity rev4 =
getVersionsReader().find(SetJoinColumnRefCollEntity.class, coll1_id, 4);
+ SetJoinColumnRefCollEntity rev1 =
getAuditReader().find(SetJoinColumnRefCollEntity.class, coll1_id, 1);
+ SetJoinColumnRefCollEntity rev2 =
getAuditReader().find(SetJoinColumnRefCollEntity.class, coll1_id, 2);
+ SetJoinColumnRefCollEntity rev3 =
getAuditReader().find(SetJoinColumnRefCollEntity.class, coll1_id, 3);
+ SetJoinColumnRefCollEntity rev4 =
getAuditReader().find(SetJoinColumnRefCollEntity.class, coll1_id, 4);
assert rev1.getCollection().equals(TestTools.makeSet(str1));
assert rev2.getCollection().equals(TestTools.makeSet(str1, str2));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/DataChangesDetachedSet.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/DataChangesDetachedSet.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/DataChangesDetachedSet.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -87,17 +87,17 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(SetRefCollEntity.class, coll1_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(SetRefCollEntity.class, coll1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, str1_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
str1_id));
}
@Test
public void testHistoryOfColl1() {
StrTestEntity str1 = getEntityManager().find(StrTestEntity.class, str1_id);
- SetRefCollEntity rev1 = getVersionsReader().find(SetRefCollEntity.class,
coll1_id, 1);
- SetRefCollEntity rev2 = getVersionsReader().find(SetRefCollEntity.class,
coll1_id, 2);
+ SetRefCollEntity rev1 = getAuditReader().find(SetRefCollEntity.class, coll1_id,
1);
+ SetRefCollEntity rev2 = getAuditReader().find(SetRefCollEntity.class, coll1_id,
2);
assert rev1.getCollection().equals(TestTools.makeSet());
assert rev2.getCollection().equals(TestTools.makeSet(str1));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/DoubleDetachedSet.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/DoubleDetachedSet.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/detached/DoubleDetachedSet.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -106,10 +106,10 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2,
3).equals(getVersionsReader().getRevisions(DoubleSetRefCollEntity.class, coll1_id));
+ assert Arrays.asList(1, 2,
3).equals(getAuditReader().getRevisions(DoubleSetRefCollEntity.class, coll1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, str1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(StrTestEntity.class, str2_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
str1_id));
+ assert Arrays.asList(1).equals(getAuditReader().getRevisions(StrTestEntity.class,
str2_id));
}
@Test
@@ -117,9 +117,9 @@
StrTestEntity str1 = getEntityManager().find(StrTestEntity.class, str1_id);
StrTestEntity str2 = getEntityManager().find(StrTestEntity.class, str2_id);
- DoubleSetRefCollEntity rev1 =
getVersionsReader().find(DoubleSetRefCollEntity.class, coll1_id, 1);
- DoubleSetRefCollEntity rev2 =
getVersionsReader().find(DoubleSetRefCollEntity.class, coll1_id, 2);
- DoubleSetRefCollEntity rev3 =
getVersionsReader().find(DoubleSetRefCollEntity.class, coll1_id, 3);
+ DoubleSetRefCollEntity rev1 = getAuditReader().find(DoubleSetRefCollEntity.class,
coll1_id, 1);
+ DoubleSetRefCollEntity rev2 = getAuditReader().find(DoubleSetRefCollEntity.class,
coll1_id, 2);
+ DoubleSetRefCollEntity rev3 = getAuditReader().find(DoubleSetRefCollEntity.class,
coll1_id, 3);
assert rev1.getCollection().equals(TestTools.makeSet(str1));
assert rev2.getCollection().equals(TestTools.makeSet(str1, str2));
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/Bidirectional.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/Bidirectional.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/Bidirectional.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -86,18 +86,18 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(BiRefEdEntity.class, ed1_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(BiRefEdEntity.class, ed2_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(BiRefEdEntity.class, ed1_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(BiRefEdEntity.class, ed2_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(BiRefIngEntity.class, ing1_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(BiRefIngEntity.class, ing1_id));
}
@Test
public void testHistoryOfEdId1() {
BiRefIngEntity ing1 = getEntityManager().find(BiRefIngEntity.class, ing1_id);
- BiRefEdEntity rev1 = getVersionsReader().find(BiRefEdEntity.class, ed1_id, 1);
- BiRefEdEntity rev2 = getVersionsReader().find(BiRefEdEntity.class, ed1_id, 2);
+ BiRefEdEntity rev1 = getAuditReader().find(BiRefEdEntity.class, ed1_id, 1);
+ BiRefEdEntity rev2 = getAuditReader().find(BiRefEdEntity.class, ed1_id, 2);
assert rev1.getReferencing().equals(ing1);
assert rev2.getReferencing() == null;
@@ -107,8 +107,8 @@
public void testHistoryOfEdId2() {
BiRefIngEntity ing1 = getEntityManager().find(BiRefIngEntity.class, ing1_id);
- BiRefEdEntity rev1 = getVersionsReader().find(BiRefEdEntity.class, ed2_id, 1);
- BiRefEdEntity rev2 = getVersionsReader().find(BiRefEdEntity.class, ed2_id, 2);
+ BiRefEdEntity rev1 = getAuditReader().find(BiRefEdEntity.class, ed2_id, 1);
+ BiRefEdEntity rev2 = getAuditReader().find(BiRefEdEntity.class, ed2_id, 2);
assert rev1.getReferencing() == null;
assert rev2.getReferencing().equals(ing1);
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/Bidirectional2.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/Bidirectional2.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/Bidirectional2.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -111,11 +111,11 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1, 2, 3,
4).equals(getVersionsReader().getRevisions(BiRefEdEntity.class, ed1_id));
- assert Arrays.asList(1,
4).equals(getVersionsReader().getRevisions(BiRefEdEntity.class, ed2_id));
+ assert Arrays.asList(1, 2, 3,
4).equals(getAuditReader().getRevisions(BiRefEdEntity.class, ed1_id));
+ assert Arrays.asList(1,
4).equals(getAuditReader().getRevisions(BiRefEdEntity.class, ed2_id));
- assert Arrays.asList(2, 3,
4).equals(getVersionsReader().getRevisions(BiRefIngEntity.class, ing1_id));
- assert Arrays.asList(2, 3,
4).equals(getVersionsReader().getRevisions(BiRefIngEntity.class, ing2_id));
+ assert Arrays.asList(2, 3,
4).equals(getAuditReader().getRevisions(BiRefIngEntity.class, ing1_id));
+ assert Arrays.asList(2, 3,
4).equals(getAuditReader().getRevisions(BiRefIngEntity.class, ing2_id));
}
@Test
@@ -123,10 +123,10 @@
BiRefIngEntity ing1 = getEntityManager().find(BiRefIngEntity.class, ing1_id);
BiRefIngEntity ing2 = getEntityManager().find(BiRefIngEntity.class, ing2_id);
- BiRefEdEntity rev1 = getVersionsReader().find(BiRefEdEntity.class, ed1_id, 1);
- BiRefEdEntity rev2 = getVersionsReader().find(BiRefEdEntity.class, ed1_id, 2);
- BiRefEdEntity rev3 = getVersionsReader().find(BiRefEdEntity.class, ed1_id, 3);
- BiRefEdEntity rev4 = getVersionsReader().find(BiRefEdEntity.class, ed1_id, 4);
+ BiRefEdEntity rev1 = getAuditReader().find(BiRefEdEntity.class, ed1_id, 1);
+ BiRefEdEntity rev2 = getAuditReader().find(BiRefEdEntity.class, ed1_id, 2);
+ BiRefEdEntity rev3 = getAuditReader().find(BiRefEdEntity.class, ed1_id, 3);
+ BiRefEdEntity rev4 = getAuditReader().find(BiRefEdEntity.class, ed1_id, 4);
assert rev1.getReferencing() == null;
assert rev2.getReferencing().equals(ing1);
@@ -138,10 +138,10 @@
public void testHistoryOfEdId2() {
BiRefIngEntity ing1 = getEntityManager().find(BiRefIngEntity.class, ing1_id);
- BiRefEdEntity rev1 = getVersionsReader().find(BiRefEdEntity.class, ed2_id, 1);
- BiRefEdEntity rev2 = getVersionsReader().find(BiRefEdEntity.class, ed2_id, 2);
- BiRefEdEntity rev3 = getVersionsReader().find(BiRefEdEntity.class, ed2_id, 3);
- BiRefEdEntity rev4 = getVersionsReader().find(BiRefEdEntity.class, ed2_id, 4);
+ BiRefEdEntity rev1 = getAuditReader().find(BiRefEdEntity.class, ed2_id, 1);
+ BiRefEdEntity rev2 = getAuditReader().find(BiRefEdEntity.class, ed2_id, 2);
+ BiRefEdEntity rev3 = getAuditReader().find(BiRefEdEntity.class, ed2_id, 3);
+ BiRefEdEntity rev4 = getAuditReader().find(BiRefEdEntity.class, ed2_id, 4);
assert rev1.getReferencing() == null;
assert rev2.getReferencing() == null;
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/BidirectionalNoNulls.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/BidirectionalNoNulls.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/BidirectionalNoNulls.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -96,11 +96,11 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(BiRefEdEntity.class, ed1_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(BiRefEdEntity.class, ed2_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(BiRefEdEntity.class, ed1_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(BiRefEdEntity.class, ed2_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(BiRefIngEntity.class, ing1_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(BiRefIngEntity.class, ing2_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(BiRefIngEntity.class, ing1_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(BiRefIngEntity.class, ing2_id));
}
@Test
@@ -108,8 +108,8 @@
BiRefIngEntity ing1 = getEntityManager().find(BiRefIngEntity.class, ing1_id);
BiRefIngEntity ing2 = getEntityManager().find(BiRefIngEntity.class, ing2_id);
- BiRefEdEntity rev1 = getVersionsReader().find(BiRefEdEntity.class, ed1_id, 1);
- BiRefEdEntity rev2 = getVersionsReader().find(BiRefEdEntity.class, ed1_id, 2);
+ BiRefEdEntity rev1 = getAuditReader().find(BiRefEdEntity.class, ed1_id, 1);
+ BiRefEdEntity rev2 = getAuditReader().find(BiRefEdEntity.class, ed1_id, 2);
assert rev1.getReferencing().equals(ing1);
assert rev2.getReferencing().equals(ing2);
@@ -120,8 +120,8 @@
BiRefIngEntity ing1 = getEntityManager().find(BiRefIngEntity.class, ing1_id);
BiRefIngEntity ing2 = getEntityManager().find(BiRefIngEntity.class, ing2_id);
- BiRefEdEntity rev1 = getVersionsReader().find(BiRefEdEntity.class, ed2_id, 1);
- BiRefEdEntity rev2 = getVersionsReader().find(BiRefEdEntity.class, ed2_id, 2);
+ BiRefEdEntity rev1 = getAuditReader().find(BiRefEdEntity.class, ed2_id, 1);
+ BiRefEdEntity rev2 = getAuditReader().find(BiRefEdEntity.class, ed2_id, 2);
assert rev1.getReferencing().equals(ing2);
assert rev2.getReferencing().equals(ing1);
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/ids/EmbIdBidirectional.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/ids/EmbIdBidirectional.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/ids/EmbIdBidirectional.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -85,18 +85,18 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(BiEmbIdRefEdEntity.class, ed1_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(BiEmbIdRefEdEntity.class, ed2_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(BiEmbIdRefEdEntity.class, ed1_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(BiEmbIdRefEdEntity.class, ed2_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(BiEmbIdRefIngEntity.class, ing1_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(BiEmbIdRefIngEntity.class, ing1_id));
}
@Test
public void testHistoryOfEdId1() {
BiEmbIdRefIngEntity ing1 = getEntityManager().find(BiEmbIdRefIngEntity.class,
ing1_id);
- BiEmbIdRefEdEntity rev1 = getVersionsReader().find(BiEmbIdRefEdEntity.class,
ed1_id, 1);
- BiEmbIdRefEdEntity rev2 = getVersionsReader().find(BiEmbIdRefEdEntity.class,
ed1_id, 2);
+ BiEmbIdRefEdEntity rev1 = getAuditReader().find(BiEmbIdRefEdEntity.class, ed1_id,
1);
+ BiEmbIdRefEdEntity rev2 = getAuditReader().find(BiEmbIdRefEdEntity.class, ed1_id,
2);
assert rev1.getReferencing().equals(ing1);
assert rev2.getReferencing() == null;
@@ -106,8 +106,8 @@
public void testHistoryOfEdId2() {
BiEmbIdRefIngEntity ing1 = getEntityManager().find(BiEmbIdRefIngEntity.class,
ing1_id);
- BiEmbIdRefEdEntity rev1 = getVersionsReader().find(BiEmbIdRefEdEntity.class,
ed2_id, 1);
- BiEmbIdRefEdEntity rev2 = getVersionsReader().find(BiEmbIdRefEdEntity.class,
ed2_id, 2);
+ BiEmbIdRefEdEntity rev1 = getAuditReader().find(BiEmbIdRefEdEntity.class, ed2_id,
1);
+ BiEmbIdRefEdEntity rev2 = getAuditReader().find(BiEmbIdRefEdEntity.class, ed2_id,
2);
assert rev1.getReferencing() == null;
assert rev2.getReferencing().equals(ing1);
@@ -118,8 +118,8 @@
BiEmbIdRefEdEntity ed1 = getEntityManager().find(BiEmbIdRefEdEntity.class,
ed1_id);
BiEmbIdRefEdEntity ed2 = getEntityManager().find(BiEmbIdRefEdEntity.class,
ed2_id);
- BiEmbIdRefIngEntity rev1 = getVersionsReader().find(BiEmbIdRefIngEntity.class,
ing1_id, 1);
- BiEmbIdRefIngEntity rev2 = getVersionsReader().find(BiEmbIdRefIngEntity.class,
ing1_id, 2);
+ BiEmbIdRefIngEntity rev1 = getAuditReader().find(BiEmbIdRefIngEntity.class,
ing1_id, 1);
+ BiEmbIdRefIngEntity rev2 = getAuditReader().find(BiEmbIdRefIngEntity.class,
ing1_id, 2);
assert rev1.getReference().equals(ed1);
assert rev2.getReference().equals(ed2);
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/ids/MulIdBidirectional.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/ids/MulIdBidirectional.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/bidirectional/ids/MulIdBidirectional.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -85,18 +85,18 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(BiMulIdRefEdEntity.class, ed1_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(BiMulIdRefEdEntity.class, ed2_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(BiMulIdRefEdEntity.class, ed1_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(BiMulIdRefEdEntity.class, ed2_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(BiMulIdRefIngEntity.class, ing1_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(BiMulIdRefIngEntity.class, ing1_id));
}
@Test
public void testHistoryOfEdId1() {
BiMulIdRefIngEntity ing1 = getEntityManager().find(BiMulIdRefIngEntity.class,
ing1_id);
- BiMulIdRefEdEntity rev1 = getVersionsReader().find(BiMulIdRefEdEntity.class,
ed1_id, 1);
- BiMulIdRefEdEntity rev2 = getVersionsReader().find(BiMulIdRefEdEntity.class,
ed1_id, 2);
+ BiMulIdRefEdEntity rev1 = getAuditReader().find(BiMulIdRefEdEntity.class, ed1_id,
1);
+ BiMulIdRefEdEntity rev2 = getAuditReader().find(BiMulIdRefEdEntity.class, ed1_id,
2);
assert rev1.getReferencing().equals(ing1);
assert rev2.getReferencing() == null;
@@ -106,8 +106,8 @@
public void testHistoryOfEdId2() {
BiMulIdRefIngEntity ing1 = getEntityManager().find(BiMulIdRefIngEntity.class,
ing1_id);
- BiMulIdRefEdEntity rev1 = getVersionsReader().find(BiMulIdRefEdEntity.class,
ed2_id, 1);
- BiMulIdRefEdEntity rev2 = getVersionsReader().find(BiMulIdRefEdEntity.class,
ed2_id, 2);
+ BiMulIdRefEdEntity rev1 = getAuditReader().find(BiMulIdRefEdEntity.class, ed2_id,
1);
+ BiMulIdRefEdEntity rev2 = getAuditReader().find(BiMulIdRefEdEntity.class, ed2_id,
2);
assert rev1.getReferencing() == null;
assert rev2.getReferencing().equals(ing1);
@@ -118,8 +118,8 @@
BiMulIdRefEdEntity ed1 = getEntityManager().find(BiMulIdRefEdEntity.class,
ed1_id);
BiMulIdRefEdEntity ed2 = getEntityManager().find(BiMulIdRefEdEntity.class,
ed2_id);
- BiMulIdRefIngEntity rev1 = getVersionsReader().find(BiMulIdRefIngEntity.class,
ing1_id, 1);
- BiMulIdRefIngEntity rev2 = getVersionsReader().find(BiMulIdRefIngEntity.class,
ing1_id, 2);
+ BiMulIdRefIngEntity rev1 = getAuditReader().find(BiMulIdRefIngEntity.class,
ing1_id, 1);
+ BiMulIdRefIngEntity rev2 = getAuditReader().find(BiMulIdRefIngEntity.class,
ing1_id, 2);
assert rev1.getReference().equals(ed1);
assert rev2.getReference().equals(ed2);
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/unidirectional/Unidirectional.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/unidirectional/Unidirectional.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/unidirectional/Unidirectional.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -110,13 +110,13 @@
@Test
public void testRevisionsCounts() {
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(UniRefEdEntity.class, ed1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(UniRefEdEntity.class, ed2_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(UniRefEdEntity.class, ed3_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(UniRefEdEntity.class, ed4_id));
+ assert
Arrays.asList(1).equals(getAuditReader().getRevisions(UniRefEdEntity.class, ed1_id));
+ assert
Arrays.asList(1).equals(getAuditReader().getRevisions(UniRefEdEntity.class, ed2_id));
+ assert
Arrays.asList(1).equals(getAuditReader().getRevisions(UniRefEdEntity.class, ed3_id));
+ assert
Arrays.asList(1).equals(getAuditReader().getRevisions(UniRefEdEntity.class, ed4_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(UniRefIngEntity.class, ing1_id));
- assert Arrays.asList(1,
3).equals(getVersionsReader().getRevisions(UniRefIngEntity.class, ing2_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(UniRefIngEntity.class, ing1_id));
+ assert Arrays.asList(1,
3).equals(getAuditReader().getRevisions(UniRefIngEntity.class, ing2_id));
}
@Test
@@ -124,9 +124,9 @@
UniRefEdEntity ed1 = getEntityManager().find(UniRefEdEntity.class, ed1_id);
UniRefEdEntity ed2 = getEntityManager().find(UniRefEdEntity.class, ed2_id);
- UniRefIngEntity rev1 = getVersionsReader().find(UniRefIngEntity.class, ing1_id,
1);
- UniRefIngEntity rev2 = getVersionsReader().find(UniRefIngEntity.class, ing1_id,
2);
- UniRefIngEntity rev3 = getVersionsReader().find(UniRefIngEntity.class, ing1_id,
3);
+ UniRefIngEntity rev1 = getAuditReader().find(UniRefIngEntity.class, ing1_id, 1);
+ UniRefIngEntity rev2 = getAuditReader().find(UniRefIngEntity.class, ing1_id, 2);
+ UniRefIngEntity rev3 = getAuditReader().find(UniRefIngEntity.class, ing1_id, 3);
assert rev1.getReference().equals(ed1);
assert rev2.getReference().equals(ed2);
@@ -138,9 +138,9 @@
UniRefEdEntity ed3 = getEntityManager().find(UniRefEdEntity.class, ed3_id);
UniRefEdEntity ed4 = getEntityManager().find(UniRefEdEntity.class, ed4_id);
- UniRefIngEntity rev1 = getVersionsReader().find(UniRefIngEntity.class, ing2_id,
1);
- UniRefIngEntity rev2 = getVersionsReader().find(UniRefIngEntity.class, ing2_id,
2);
- UniRefIngEntity rev3 = getVersionsReader().find(UniRefIngEntity.class, ing2_id,
3);
+ UniRefIngEntity rev1 = getAuditReader().find(UniRefIngEntity.class, ing2_id, 1);
+ UniRefIngEntity rev2 = getAuditReader().find(UniRefIngEntity.class, ing2_id, 2);
+ UniRefIngEntity rev3 = getAuditReader().find(UniRefIngEntity.class, ing2_id, 3);
assert rev1.getReference().equals(ed3);
assert rev2.getReference().equals(ed3);
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/unidirectional/UnidirectionalWithNulls.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/unidirectional/UnidirectionalWithNulls.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetoone/unidirectional/UnidirectionalWithNulls.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -101,20 +101,20 @@
@Test
public void testRevisionsCounts() {
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(UniRefEdEntity.class, ed1_id));
- assert
Arrays.asList(1).equals(getVersionsReader().getRevisions(UniRefEdEntity.class, ed2_id));
+ assert
Arrays.asList(1).equals(getAuditReader().getRevisions(UniRefEdEntity.class, ed1_id));
+ assert
Arrays.asList(1).equals(getAuditReader().getRevisions(UniRefEdEntity.class, ed2_id));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(UniRefIngEntity.class, ing1_id));
- assert Arrays.asList(1,
3).equals(getVersionsReader().getRevisions(UniRefIngEntity.class, ing2_id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(UniRefIngEntity.class, ing1_id));
+ assert Arrays.asList(1,
3).equals(getAuditReader().getRevisions(UniRefIngEntity.class, ing2_id));
}
@Test
public void testHistoryOfIngId1() {
UniRefEdEntity ed1 = getEntityManager().find(UniRefEdEntity.class, ed1_id);
- UniRefIngEntity rev1 = getVersionsReader().find(UniRefIngEntity.class, ing1_id,
1);
- UniRefIngEntity rev2 = getVersionsReader().find(UniRefIngEntity.class, ing1_id,
2);
- UniRefIngEntity rev3 = getVersionsReader().find(UniRefIngEntity.class, ing1_id,
3);
+ UniRefIngEntity rev1 = getAuditReader().find(UniRefIngEntity.class, ing1_id, 1);
+ UniRefIngEntity rev2 = getAuditReader().find(UniRefIngEntity.class, ing1_id, 2);
+ UniRefIngEntity rev3 = getAuditReader().find(UniRefIngEntity.class, ing1_id, 3);
assert rev1.getReference().equals(ed1);
assert rev2.getReference() == null;
@@ -125,9 +125,9 @@
public void testHistoryOfIngId2() {
UniRefEdEntity ed2 = getEntityManager().find(UniRefEdEntity.class, ed2_id);
- UniRefIngEntity rev1 = getVersionsReader().find(UniRefIngEntity.class, ing2_id,
1);
- UniRefIngEntity rev2 = getVersionsReader().find(UniRefIngEntity.class, ing2_id,
2);
- UniRefIngEntity rev3 = getVersionsReader().find(UniRefIngEntity.class, ing2_id,
3);
+ UniRefIngEntity rev1 = getAuditReader().find(UniRefIngEntity.class, ing2_id, 1);
+ UniRefIngEntity rev2 = getAuditReader().find(UniRefIngEntity.class, ing2_id, 2);
+ UniRefIngEntity rev3 = getAuditReader().find(UniRefIngEntity.class, ing2_id, 3);
assert rev1.getReference() == null;
assert rev2.getReference() == null;
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/properties/UnversionedOptimisticLockingField.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/properties/UnversionedOptimisticLockingField.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/properties/UnversionedOptimisticLockingField.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -65,7 +65,7 @@
@Test
public void testRevisionCounts() {
assert Arrays.asList(1, 2).equals(
- getVersionsReader().getRevisions(UnversionedOptimisticLockingFieldEntity.class,
+ getAuditReader().getRevisions(UnversionedOptimisticLockingFieldEntity.class,
id1));
}
@@ -74,9 +74,9 @@
UnversionedOptimisticLockingFieldEntity ver1 = new
UnversionedOptimisticLockingFieldEntity(id1, "x");
UnversionedOptimisticLockingFieldEntity ver2 = new
UnversionedOptimisticLockingFieldEntity(id1, "y");
- assert getVersionsReader().find(UnversionedOptimisticLockingFieldEntity.class, id1, 1)
+ assert getAuditReader().find(UnversionedOptimisticLockingFieldEntity.class, id1, 1)
.equals(ver1);
- assert getVersionsReader().find(UnversionedOptimisticLockingFieldEntity.class, id1, 2)
+ assert getAuditReader().find(UnversionedOptimisticLockingFieldEntity.class, id1, 2)
.equals(ver2);
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/properties/VersionsProperties.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/properties/VersionsProperties.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/properties/VersionsProperties.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -64,7 +64,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(PropertiesTestEntity.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(PropertiesTestEntity.class, id1));
}
@Test
@@ -72,7 +72,7 @@
PropertiesTestEntity ver1 = new PropertiesTestEntity(id1, "x");
PropertiesTestEntity ver2 = new PropertiesTestEntity(id1, "y");
- assert getVersionsReader().find(PropertiesTestEntity.class, id1,
1).equals(ver1);
- assert getVersionsReader().find(PropertiesTestEntity.class, id1,
2).equals(ver2);
+ assert getAuditReader().find(PropertiesTestEntity.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(PropertiesTestEntity.class, id1, 2).equals(ver2);
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/AggregateQuery.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/AggregateQuery.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/AggregateQuery.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -81,19 +81,19 @@
@Test
public void testEntitiesAvgMaxQuery() {
- Object[] ver1 = (Object[]) getVersionsReader().createQuery()
+ Object[] ver1 = (Object[]) getAuditReader().createQuery()
.forEntitiesAtRevision(IntTestEntity.class, 1)
.addProjection("max", "number")
.addProjection("avg", "number")
.getSingleResult();
- Object[] ver2 = (Object[]) getVersionsReader().createQuery()
+ Object[] ver2 = (Object[]) getAuditReader().createQuery()
.forEntitiesAtRevision(IntTestEntity.class, 2)
.addProjection("max", "number")
.addProjection("avg", "number")
.getSingleResult();
- Object[] ver3 = (Object[]) getVersionsReader().createQuery()
+ Object[] ver3 = (Object[]) getAuditReader().createQuery()
.forEntitiesAtRevision(IntTestEntity.class, 3)
.addProjection("max", "number")
.addProjection("avg", "number")
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/CustomRevEntityQuery.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/CustomRevEntityQuery.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/CustomRevEntityQuery.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -77,7 +77,7 @@
@Test
public void testRevisionsOfId1Query() {
- List<Object[]> result = getVersionsReader().createQuery()
+ List<Object[]> result = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.add(AuditRestrictions.idEq(id1))
.getResultList();
@@ -93,7 +93,7 @@
@Test
public void testRevisionsOfId2Query() {
- List<Object[]> result = getVersionsReader().createQuery()
+ List<Object[]> result = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.add(AuditRestrictions.idEq(id2))
.getResultList();
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/DeletedEntities.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/DeletedEntities.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/DeletedEntities.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -73,20 +73,20 @@
@Test
public void testProjectionsInEntitiesAtRevision() {
- assert
getVersionsReader().createQuery().forEntitiesAtRevision(StrIntTestEntity.class, 1)
+ assert
getAuditReader().createQuery().forEntitiesAtRevision(StrIntTestEntity.class, 1)
.getResultList().size() == 2;
- assert
getVersionsReader().createQuery().forEntitiesAtRevision(StrIntTestEntity.class, 2)
+ assert
getAuditReader().createQuery().forEntitiesAtRevision(StrIntTestEntity.class, 2)
.getResultList().size() == 1;
- assert (Long)
getVersionsReader().createQuery().forEntitiesAtRevision(StrIntTestEntity.class, 1)
+ assert (Long)
getAuditReader().createQuery().forEntitiesAtRevision(StrIntTestEntity.class, 1)
.addProjection("count",
"originalId.id").getResultList().get(0) == 2;
- assert (Long)
getVersionsReader().createQuery().forEntitiesAtRevision(StrIntTestEntity.class, 2)
+ assert (Long)
getAuditReader().createQuery().forEntitiesAtRevision(StrIntTestEntity.class, 2)
.addProjection("count",
"originalId.id").getResultList().get(0) == 1;
}
@Test
public void testRevisionsOfEntityWithoutDelete() {
- List result = getVersionsReader().createQuery()
+ List result = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, false)
.add(AuditRestrictions.idEq(id2))
.getResultList();
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/MaximalizePropertyQuery.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/MaximalizePropertyQuery.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/MaximalizePropertyQuery.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -101,7 +101,7 @@
@Test
public void testMaximizeWithIdEq() {
- List revs_id1 = getVersionsReader().createQuery()
+ List revs_id1 = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.addProjection(RevisionProperty.revisionNumber())
.add(AuditRestrictions.maximizeProperty("number")
@@ -113,7 +113,7 @@
@Test
public void testMinimizeWithPropertyEq() {
- List result = getVersionsReader().createQuery()
+ List result = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.addProjection(RevisionProperty.revisionNumber())
.add(AuditRestrictions.minimizeProperty("number")
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/OrderByLimitQuery.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/OrderByLimitQuery.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/OrderByLimitQuery.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -90,21 +90,21 @@
@Test
public void testEntitiesOrderLimitByQueryRev1() {
- List res_0_to_1 = getVersionsReader().createQuery()
+ List res_0_to_1 = getAuditReader().createQuery()
.forEntitiesAtRevision(IntTestEntity.class, 1)
.addOrder("number", false)
.setFirstResult(0)
.setMaxResults(2)
.getResultList();
- List res_2_to_3 = getVersionsReader().createQuery()
+ List res_2_to_3 = getAuditReader().createQuery()
.forEntitiesAtRevision(IntTestEntity.class, 1)
.addOrder("number", false)
.setFirstResult(2)
.setMaxResults(2)
.getResultList();
- List res_empty = getVersionsReader().createQuery()
+ List res_empty = getAuditReader().createQuery()
.forEntitiesAtRevision(IntTestEntity.class, 1)
.addOrder("number", false)
.setFirstResult(4)
@@ -118,21 +118,21 @@
@Test
public void testEntitiesOrderLimitByQueryRev2() {
- List res_0_to_1 = getVersionsReader().createQuery()
+ List res_0_to_1 = getAuditReader().createQuery()
.forEntitiesAtRevision(IntTestEntity.class, 2)
.addOrder("number", false)
.setFirstResult(0)
.setMaxResults(2)
.getResultList();
- List res_2_to_3 = getVersionsReader().createQuery()
+ List res_2_to_3 = getAuditReader().createQuery()
.forEntitiesAtRevision(IntTestEntity.class, 2)
.addOrder("number", false)
.setFirstResult(2)
.setMaxResults(2)
.getResultList();
- List res_4 = getVersionsReader().createQuery()
+ List res_4 = getAuditReader().createQuery()
.forEntitiesAtRevision(IntTestEntity.class, 2)
.addOrder("number", false)
.setFirstResult(4)
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/RevisionConstraintQuery.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/RevisionConstraintQuery.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/RevisionConstraintQuery.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -100,7 +100,7 @@
@Test
public void testRevisionsLtQuery() {
- List result = getVersionsReader().createQuery()
+ List result = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.addProjection(RevisionProperty.distinct())
.add(RevisionProperty.lt(3))
@@ -111,7 +111,7 @@
@Test
public void testRevisionsGeQuery() {
- List result = getVersionsReader().createQuery()
+ List result = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.addProjection(RevisionProperty.distinct())
.add(RevisionProperty.ge(2))
@@ -122,7 +122,7 @@
@Test
public void testRevisionsLeWithPropertyQuery() {
- List result = getVersionsReader().createQuery()
+ List result = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.addProjection(RevisionProperty.revisionNumber())
.add(RevisionProperty.le(3))
@@ -134,7 +134,7 @@
@Test
public void testRevisionsGtWithPropertyQuery() {
- List result = getVersionsReader().createQuery()
+ List result = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.addProjection(RevisionProperty.revisionNumber())
.add(RevisionProperty.gt(1))
@@ -146,7 +146,7 @@
@Test
public void testRevisionProjectionQuery() {
- Object[] result = (Object[]) getVersionsReader().createQuery()
+ Object[] result = (Object[]) getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.addProjection(RevisionProperty.max())
.addProjection(RevisionProperty.count())
@@ -163,7 +163,7 @@
@Test
public void testRevisionOrderQuery() {
- List result = getVersionsReader().createQuery()
+ List result = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.addProjection(RevisionProperty.revisionNumber())
.add(AuditRestrictions.idEq(id1))
@@ -176,7 +176,7 @@
@Test
public void testRevisionCountQuery() {
// The query shouldn't be ordered as always, otherwise - we get an
exception.
- Object result = getVersionsReader().createQuery()
+ Object result = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.addProjection(RevisionProperty.count())
.add(AuditRestrictions.idEq(id1))
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/SimpleQuery.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/SimpleQuery.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/SimpleQuery.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -106,7 +106,7 @@
@Test
public void testEntitiesIdQuery() {
- StrIntTestEntity ver2 = (StrIntTestEntity) getVersionsReader().createQuery()
+ StrIntTestEntity ver2 = (StrIntTestEntity) getAuditReader().createQuery()
.forEntitiesAtRevision(StrIntTestEntity.class, 2)
.add(AuditRestrictions.idEq(id2))
.getSingleResult();
@@ -116,17 +116,17 @@
@Test
public void testEntitiesPropertyEqualsQuery() {
- List ver1 = getVersionsReader().createQuery()
+ List ver1 = getAuditReader().createQuery()
.forEntitiesAtRevision(StrIntTestEntity.class, 1)
.add(AuditRestrictions.eq("str1", "a"))
.getResultList();
- List ver2 = getVersionsReader().createQuery()
+ List ver2 = getAuditReader().createQuery()
.forEntitiesAtRevision(StrIntTestEntity.class, 2)
.add(AuditRestrictions.eq("str1", "a"))
.getResultList();
- List ver3 = getVersionsReader().createQuery()
+ List ver3 = getAuditReader().createQuery()
.forEntitiesAtRevision(StrIntTestEntity.class, 3)
.add(AuditRestrictions.eq("str1", "a"))
.getResultList();
@@ -140,17 +140,17 @@
@Test
public void testEntitiesPropertyLeQuery() {
- List ver1 = getVersionsReader().createQuery()
+ List ver1 = getAuditReader().createQuery()
.forEntitiesAtRevision(StrIntTestEntity.class, 1)
.add(AuditRestrictions.le("number", 10))
.getResultList();
- List ver2 = getVersionsReader().createQuery()
+ List ver2 = getAuditReader().createQuery()
.forEntitiesAtRevision(StrIntTestEntity.class, 2)
.add(AuditRestrictions.le("number", 10))
.getResultList();
- List ver3 = getVersionsReader().createQuery()
+ List ver3 = getAuditReader().createQuery()
.forEntitiesAtRevision(StrIntTestEntity.class, 3)
.add(AuditRestrictions.le("number", 10))
.getResultList();
@@ -165,21 +165,21 @@
@Test
public void testRevisionsPropertyEqQuery() {
- List revs_id1 = getVersionsReader().createQuery()
+ List revs_id1 = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.addProjection(RevisionProperty.revisionNumber())
.add(AuditRestrictions.le("str1", "a"))
.add(AuditRestrictions.idEq(id1))
.getResultList();
- List revs_id2 = getVersionsReader().createQuery()
+ List revs_id2 = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.addProjection(RevisionProperty.revisionNumber())
.add(AuditRestrictions.le("str1", "a"))
.add(AuditRestrictions.idEq(id2))
.getResultList();
- List revs_id3 = getVersionsReader().createQuery()
+ List revs_id3 = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.addProjection(RevisionProperty.revisionNumber())
.add(AuditRestrictions.le("str1", "a"))
@@ -193,7 +193,7 @@
@Test
public void testSelectEntitiesQuery() {
- List result = getVersionsReader().createQuery()
+ List result = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, true, false)
.add(AuditRestrictions.idEq(id1))
.getResultList();
@@ -206,7 +206,7 @@
@Test
public void testSelectEntitiesAndRevisionsQuery() {
- List result = getVersionsReader().createQuery()
+ List result = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.add(AuditRestrictions.idEq(id1))
.getResultList();
@@ -228,7 +228,7 @@
@Test
public void testSelectRevisionTypeQuery() {
- List result = getVersionsReader().createQuery()
+ List result = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.addProjection(RevisionTypeProperty.revisionType())
.add(AuditRestrictions.idEq(id1))
@@ -243,7 +243,7 @@
@Test
public void testEmptyRevisionOfEntityQuery() {
- List result = getVersionsReader().createQuery()
+ List result = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.getResultList();
@@ -252,7 +252,7 @@
@Test
public void testEmptyConjunctionRevisionOfEntityQuery() {
- List result = getVersionsReader().createQuery()
+ List result = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.add(AuditRestrictions.conjunction())
.getResultList();
@@ -262,7 +262,7 @@
@Test
public void testEmptyDisjunctionRevisionOfEntityQuery() {
- List result = getVersionsReader().createQuery()
+ List result = getAuditReader().createQuery()
.forRevisionsOfEntity(StrIntTestEntity.class, false, true)
.add(AuditRestrictions.disjunction())
.getResultList();
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/ids/EmbIdOneToManyQuery.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/ids/EmbIdOneToManyQuery.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/ids/EmbIdOneToManyQuery.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -103,32 +103,32 @@
@Test
public void testEntitiesReferencedToId3() {
- Set rev1_related = new HashSet(getVersionsReader().createQuery()
+ Set rev1_related = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 1)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.getResultList());
- Set rev1 = new HashSet(getVersionsReader().createQuery()
+ Set rev1 = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 1)
.add(AuditRestrictions.eq("reference", new
SetRefEdEmbIdEntity(id3, null)))
.getResultList());
- Set rev2_related = new HashSet(getVersionsReader().createQuery()
+ Set rev2_related = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 2)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.getResultList());
- Set rev2 = new HashSet(getVersionsReader().createQuery()
+ Set rev2 = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 2)
.add(AuditRestrictions.eq("reference", new
SetRefEdEmbIdEntity(id3, null)))
.getResultList());
- Set rev3_related = new HashSet(getVersionsReader().createQuery()
+ Set rev3_related = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 3)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.getResultList());
- Set rev3 = new HashSet(getVersionsReader().createQuery()
+ Set rev3 = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 3)
.add(AuditRestrictions.eq("reference", new
SetRefEdEmbIdEntity(id3, null)))
.getResultList());
@@ -145,17 +145,17 @@
@Test
public void testEntitiesReferencedToId4() {
- Set rev1_related = new HashSet(getVersionsReader().createQuery()
+ Set rev1_related = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 1)
.add(AuditRestrictions.relatedIdEq("reference", id4))
.getResultList());
- Set rev2_related = new HashSet(getVersionsReader().createQuery()
+ Set rev2_related = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 2)
.add(AuditRestrictions.relatedIdEq("reference", id4))
.getResultList());
- Set rev3_related = new HashSet(getVersionsReader().createQuery()
+ Set rev3_related = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 3)
.add(AuditRestrictions.relatedIdEq("reference", id4))
.getResultList());
@@ -167,19 +167,19 @@
@Test
public void testEntitiesReferencedByIng1ToId3() {
- List rev1_related = getVersionsReader().createQuery()
+ List rev1_related = getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 1)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.add(AuditRestrictions.idEq(id1))
.getResultList();
- Object rev2_related = getVersionsReader().createQuery()
+ Object rev2_related = getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 2)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.add(AuditRestrictions.idEq(id1))
.getSingleResult();
- Object rev3_related = getVersionsReader().createQuery()
+ Object rev3_related = getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 3)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.add(AuditRestrictions.idEq(id1))
@@ -192,19 +192,19 @@
@Test
public void testEntitiesReferencedByIng2ToId3() {
- List rev1_related = getVersionsReader().createQuery()
+ List rev1_related = getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 1)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.add(AuditRestrictions.idEq(id2))
.getResultList();
- List rev2_related = getVersionsReader().createQuery()
+ List rev2_related = getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 2)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.add(AuditRestrictions.idEq(id2))
.getResultList();
- Object rev3_related = getVersionsReader().createQuery()
+ Object rev3_related = getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 3)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.add(AuditRestrictions.idEq(id2))
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/ids/MulIdOneToManyQuery.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/ids/MulIdOneToManyQuery.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/query/ids/MulIdOneToManyQuery.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -103,32 +103,32 @@
@Test
public void testEntitiesReferencedToId3() {
- Set rev1_related = new HashSet(getVersionsReader().createQuery()
+ Set rev1_related = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngMulIdEntity.class, 1)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.getResultList());
- Set rev1 = new HashSet(getVersionsReader().createQuery()
+ Set rev1 = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngMulIdEntity.class, 1)
.add(AuditRestrictions.eq("reference", new
SetRefEdMulIdEntity(id3, null)))
.getResultList());
- Set rev2_related = new HashSet(getVersionsReader().createQuery()
+ Set rev2_related = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngMulIdEntity.class, 2)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.getResultList());
- Set rev2 = new HashSet(getVersionsReader().createQuery()
+ Set rev2 = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngMulIdEntity.class, 2)
.add(AuditRestrictions.eq("reference", new
SetRefEdMulIdEntity(id3, null)))
.getResultList());
- Set rev3_related = new HashSet(getVersionsReader().createQuery()
+ Set rev3_related = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngMulIdEntity.class, 3)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.getResultList());
- Set rev3 = new HashSet(getVersionsReader().createQuery()
+ Set rev3 = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngMulIdEntity.class, 3)
.add(AuditRestrictions.eq("reference", new
SetRefEdMulIdEntity(id3, null)))
.getResultList());
@@ -145,17 +145,17 @@
@Test
public void testEntitiesReferencedToId4() {
- Set rev1_related = new HashSet(getVersionsReader().createQuery()
+ Set rev1_related = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngMulIdEntity.class, 1)
.add(AuditRestrictions.relatedIdEq("reference", id4))
.getResultList());
- Set rev2_related = new HashSet(getVersionsReader().createQuery()
+ Set rev2_related = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngMulIdEntity.class, 2)
.add(AuditRestrictions.relatedIdEq("reference", id4))
.getResultList());
- Set rev3_related = new HashSet(getVersionsReader().createQuery()
+ Set rev3_related = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngMulIdEntity.class, 3)
.add(AuditRestrictions.relatedIdEq("reference", id4))
.getResultList());
@@ -167,19 +167,19 @@
@Test
public void testEntitiesReferencedByIng1ToId3() {
- List rev1_related = getVersionsReader().createQuery()
+ List rev1_related = getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngMulIdEntity.class, 1)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.add(AuditRestrictions.idEq(id1))
.getResultList();
- Object rev2_related = getVersionsReader().createQuery()
+ Object rev2_related = getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngMulIdEntity.class, 2)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.add(AuditRestrictions.idEq(id1))
.getSingleResult();
- Object rev3_related = getVersionsReader().createQuery()
+ Object rev3_related = getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngMulIdEntity.class, 3)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.add(AuditRestrictions.idEq(id1))
@@ -192,19 +192,19 @@
@Test
public void testEntitiesReferencedByIng2ToId3() {
- List rev1_related = getVersionsReader().createQuery()
+ List rev1_related = getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngMulIdEntity.class, 1)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.add(AuditRestrictions.idEq(id2))
.getResultList();
- List rev2_related = getVersionsReader().createQuery()
+ List rev2_related = getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngMulIdEntity.class, 2)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.add(AuditRestrictions.idEq(id2))
.getResultList();
- Object rev3_related = getVersionsReader().createQuery()
+ Object rev3_related = getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngMulIdEntity.class, 3)
.add(AuditRestrictions.relatedIdEq("reference", id3))
.add(AuditRestrictions.idEq(id2))
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/Custom.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/Custom.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/Custom.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -80,25 +80,25 @@
@Test(expectedExceptions = RevisionDoesNotExistException.class)
public void testTimestamps1() {
- getVersionsReader().getRevisionNumberForDate(new Date(timestamp1));
+ getAuditReader().getRevisionNumberForDate(new Date(timestamp1));
}
@Test
public void testTimestamps() {
- assert getVersionsReader().getRevisionNumberForDate(new
Date(timestamp2)).intValue() == 1;
- assert getVersionsReader().getRevisionNumberForDate(new
Date(timestamp3)).intValue() == 2;
+ assert getAuditReader().getRevisionNumberForDate(new Date(timestamp2)).intValue()
== 1;
+ assert getAuditReader().getRevisionNumberForDate(new Date(timestamp3)).intValue()
== 2;
}
@Test
public void testDatesForRevisions() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
assert vr.getRevisionNumberForDate(vr.getRevisionDate(1)).intValue() == 1;
assert vr.getRevisionNumberForDate(vr.getRevisionDate(2)).intValue() == 2;
}
@Test
public void testRevisionsForDates() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
assert vr.getRevisionDate(vr.getRevisionNumberForDate(new
Date(timestamp2))).getTime() <= timestamp2;
assert vr.getRevisionDate(vr.getRevisionNumberForDate(new
Date(timestamp2)).intValue()+1).getTime() > timestamp2;
@@ -108,7 +108,7 @@
@Test
public void testFindRevision() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
long rev1Timestamp = vr.findRevision(CustomRevEntity.class,
1).getCustomTimestamp();
assert rev1Timestamp > timestamp1;
@@ -121,7 +121,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(StrTestEntity.class, id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(StrTestEntity.class, id));
}
@Test
@@ -129,7 +129,7 @@
StrTestEntity ver1 = new StrTestEntity("x", id);
StrTestEntity ver2 = new StrTestEntity("y", id);
- assert getVersionsReader().find(StrTestEntity.class, id, 1).equals(ver1);
- assert getVersionsReader().find(StrTestEntity.class, id, 2).equals(ver2);
+ assert getAuditReader().find(StrTestEntity.class, id, 1).equals(ver1);
+ assert getAuditReader().find(StrTestEntity.class, id, 2).equals(ver2);
}
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/CustomBoxed.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/CustomBoxed.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/CustomBoxed.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -79,25 +79,25 @@
@Test(expectedExceptions = RevisionDoesNotExistException.class)
public void testTimestamps1() {
- getVersionsReader().getRevisionNumberForDate(new Date(timestamp1));
+ getAuditReader().getRevisionNumberForDate(new Date(timestamp1));
}
@Test
public void testTimestamps() {
- assert getVersionsReader().getRevisionNumberForDate(new
Date(timestamp2)).intValue() == 1;
- assert getVersionsReader().getRevisionNumberForDate(new
Date(timestamp3)).intValue() == 2;
+ assert getAuditReader().getRevisionNumberForDate(new Date(timestamp2)).intValue()
== 1;
+ assert getAuditReader().getRevisionNumberForDate(new Date(timestamp3)).intValue()
== 2;
}
@Test
public void testDatesForRevisions() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
assert vr.getRevisionNumberForDate(vr.getRevisionDate(1)).intValue() == 1;
assert vr.getRevisionNumberForDate(vr.getRevisionDate(2)).intValue() == 2;
}
@Test
public void testRevisionsForDates() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
assert vr.getRevisionDate(vr.getRevisionNumberForDate(new
Date(timestamp2))).getTime() <= timestamp2;
assert vr.getRevisionDate(vr.getRevisionNumberForDate(new
Date(timestamp2)).intValue()+1).getTime() > timestamp2;
@@ -107,7 +107,7 @@
@Test
public void testFindRevision() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
long rev1Timestamp = vr.findRevision(CustomBoxedRevEntity.class,
1).getCustomTimestamp();
assert rev1Timestamp > timestamp1;
@@ -120,7 +120,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(StrTestEntity.class, id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(StrTestEntity.class, id));
}
@Test
@@ -128,7 +128,7 @@
StrTestEntity ver1 = new StrTestEntity("x", id);
StrTestEntity ver2 = new StrTestEntity("y", id);
- assert getVersionsReader().find(StrTestEntity.class, id, 1).equals(ver1);
- assert getVersionsReader().find(StrTestEntity.class, id, 2).equals(ver2);
+ assert getAuditReader().find(StrTestEntity.class, id, 1).equals(ver1);
+ assert getAuditReader().find(StrTestEntity.class, id, 2).equals(ver2);
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/CustomPropertyAccess.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/CustomPropertyAccess.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/CustomPropertyAccess.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -80,25 +80,25 @@
@Test(expectedExceptions = RevisionDoesNotExistException.class)
public void testTimestamps1() {
- getVersionsReader().getRevisionNumberForDate(new Date(timestamp1));
+ getAuditReader().getRevisionNumberForDate(new Date(timestamp1));
}
@Test
public void testTimestamps() {
- assert getVersionsReader().getRevisionNumberForDate(new
Date(timestamp2)).intValue() == 1;
- assert getVersionsReader().getRevisionNumberForDate(new
Date(timestamp3)).intValue() == 2;
+ assert getAuditReader().getRevisionNumberForDate(new Date(timestamp2)).intValue()
== 1;
+ assert getAuditReader().getRevisionNumberForDate(new Date(timestamp3)).intValue()
== 2;
}
@Test
public void testDatesForRevisions() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
assert vr.getRevisionNumberForDate(vr.getRevisionDate(1)).intValue() == 1;
assert vr.getRevisionNumberForDate(vr.getRevisionDate(2)).intValue() == 2;
}
@Test
public void testRevisionsForDates() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
assert vr.getRevisionDate(vr.getRevisionNumberForDate(new
Date(timestamp2))).getTime() <= timestamp2;
assert vr.getRevisionDate(vr.getRevisionNumberForDate(new
Date(timestamp2)).intValue()+1).getTime() > timestamp2;
@@ -108,7 +108,7 @@
@Test
public void testFindRevision() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
long rev1Timestamp = vr.findRevision(CustomPropertyAccessRevEntity.class,
1).getCustomTimestamp();
assert rev1Timestamp > timestamp1;
@@ -121,7 +121,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(StrTestEntity.class, id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(StrTestEntity.class, id));
}
@Test
@@ -129,7 +129,7 @@
StrTestEntity ver1 = new StrTestEntity("x", id);
StrTestEntity ver2 = new StrTestEntity("y", id);
- assert getVersionsReader().find(StrTestEntity.class, id, 1).equals(ver1);
- assert getVersionsReader().find(StrTestEntity.class, id, 2).equals(ver2);
+ assert getAuditReader().find(StrTestEntity.class, id, 1).equals(ver1);
+ assert getAuditReader().find(StrTestEntity.class, id, 2).equals(ver2);
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/Inherited.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/Inherited.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/Inherited.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -79,25 +79,25 @@
@Test(expectedExceptions = RevisionDoesNotExistException.class)
public void testTimestamps1() {
- getVersionsReader().getRevisionNumberForDate(new Date(timestamp1));
+ getAuditReader().getRevisionNumberForDate(new Date(timestamp1));
}
@Test
public void testTimestamps() {
- assert getVersionsReader().getRevisionNumberForDate(new
Date(timestamp2)).intValue() == 1;
- assert getVersionsReader().getRevisionNumberForDate(new
Date(timestamp3)).intValue() == 2;
+ assert getAuditReader().getRevisionNumberForDate(new Date(timestamp2)).intValue()
== 1;
+ assert getAuditReader().getRevisionNumberForDate(new Date(timestamp3)).intValue()
== 2;
}
@Test
public void testDatesForRevisions() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
assert vr.getRevisionNumberForDate(vr.getRevisionDate(1)).intValue() == 1;
assert vr.getRevisionNumberForDate(vr.getRevisionDate(2)).intValue() == 2;
}
@Test
public void testRevisionsForDates() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
assert vr.getRevisionDate(vr.getRevisionNumberForDate(new
Date(timestamp2))).getTime() <= timestamp2;
assert vr.getRevisionDate(vr.getRevisionNumberForDate(new
Date(timestamp2)).intValue()+1).getTime() > timestamp2;
@@ -107,7 +107,7 @@
@Test
public void testFindRevision() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
long rev1Timestamp = vr.findRevision(InheritedRevEntity.class,
1).getTimestamp();
assert rev1Timestamp > timestamp1;
@@ -120,7 +120,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(StrTestEntity.class, id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(StrTestEntity.class, id));
}
@Test
@@ -128,7 +128,7 @@
StrTestEntity ver1 = new StrTestEntity("x", id);
StrTestEntity ver2 = new StrTestEntity("y", id);
- assert getVersionsReader().find(StrTestEntity.class, id, 1).equals(ver1);
- assert getVersionsReader().find(StrTestEntity.class, id, 2).equals(ver2);
+ assert getAuditReader().find(StrTestEntity.class, id, 1).equals(ver1);
+ assert getAuditReader().find(StrTestEntity.class, id, 2).equals(ver2);
}
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/Listener.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/Listener.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/Listener.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -85,25 +85,25 @@
@Test(expectedExceptions = RevisionDoesNotExistException.class)
public void testTimestamps1() {
- getVersionsReader().getRevisionNumberForDate(new Date(timestamp1));
+ getAuditReader().getRevisionNumberForDate(new Date(timestamp1));
}
@Test
public void testTimestamps() {
- assert getVersionsReader().getRevisionNumberForDate(new
Date(timestamp2)).intValue() == 1;
- assert getVersionsReader().getRevisionNumberForDate(new
Date(timestamp3)).intValue() == 2;
+ assert getAuditReader().getRevisionNumberForDate(new Date(timestamp2)).intValue()
== 1;
+ assert getAuditReader().getRevisionNumberForDate(new Date(timestamp3)).intValue()
== 2;
}
@Test
public void testDatesForRevisions() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
assert vr.getRevisionNumberForDate(vr.getRevisionDate(1)).intValue() == 1;
assert vr.getRevisionNumberForDate(vr.getRevisionDate(2)).intValue() == 2;
}
@Test
public void testRevisionsForDates() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
assert vr.getRevisionDate(vr.getRevisionNumberForDate(new
Date(timestamp2))).getTime() <= timestamp2;
assert vr.getRevisionDate(vr.getRevisionNumberForDate(new
Date(timestamp2)).intValue()+1).getTime() > timestamp2;
@@ -113,7 +113,7 @@
@Test
public void testFindRevision() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
ListenerRevEntity rev1Data = vr.findRevision(ListenerRevEntity.class, 1);
ListenerRevEntity rev2Data = vr.findRevision(ListenerRevEntity.class, 2);
@@ -133,7 +133,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(StrTestEntity.class, id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(StrTestEntity.class, id));
}
@Test
@@ -141,7 +141,7 @@
StrTestEntity ver1 = new StrTestEntity("x", id);
StrTestEntity ver2 = new StrTestEntity("y", id);
- assert getVersionsReader().find(StrTestEntity.class, id, 1).equals(ver1);
- assert getVersionsReader().find(StrTestEntity.class, id, 2).equals(ver2);
+ assert getAuditReader().find(StrTestEntity.class, id, 1).equals(ver1);
+ assert getAuditReader().find(StrTestEntity.class, id, 2).equals(ver2);
}
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/LongRevNumber.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/LongRevNumber.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/LongRevNumber.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -64,7 +64,7 @@
@Test
public void testFindRevision() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
assert vr.findRevision(LongRevNumberRevEntity.class, 1l).getCustomId() == 1l;
assert vr.findRevision(LongRevNumberRevEntity.class, 2l).getCustomId() == 2l;
@@ -72,7 +72,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1l,
2l).equals(getVersionsReader().getRevisions(StrTestEntity.class, id));
+ assert Arrays.asList(1l,
2l).equals(getAuditReader().getRevisions(StrTestEntity.class, id));
}
@Test
@@ -80,7 +80,7 @@
StrTestEntity ver1 = new StrTestEntity("x", id);
StrTestEntity ver2 = new StrTestEntity("y", id);
- assert getVersionsReader().find(StrTestEntity.class, id, 1l).equals(ver1);
- assert getVersionsReader().find(StrTestEntity.class, id, 2l).equals(ver2);
+ assert getAuditReader().find(StrTestEntity.class, id, 1l).equals(ver1);
+ assert getAuditReader().find(StrTestEntity.class, id, 2l).equals(ver2);
}
}
\ No newline at end of file
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/revfordate/RevisionForDate.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/revfordate/RevisionForDate.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/revfordate/RevisionForDate.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -87,19 +87,19 @@
@Test(expectedExceptions = RevisionDoesNotExistException.class)
public void testTimestamps1() {
- getVersionsReader().getRevisionNumberForDate(new Date(timestamp1));
+ getAuditReader().getRevisionNumberForDate(new Date(timestamp1));
}
@Test
public void testTimestamps() {
- assert getVersionsReader().getRevisionNumberForDate(new
Date(timestamp2)).intValue() == 1;
- assert getVersionsReader().getRevisionNumberForDate(new
Date(timestamp3)).intValue() == 2;
- assert getVersionsReader().getRevisionNumberForDate(new
Date(timestamp4)).intValue() == 3;
+ assert getAuditReader().getRevisionNumberForDate(new Date(timestamp2)).intValue()
== 1;
+ assert getAuditReader().getRevisionNumberForDate(new Date(timestamp3)).intValue()
== 2;
+ assert getAuditReader().getRevisionNumberForDate(new Date(timestamp4)).intValue()
== 3;
}
@Test
public void testDatesForRevisions() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
assert vr.getRevisionNumberForDate(vr.getRevisionDate(1)).intValue() == 1;
assert vr.getRevisionNumberForDate(vr.getRevisionDate(2)).intValue() == 2;
assert vr.getRevisionNumberForDate(vr.getRevisionDate(3)).intValue() == 3;
@@ -107,7 +107,7 @@
@Test
public void testRevisionsForDates() {
- AuditReader vr = getVersionsReader();
+ AuditReader vr = getAuditReader();
assert vr.getRevisionDate(vr.getRevisionNumberForDate(new
Date(timestamp2))).getTime() <= timestamp2;
assert vr.getRevisionDate(vr.getRevisionNumberForDate(new
Date(timestamp2)).intValue()+1).getTime() > timestamp2;
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/sameids/SameIds.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/sameids/SameIds.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/sameids/SameIds.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -64,8 +64,8 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(SameIdTestEntity1.class, 1));
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(SameIdTestEntity2.class, 1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(SameIdTestEntity1.class, 1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(SameIdTestEntity2.class, 1));
}
@Test
@@ -73,8 +73,8 @@
SameIdTestEntity1 ver1 = new SameIdTestEntity1(1, "str1");
SameIdTestEntity1 ver2 = new SameIdTestEntity1(1, "str2");
- assert getVersionsReader().find(SameIdTestEntity1.class, 1, 1).equals(ver1);
- assert getVersionsReader().find(SameIdTestEntity1.class, 1, 2).equals(ver2);
+ assert getAuditReader().find(SameIdTestEntity1.class, 1, 1).equals(ver1);
+ assert getAuditReader().find(SameIdTestEntity1.class, 1, 2).equals(ver2);
}
@Test
@@ -82,7 +82,7 @@
SameIdTestEntity2 ver1 = new SameIdTestEntity2(1, "str1");
SameIdTestEntity2 ver2 = new SameIdTestEntity2(1, "str2");
- assert getVersionsReader().find(SameIdTestEntity2.class, 1, 1).equals(ver1);
- assert getVersionsReader().find(SameIdTestEntity2.class, 1, 2).equals(ver2);
+ assert getAuditReader().find(SameIdTestEntity2.class, 1, 1).equals(ver1);
+ assert getAuditReader().find(SameIdTestEntity2.class, 1, 2).equals(ver2);
}
}
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/secondary/BasicSecondary.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/secondary/BasicSecondary.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/secondary/BasicSecondary.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -72,7 +72,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(SecondaryTestEntity.class, id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(SecondaryTestEntity.class, id));
}
@Test
@@ -80,8 +80,8 @@
SecondaryTestEntity ver1 = new SecondaryTestEntity(id, "a",
"1");
SecondaryTestEntity ver2 = new SecondaryTestEntity(id, "b",
"2");
- assert getVersionsReader().find(SecondaryTestEntity.class, id, 1).equals(ver1);
- assert getVersionsReader().find(SecondaryTestEntity.class, id, 2).equals(ver2);
+ assert getAuditReader().find(SecondaryTestEntity.class, id, 1).equals(ver1);
+ assert getAuditReader().find(SecondaryTestEntity.class, id, 2).equals(ver2);
}
@SuppressWarnings({"unchecked"})
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/secondary/NamingSecondary.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/secondary/NamingSecondary.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/secondary/NamingSecondary.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -72,7 +72,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(SecondaryNamingTestEntity.class, id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(SecondaryNamingTestEntity.class, id));
}
@Test
@@ -80,8 +80,8 @@
SecondaryNamingTestEntity ver1 = new SecondaryNamingTestEntity(id, "a",
"1");
SecondaryNamingTestEntity ver2 = new SecondaryNamingTestEntity(id, "b",
"2");
- assert getVersionsReader().find(SecondaryNamingTestEntity.class, id,
1).equals(ver1);
- assert getVersionsReader().find(SecondaryNamingTestEntity.class, id,
2).equals(ver2);
+ assert getAuditReader().find(SecondaryNamingTestEntity.class, id,
1).equals(ver1);
+ assert getAuditReader().find(SecondaryNamingTestEntity.class, id,
2).equals(ver2);
}
@SuppressWarnings({"unchecked"})
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/secondary/ids/EmbIdSecondary.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/secondary/ids/EmbIdSecondary.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/secondary/ids/EmbIdSecondary.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -71,7 +71,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(SecondaryEmbIdTestEntity.class, id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(SecondaryEmbIdTestEntity.class, id));
}
@Test
@@ -79,8 +79,8 @@
SecondaryEmbIdTestEntity ver1 = new SecondaryEmbIdTestEntity(id, "a",
"1");
SecondaryEmbIdTestEntity ver2 = new SecondaryEmbIdTestEntity(id, "b",
"2");
- assert getVersionsReader().find(SecondaryEmbIdTestEntity.class, id,
1).equals(ver1);
- assert getVersionsReader().find(SecondaryEmbIdTestEntity.class, id,
2).equals(ver2);
+ assert getAuditReader().find(SecondaryEmbIdTestEntity.class, id,
1).equals(ver1);
+ assert getAuditReader().find(SecondaryEmbIdTestEntity.class, id,
2).equals(ver2);
}
@SuppressWarnings({"unchecked"})
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/secondary/ids/MulIdSecondary.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/secondary/ids/MulIdSecondary.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/secondary/ids/MulIdSecondary.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -71,7 +71,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(SecondaryMulIdTestEntity.class, id));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(SecondaryMulIdTestEntity.class, id));
}
@Test
@@ -79,8 +79,8 @@
SecondaryMulIdTestEntity ver1 = new SecondaryMulIdTestEntity(id, "a",
"1");
SecondaryMulIdTestEntity ver2 = new SecondaryMulIdTestEntity(id, "b",
"2");
- assert getVersionsReader().find(SecondaryMulIdTestEntity.class, id,
1).equals(ver1);
- assert getVersionsReader().find(SecondaryMulIdTestEntity.class, id,
2).equals(ver2);
+ assert getAuditReader().find(SecondaryMulIdTestEntity.class, id,
1).equals(ver1);
+ assert getAuditReader().find(SecondaryMulIdTestEntity.class, id,
2).equals(ver2);
}
@SuppressWarnings({"unchecked"})
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/superclass/MappedSubclassing.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/superclass/MappedSubclassing.java 2008-11-05
09:13:05 UTC (rev 15517)
+++
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/superclass/MappedSubclassing.java 2008-11-05
09:17:10 UTC (rev 15518)
@@ -61,7 +61,7 @@
@Test
public void testRevisionsCounts() {
- assert Arrays.asList(1,
2).equals(getVersionsReader().getRevisions(SubclassEntity.class, id1));
+ assert Arrays.asList(1,
2).equals(getAuditReader().getRevisions(SubclassEntity.class, id1));
}
@Test
@@ -69,7 +69,7 @@
SubclassEntity ver1 = new SubclassEntity(id1, "x");
SubclassEntity ver2 = new SubclassEntity(id1, "y");
- assert getVersionsReader().find(SubclassEntity.class, id1, 1).equals(ver1);
- assert getVersionsReader().find(SubclassEntity.class, id1, 2).equals(ver2);
+ assert getAuditReader().find(SubclassEntity.class, id1, 1).equals(ver1);
+ assert getAuditReader().find(SubclassEntity.class, id1, 2).equals(ver2);
}
}