Author: adamw
Date: 2010-01-07 09:51:20 -0500 (Thu, 07 Jan 2010)
New Revision: 18432
Added:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java
core/branches/envers-hibernate-3.3/src/test/resources/mappings/
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml
Removed:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml
Modified:
core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/reader/AuditedPropertiesReader.java
core/branches/envers-hibernate-3.3/src/test/resources/testng.xml
Log:
svn merge -r 18239:18431
https://svn.jboss.org/repos/hibernate/core/trunk/envers .
Modified:
core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/reader/AuditedPropertiesReader.java
===================================================================
---
core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/reader/AuditedPropertiesReader.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/reader/AuditedPropertiesReader.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -81,7 +81,7 @@
private void addPropertiesFromClass(XClass clazz) {
XClass superclazz = clazz.getSuperclass();
- if (!"java.lang.Object".equals(superclazz.getName())) {
+ if (!clazz.isInterface() &&
!"java.lang.Object".equals(superclazz.getName())) {
addPropertiesFromClass(superclazz);
}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm)
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited)
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,122 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
-
-import javax.persistence.EntityManager;
-
-import org.hibernate.envers.exception.NotAuditedException;
-import org.hibernate.envers.test.AbstractEntityTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-import org.testng.Assert;
-
-import java.util.Arrays;
-
-/**
- * @author Hern�n Chanfreau
- * @author Adam Warski (adam at warski dot org)
- */
-public abstract class AbstractAllAuditedTest extends AbstractEntityTest {
-
- private long ai_id;
- private long nai_id;
-
- @BeforeClass(dependsOnMethods = "init")
- public void initData() {
- EntityManager em = getEntityManager();
-
- AuditedImplementor ai = new AuditedImplementor();
- ai.setData("La data");
- ai.setAuditedImplementorData("audited implementor data");
-
- NonAuditedImplementor nai = new NonAuditedImplementor();
- nai.setData("info");
- nai.setNonAuditedImplementorData("sttring");
-
- // Revision 1
- em.getTransaction().begin();
-
- em.persist(ai);
-
- em.persist(nai);
-
- em.getTransaction().commit();
-
- // Revision 2
- em.getTransaction().begin();
-
- ai = em.find(AuditedImplementor.class, ai.getId());
- nai = em.find(NonAuditedImplementor.class, nai.getId());
-
- ai.setData("La data 2");
- ai.setAuditedImplementorData("audited implementor data 2");
-
- nai.setData("info 2");
- nai.setNonAuditedImplementorData("sttring 2");
-
- em.getTransaction().commit();
-
- //
-
- ai_id = ai.getId();
- nai_id = nai.getId();
- }
-
- @Test
- public void testRevisions() {
- Assert.assertEquals(getAuditReader().getRevisions(AuditedImplementor.class,
ai_id), Arrays.asList(1, 2));
- }
-
- @Test
- public void testRetrieveAudited() {
- // levanto las versiones actuales
- AuditedImplementor ai = getEntityManager().find(AuditedImplementor.class, ai_id);
- assert ai != null;
- SimpleInterface si = getEntityManager().find(SimpleInterface.class, ai_id);
- assert si != null;
-
- // levanto las de la revisi�n 1, ninguna debe ser null
- AuditedImplementor ai_rev1 = getAuditReader().find(AuditedImplementor.class, ai_id,
1);
- assert ai_rev1 != null;
- SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class, ai_id, 1);
- assert si_rev1 != null;
-
- AuditedImplementor ai_rev2 = getAuditReader().find(AuditedImplementor.class,
ai_id, 2);
- assert ai_rev2 != null;
- SimpleInterface si_rev2 = getAuditReader().find(SimpleInterface.class, ai_id, 2);
- assert si_rev2 != null;
-
- // data de las actuales no debe ser null
- Assert.assertEquals(ai.getData(), "La data 2");
- Assert.assertEquals(si.getData(), "La data 2");
- // la data de las revisiones no debe ser null
- Assert.assertEquals(ai_rev1.getData(), "La data");
- Assert.assertEquals(si_rev1.getData(), "La data");
-
- Assert.assertEquals(ai_rev2.getData(), "La data 2");
- Assert.assertEquals(si_rev2.getData(), "La data 2");
- }
-
- @Test
- public void testRetrieveNonAudited() {
- // levanto las versiones actuales
- NonAuditedImplementor nai = getEntityManager().find(NonAuditedImplementor.class,
nai_id);
- assert nai != null;
- SimpleInterface si = getEntityManager().find(SimpleInterface.class, nai_id);
- assert si != null;
-
- assert si.getData().equals(nai.getData());
-
- try {
- // levanto la revision
- getAuditReader().find(NonAuditedImplementor.class, nai_id, 1);
- assert false;
- } catch (Exception e) {
- // no es auditable!!!
- assert (e instanceof NotAuditedException);
- }
-
- // levanto la revision que no es auditable pero con la interfaz, el resultado debe
ser null
- SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class, nai_id, 1);
- assert si_rev1 == null;
-
- }
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,122 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
+
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.exception.NotAuditedException;
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import org.testng.Assert;
+
+import java.util.Arrays;
+
+/**
+ * @author Hern�n Chanfreau
+ * @author Adam Warski (adam at warski dot org)
+ */
+public abstract class AbstractAllAuditedTest extends AbstractEntityTest {
+
+ private long ai_id;
+ private long nai_id;
+
+ @BeforeClass(dependsOnMethods = "init")
+ public void initData() {
+ EntityManager em = getEntityManager();
+
+ AuditedImplementor ai = new AuditedImplementor();
+ ai.setData("La data");
+ ai.setAuditedImplementorData("audited implementor data");
+
+ NonAuditedImplementor nai = new NonAuditedImplementor();
+ nai.setData("info");
+ nai.setNonAuditedImplementorData("sttring");
+
+ // Revision 1
+ em.getTransaction().begin();
+
+ em.persist(ai);
+
+ em.persist(nai);
+
+ em.getTransaction().commit();
+
+ // Revision 2
+ em.getTransaction().begin();
+
+ ai = em.find(AuditedImplementor.class, ai.getId());
+ nai = em.find(NonAuditedImplementor.class, nai.getId());
+
+ ai.setData("La data 2");
+ ai.setAuditedImplementorData("audited implementor data 2");
+
+ nai.setData("info 2");
+ nai.setNonAuditedImplementorData("sttring 2");
+
+ em.getTransaction().commit();
+
+ //
+
+ ai_id = ai.getId();
+ nai_id = nai.getId();
+ }
+
+ @Test
+ public void testRevisions() {
+ Assert.assertEquals(getAuditReader().getRevisions(AuditedImplementor.class,
ai_id), Arrays.asList(1, 2));
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ // levanto las versiones actuales
+ AuditedImplementor ai = getEntityManager().find(AuditedImplementor.class, ai_id);
+ assert ai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class, ai_id);
+ assert si != null;
+
+ // levanto las de la revisi�n 1, ninguna debe ser null
+ AuditedImplementor ai_rev1 = getAuditReader().find(AuditedImplementor.class, ai_id,
1);
+ assert ai_rev1 != null;
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class, ai_id, 1);
+ assert si_rev1 != null;
+
+ AuditedImplementor ai_rev2 = getAuditReader().find(AuditedImplementor.class,
ai_id, 2);
+ assert ai_rev2 != null;
+ SimpleInterface si_rev2 = getAuditReader().find(SimpleInterface.class, ai_id, 2);
+ assert si_rev2 != null;
+
+ // data de las actuales no debe ser null
+ Assert.assertEquals(ai.getData(), "La data 2");
+ Assert.assertEquals(si.getData(), "La data 2");
+ // la data de las revisiones no debe ser null
+ Assert.assertEquals(ai_rev1.getData(), "La data");
+ Assert.assertEquals(si_rev1.getData(), "La data");
+
+ Assert.assertEquals(ai_rev2.getData(), "La data 2");
+ Assert.assertEquals(si_rev2.getData(), "La data 2");
+ }
+
+ @Test
+ public void testRetrieveNonAudited() {
+ // levanto las versiones actuales
+ NonAuditedImplementor nai = getEntityManager().find(NonAuditedImplementor.class,
nai_id);
+ assert nai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class, nai_id);
+ assert si != null;
+
+ assert si.getData().equals(nai.getData());
+
+ try {
+ // levanto la revision
+ getAuditReader().find(NonAuditedImplementor.class, nai_id, 1);
+ assert false;
+ } catch (Exception e) {
+ // no es auditable!!!
+ assert (e instanceof NotAuditedException);
+ }
+
+ // levanto la revision que no es auditable pero con la interfaz, el resultado debe
ser null
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class, nai_id, 1);
+ assert si_rev1 == null;
+
+ }
+}
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,47 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
-
-import org.hibernate.envers.Audited;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-@Audited
-public class AuditedImplementor implements SimpleInterface {
-
- private long id;
-
- private String data;
-
- private String auditedImplementorData;
-
-
- protected AuditedImplementor() {
-
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getData() {
- return data;
- }
-
- public void setData(String data) {
- this.data = data;
- }
-
- public String getAuditedImplementorData() {
- return auditedImplementorData;
- }
-
- public void setAuditedImplementorData(String implementorData) {
- this.auditedImplementorData = implementorData;
- }
-
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,47 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+@Audited
+public class AuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String auditedImplementorData;
+
+
+ protected AuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getAuditedImplementorData() {
+ return auditedImplementorData;
+ }
+
+ public void setAuditedImplementorData(String implementorData) {
+ this.auditedImplementorData = implementorData;
+ }
+
+}
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,45 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
-
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-public class NonAuditedImplementor implements SimpleInterface {
-
- private long id;
-
- private String data;
-
- private String nonAuditedImplementorData;
-
-
- protected NonAuditedImplementor() {
-
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getData() {
- return data;
- }
-
- public void setData(String data) {
- this.data = data;
- }
-
- public String getNonAuditedImplementorData() {
- return nonAuditedImplementorData;
- }
-
- public void setNonAuditedImplementorData(String implementorData) {
- this.nonAuditedImplementorData = implementorData;
- }
-
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,45 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
+
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+public class NonAuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String nonAuditedImplementorData;
+
+
+ protected NonAuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getNonAuditedImplementorData() {
+ return nonAuditedImplementorData;
+ }
+
+ public void setNonAuditedImplementorData(String implementorData) {
+ this.nonAuditedImplementorData = implementorData;
+ }
+
+}
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,20 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
-
-import org.hibernate.envers.Audited;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-@Audited
-public interface SimpleInterface {
-
- long getId();
-
- void setId(long id);
-
- String getData();
-
- void setData(String data);
-
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,20 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+@Audited
+public interface SimpleInterface {
+
+ long getId();
+
+ void setId(long id);
+
+ String getData();
+
+ void setData(String data);
+
+}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined)
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,43 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.allAudited.joined;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import
org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AbstractAllAuditedTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-public class JoinedAllAuditedTest extends AbstractAllAuditedTest {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/joinedAllAuditedMappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
- @Test
- @Override
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-
- @Test
- @Override
- public void testRetrieveNonAudited() {
- super.testRetrieveNonAudited();
- }
-
- @Test
- @Override
- public void testRevisions() {
- super.testRevisions();
- }
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,43 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited.joined;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import
org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AbstractAllAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+public class JoinedAllAuditedTest extends AbstractAllAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/joinedAllAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ @Override
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+
+ @Test
+ @Override
+ public void testRetrieveNonAudited() {
+ super.testRetrieveNonAudited();
+ }
+
+ @Test
+ @Override
+ public void testRevisions() {
+ super.testRevisions();
+ }
+}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass)
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,44 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.allAudited.subclass;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import
org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AbstractAllAuditedTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-public class SubclassAllAuditedTest extends AbstractAllAuditedTest {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/subclassAllAuditedMappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
- @Test
- @Override
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-
- @Test
- @Override
- public void testRetrieveNonAudited() {
- super.testRetrieveNonAudited();
- }
-
- @Test
- @Override
- public void testRevisions() {
- super.testRevisions();
- }
-
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,44 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited.subclass;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import
org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AbstractAllAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+public class SubclassAllAuditedTest extends AbstractAllAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/subclassAllAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ @Override
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+
+ @Test
+ @Override
+ public void testRetrieveNonAudited() {
+ super.testRetrieveNonAudited();
+ }
+
+ @Test
+ @Override
+ public void testRevisions() {
+ super.testRevisions();
+ }
+
+}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union)
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,43 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.allAudited.union;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import
org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AbstractAllAuditedTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-public class UnionAllAuditedTest extends AbstractAllAuditedTest {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/unionAllAuditedMappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
- @Test
- @Override
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-
- @Test
- @Override
- public void testRetrieveNonAudited() {
- super.testRetrieveNonAudited();
- }
-
- @Test
- @Override
- public void testRevisions() {
- super.testRevisions();
- }
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,43 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited.union;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import
org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AbstractAllAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+public class UnionAllAuditedTest extends AbstractAllAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/unionAllAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ @Override
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+
+ @Test
+ @Override
+ public void testRetrieveNonAudited() {
+ super.testRetrieveNonAudited();
+ }
+
+ @Test
+ @Override
+ public void testRevisions() {
+ super.testRevisions();
+ }
+}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited)
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,109 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
-
-import javax.persistence.EntityManager;
-
-import org.hibernate.envers.exception.NotAuditedException;
-import org.hibernate.envers.test.AbstractEntityTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public abstract class AbstractPropertiesAuditedTest extends AbstractEntityTest {
-
- private long ai_id;
- private long nai_id;
-
- private static int NUMERITO = 555;
-
- @BeforeClass(dependsOnMethods = "init")
- public void initData() {
- EntityManager em = getEntityManager();
-
- AuditedImplementor ai = new AuditedImplementor();
- ai.setData("La data");
- ai.setAuditedImplementorData("audited implementor data");
- ai.setNumerito(NUMERITO);
-
- NonAuditedImplementor nai = new NonAuditedImplementor();
- nai.setData("info");
- nai.setNonAuditedImplementorData("sttring");
- nai.setNumerito(NUMERITO);
-
- // Revision 1
- em.getTransaction().begin();
-
- em.persist(ai);
-
- em.persist(nai);
-
- em.getTransaction().commit();
-
- // Revision 2
-
- // Revision 3
-
- ai_id = ai.getId();
- nai_id = nai.getId();
- }
-
- @Test
- public void testRetrieveAudited() {
- // levanto las versiones actuales
- AuditedImplementor ai = getEntityManager().find(
- AuditedImplementor.class, ai_id);
- assert ai != null;
- SimpleInterface si = getEntityManager().find(SimpleInterface.class,
- ai_id);
- assert si != null;
-
- // levanto las de la revisi�n 1, ninguna debe ser null
- AuditedImplementor ai_rev1 = getAuditReader().find(
- AuditedImplementor.class, ai_id, 1);
- assert ai_rev1 != null;
- SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
- ai_id, 1);
- assert si_rev1 != null;
-
- // data de las actuales no debe ser null
- assert ai.getData() != null;
- assert si.getData() != null;
- // data de las revisiones No est� auditada
- assert ai_rev1.getData() == null;
- assert si_rev1.getData() == null;
- // numerito de las revisiones est� auditada, debe ser igual a NUMERITO
- assert ai_rev1.getNumerito() == NUMERITO;
- assert si_rev1.getNumerito() == NUMERITO;
- }
-
- @Test
- public void testRetrieveNonAudited() {
- // levanto las versiones actuales
- NonAuditedImplementor nai = getEntityManager().find(
- NonAuditedImplementor.class, nai_id);
- assert nai != null;
- SimpleInterface si = getEntityManager().find(SimpleInterface.class,
- nai_id);
- assert si != null;
-
- assert si.getData().equals(nai.getData());
-
- try {
- // levanto la revision
- getAuditReader().find(NonAuditedImplementor.class, nai_id, 1);
- assert false;
- } catch (Exception e) {
- // no es auditable!!!
- assert (e instanceof NotAuditedException);
- }
-
- // levanto la revision que no es auditable pero con la interfaz, el
- // resultado debe ser null
- SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
- nai_id, 1);
- assert si_rev1 == null;
- }
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,109 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
+
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.exception.NotAuditedException;
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public abstract class AbstractPropertiesAuditedTest extends AbstractEntityTest {
+
+ private long ai_id;
+ private long nai_id;
+
+ private static int NUMERITO = 555;
+
+ @BeforeClass(dependsOnMethods = "init")
+ public void initData() {
+ EntityManager em = getEntityManager();
+
+ AuditedImplementor ai = new AuditedImplementor();
+ ai.setData("La data");
+ ai.setAuditedImplementorData("audited implementor data");
+ ai.setNumerito(NUMERITO);
+
+ NonAuditedImplementor nai = new NonAuditedImplementor();
+ nai.setData("info");
+ nai.setNonAuditedImplementorData("sttring");
+ nai.setNumerito(NUMERITO);
+
+ // Revision 1
+ em.getTransaction().begin();
+
+ em.persist(ai);
+
+ em.persist(nai);
+
+ em.getTransaction().commit();
+
+ // Revision 2
+
+ // Revision 3
+
+ ai_id = ai.getId();
+ nai_id = nai.getId();
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ // levanto las versiones actuales
+ AuditedImplementor ai = getEntityManager().find(
+ AuditedImplementor.class, ai_id);
+ assert ai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class,
+ ai_id);
+ assert si != null;
+
+ // levanto las de la revisi�n 1, ninguna debe ser null
+ AuditedImplementor ai_rev1 = getAuditReader().find(
+ AuditedImplementor.class, ai_id, 1);
+ assert ai_rev1 != null;
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
+ ai_id, 1);
+ assert si_rev1 != null;
+
+ // data de las actuales no debe ser null
+ assert ai.getData() != null;
+ assert si.getData() != null;
+ // data de las revisiones No est� auditada
+ assert ai_rev1.getData() == null;
+ assert si_rev1.getData() == null;
+ // numerito de las revisiones est� auditada, debe ser igual a NUMERITO
+ assert ai_rev1.getNumerito() == NUMERITO;
+ assert si_rev1.getNumerito() == NUMERITO;
+ }
+
+ @Test
+ public void testRetrieveNonAudited() {
+ // levanto las versiones actuales
+ NonAuditedImplementor nai = getEntityManager().find(
+ NonAuditedImplementor.class, nai_id);
+ assert nai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class,
+ nai_id);
+ assert si != null;
+
+ assert si.getData().equals(nai.getData());
+
+ try {
+ // levanto la revision
+ getAuditReader().find(NonAuditedImplementor.class, nai_id, 1);
+ assert false;
+ } catch (Exception e) {
+ // no es auditable!!!
+ assert (e instanceof NotAuditedException);
+ }
+
+ // levanto la revision que no es auditable pero con la interfaz, el
+ // resultado debe ser null
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
+ nai_id, 1);
+ assert si_rev1 == null;
+ }
+}
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,58 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
-
-import org.hibernate.envers.Audited;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-@Audited
-public class AuditedImplementor implements SimpleInterface {
-
- private long id;
-
- private String data;
-
- private String auditedImplementorData;
-
- private int numerito;
-
-
- protected AuditedImplementor() {
-
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getData() {
- return data;
- }
-
- public void setData(String data) {
- this.data = data;
- }
-
- public String getAuditedImplementorData() {
- return auditedImplementorData;
- }
-
- public void setAuditedImplementorData(String implementorData) {
- this.auditedImplementorData = implementorData;
- }
-
- public int getNumerito() {
- return numerito;
- }
-
- public void setNumerito(int numerito) {
- this.numerito = numerito;
- }
-
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,58 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+@Audited
+public class AuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String auditedImplementorData;
+
+ private int numerito;
+
+
+ protected AuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getAuditedImplementorData() {
+ return auditedImplementorData;
+ }
+
+ public void setAuditedImplementorData(String implementorData) {
+ this.auditedImplementorData = implementorData;
+ }
+
+ public int getNumerito() {
+ return numerito;
+ }
+
+ public void setNumerito(int numerito) {
+ this.numerito = numerito;
+ }
+
+}
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,54 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public class NonAuditedImplementor implements SimpleInterface {
-
- private long id;
-
- private String data;
-
- private String nonAuditedImplementorData;
-
- private int numerito;
-
-
- protected NonAuditedImplementor() {
-
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getData() {
- return data;
- }
-
- public void setData(String data) {
- this.data = data;
- }
-
- public String getNonAuditedImplementorData() {
- return nonAuditedImplementorData;
- }
-
- public void setNonAuditedImplementorData(String implementorData) {
- this.nonAuditedImplementorData = implementorData;
- }
-
- public int getNumerito() {
- return numerito;
- }
-
- public void setNumerito(int numerito) {
- this.numerito = numerito;
- }
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,54 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class NonAuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String nonAuditedImplementorData;
+
+ private int numerito;
+
+
+ protected NonAuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getNonAuditedImplementorData() {
+ return nonAuditedImplementorData;
+ }
+
+ public void setNonAuditedImplementorData(String implementorData) {
+ this.nonAuditedImplementorData = implementorData;
+ }
+
+ public int getNumerito() {
+ return numerito;
+ }
+
+ public void setNumerito(int numerito) {
+ this.numerito = numerito;
+ }
+}
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,25 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
-
-import org.hibernate.envers.Audited;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public interface SimpleInterface {
-
- long getId();
-
- void setId(long id);
-
- String getData();
-
- void setData(String data);
-
- @Audited
- int getNumerito();
-
- void setNumerito(int num);
-
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,25 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public interface SimpleInterface {
+
+ long getId();
+
+ void setId(long id);
+
+ String getData();
+
+ void setData(String data);
+
+ @Audited
+ int getNumerito();
+
+ void setNumerito(int num);
+
+}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined)
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,31 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.joined;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import
org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AbstractPropertiesAuditedTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public class JoinedPropertiesAuditedTest extends AbstractPropertiesAuditedTest {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
- @Test
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,31 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.joined;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import
org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AbstractPropertiesAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class JoinedPropertiesAuditedTest extends AbstractPropertiesAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass)
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,33 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.subclass;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import
org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AbstractPropertiesAuditedTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public class SubclassPropertiesAuditedTest extends AbstractPropertiesAuditedTest {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
-
- @Test
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,33 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.subclass;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import
org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AbstractPropertiesAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class SubclassPropertiesAuditedTest extends AbstractPropertiesAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+
+}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union)
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,31 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.union;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import
org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AbstractPropertiesAuditedTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public class UnionPropertiesAuditedTest extends AbstractPropertiesAuditedTest {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
- @Test
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,31 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.union;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import
org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AbstractPropertiesAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class UnionPropertiesAuditedTest extends AbstractPropertiesAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2)
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,109 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
-
-import javax.persistence.EntityManager;
-
-import org.hibernate.envers.exception.NotAuditedException;
-import org.hibernate.envers.test.AbstractEntityTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public abstract class AbstractPropertiesAudited2Test extends AbstractEntityTest {
-
- private long ai_id;
- private long nai_id;
-
- private static int NUMERITO = 555;
-
- @BeforeClass(dependsOnMethods = "init")
- public void initData() {
- EntityManager em = getEntityManager();
-
- AuditedImplementor ai = new AuditedImplementor();
- ai.setData("La data");
- ai.setAuditedImplementorData("audited implementor data");
- ai.setNumerito(NUMERITO);
-
- NonAuditedImplementor nai = new NonAuditedImplementor();
- nai.setData("info");
- nai.setNonAuditedImplementorData("sttring");
- nai.setNumerito(NUMERITO);
-
- // Revision 1
- em.getTransaction().begin();
-
- em.persist(ai);
-
- em.persist(nai);
-
- em.getTransaction().commit();
-
- // Revision 2
-
- // Revision 3
-
- ai_id = ai.getId();
- nai_id = nai.getId();
- }
-
- @Test
- public void testRetrieveAudited() {
- // levanto las versiones actuales
- AuditedImplementor ai = getEntityManager().find(
- AuditedImplementor.class, ai_id);
- assert ai != null;
- SimpleInterface si = getEntityManager().find(SimpleInterface.class,
- ai_id);
- assert si != null;
-
- // levanto las de la revisi�n 1, ninguna debe ser null
- AuditedImplementor ai_rev1 = getAuditReader().find(
- AuditedImplementor.class, ai_id, 1);
- assert ai_rev1 != null;
- SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
- ai_id, 1);
- assert si_rev1 != null;
-
- // data de las actuales no debe ser null
- assert ai.getData() != null;
- assert si.getData() != null;
- // data de las revisiones est� auditada
- assert ai_rev1.getData() != null;
- assert si_rev1.getData() != null;
- // numerito de las revisiones est� auditada, debe ser igual a NUMERITO
- assert ai_rev1.getNumerito() == NUMERITO;
- assert si_rev1.getNumerito() == NUMERITO;
- }
-
- @Test
- public void testRetrieveNonAudited() {
- // levanto las versiones actuales
- NonAuditedImplementor nai = getEntityManager().find(
- NonAuditedImplementor.class, nai_id);
- assert nai != null;
- SimpleInterface si = getEntityManager().find(SimpleInterface.class,
- nai_id);
- assert si != null;
-
- assert si.getData().equals(nai.getData());
-
- try {
- // levanto la revision
- getAuditReader().find(NonAuditedImplementor.class, nai_id, 1);
- assert false;
- } catch (Exception e) {
- // no es auditable!!!
- assert (e instanceof NotAuditedException);
- }
-
- // levanto la revision que no es auditable pero con la interfaz, el
- // resultado debe ser null
- SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
- nai_id, 1);
- assert si_rev1 == null;
- }
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,109 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
+
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.exception.NotAuditedException;
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public abstract class AbstractPropertiesAudited2Test extends AbstractEntityTest {
+
+ private long ai_id;
+ private long nai_id;
+
+ private static int NUMERITO = 555;
+
+ @BeforeClass(dependsOnMethods = "init")
+ public void initData() {
+ EntityManager em = getEntityManager();
+
+ AuditedImplementor ai = new AuditedImplementor();
+ ai.setData("La data");
+ ai.setAuditedImplementorData("audited implementor data");
+ ai.setNumerito(NUMERITO);
+
+ NonAuditedImplementor nai = new NonAuditedImplementor();
+ nai.setData("info");
+ nai.setNonAuditedImplementorData("sttring");
+ nai.setNumerito(NUMERITO);
+
+ // Revision 1
+ em.getTransaction().begin();
+
+ em.persist(ai);
+
+ em.persist(nai);
+
+ em.getTransaction().commit();
+
+ // Revision 2
+
+ // Revision 3
+
+ ai_id = ai.getId();
+ nai_id = nai.getId();
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ // levanto las versiones actuales
+ AuditedImplementor ai = getEntityManager().find(
+ AuditedImplementor.class, ai_id);
+ assert ai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class,
+ ai_id);
+ assert si != null;
+
+ // levanto las de la revisi�n 1, ninguna debe ser null
+ AuditedImplementor ai_rev1 = getAuditReader().find(
+ AuditedImplementor.class, ai_id, 1);
+ assert ai_rev1 != null;
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
+ ai_id, 1);
+ assert si_rev1 != null;
+
+ // data de las actuales no debe ser null
+ assert ai.getData() != null;
+ assert si.getData() != null;
+ // data de las revisiones est� auditada
+ assert ai_rev1.getData() != null;
+ assert si_rev1.getData() != null;
+ // numerito de las revisiones est� auditada, debe ser igual a NUMERITO
+ assert ai_rev1.getNumerito() == NUMERITO;
+ assert si_rev1.getNumerito() == NUMERITO;
+ }
+
+ @Test
+ public void testRetrieveNonAudited() {
+ // levanto las versiones actuales
+ NonAuditedImplementor nai = getEntityManager().find(
+ NonAuditedImplementor.class, nai_id);
+ assert nai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class,
+ nai_id);
+ assert si != null;
+
+ assert si.getData().equals(nai.getData());
+
+ try {
+ // levanto la revision
+ getAuditReader().find(NonAuditedImplementor.class, nai_id, 1);
+ assert false;
+ } catch (Exception e) {
+ // no es auditable!!!
+ assert (e instanceof NotAuditedException);
+ }
+
+ // levanto la revision que no es auditable pero con la interfaz, el
+ // resultado debe ser null
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
+ nai_id, 1);
+ assert si_rev1 == null;
+ }
+}
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,58 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
-
-import org.hibernate.envers.Audited;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-@Audited
-public class AuditedImplementor implements SimpleInterface {
-
- private long id;
-
- private String data;
-
- private String auditedImplementorData;
-
- private int numerito;
-
-
- protected AuditedImplementor() {
-
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getData() {
- return data;
- }
-
- public void setData(String data) {
- this.data = data;
- }
-
- public String getAuditedImplementorData() {
- return auditedImplementorData;
- }
-
- public void setAuditedImplementorData(String implementorData) {
- this.auditedImplementorData = implementorData;
- }
-
- public int getNumerito() {
- return numerito;
- }
-
- public void setNumerito(int numerito) {
- this.numerito = numerito;
- }
-
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,58 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+@Audited
+public class AuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String auditedImplementorData;
+
+ private int numerito;
+
+
+ protected AuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getAuditedImplementorData() {
+ return auditedImplementorData;
+ }
+
+ public void setAuditedImplementorData(String implementorData) {
+ this.auditedImplementorData = implementorData;
+ }
+
+ public int getNumerito() {
+ return numerito;
+ }
+
+ public void setNumerito(int numerito) {
+ this.numerito = numerito;
+ }
+
+}
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,54 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public class NonAuditedImplementor implements SimpleInterface {
-
- private long id;
-
- private String data;
-
- private String nonAuditedImplementorData;
-
- private int numerito;
-
-
- protected NonAuditedImplementor() {
-
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getData() {
- return data;
- }
-
- public void setData(String data) {
- this.data = data;
- }
-
- public String getNonAuditedImplementorData() {
- return nonAuditedImplementorData;
- }
-
- public void setNonAuditedImplementorData(String implementorData) {
- this.nonAuditedImplementorData = implementorData;
- }
-
- public int getNumerito() {
- return numerito;
- }
-
- public void setNumerito(int numerito) {
- this.numerito = numerito;
- }
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,54 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class NonAuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String nonAuditedImplementorData;
+
+ private int numerito;
+
+
+ protected NonAuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getNonAuditedImplementorData() {
+ return nonAuditedImplementorData;
+ }
+
+ public void setNonAuditedImplementorData(String implementorData) {
+ this.nonAuditedImplementorData = implementorData;
+ }
+
+ public int getNumerito() {
+ return numerito;
+ }
+
+ public void setNumerito(int numerito) {
+ this.numerito = numerito;
+ }
+}
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,26 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
-
-import org.hibernate.envers.Audited;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public interface SimpleInterface {
-
- long getId();
-
- void setId(long id);
-
- @Audited
- String getData();
-
- void setData(String data);
-
- @Audited
- int getNumerito();
-
- void setNumerito(int num);
-
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,26 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public interface SimpleInterface {
+
+ long getId();
+
+ void setId(long id);
+
+ @Audited
+ String getData();
+
+ void setData(String data);
+
+ @Audited
+ int getNumerito();
+
+ void setNumerito(int num);
+
+}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined)
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,31 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.joined;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import
org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AbstractPropertiesAudited2Test;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public class JoinedPropertiesAudited2Test extends AbstractPropertiesAudited2Test {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
- @Test
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,31 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.joined;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import
org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AbstractPropertiesAudited2Test;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class JoinedPropertiesAudited2Test extends AbstractPropertiesAudited2Test {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass)
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,33 +0,0 @@
-package
org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.subclass;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import
org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AbstractPropertiesAudited2Test;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public class SubclassPropertiesAudited2Test extends AbstractPropertiesAudited2Test {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
-
- @Test
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,33 @@
+package
org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.subclass;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import
org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AbstractPropertiesAudited2Test;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class SubclassPropertiesAudited2Test extends AbstractPropertiesAudited2Test {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+
+}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union)
Deleted:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java
===================================================================
---
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,31 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.union;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import
org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AbstractPropertiesAudited2Test;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public class UnionPropertiesAudited2Test extends AbstractPropertiesAudited2Test {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
- @Test
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-}
Copied:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java
(from rev 18431,
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,31 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.union;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import
org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AbstractPropertiesAudited2Test;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class UnionPropertiesAudited2Test extends AbstractPropertiesAudited2Test {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url =
Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+}
Copied: core/branches/envers-hibernate-3.3/src/test/resources/mappings (from rev 18431,
core/trunk/envers/src/test/resources/mappings)
Copied: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces (from
rev 18431, core/trunk/envers/src/test/resources/mappings/interfaces)
Deleted:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml
===================================================================
---
core/trunk/envers/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="INTERFACE" abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- </class>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
-
- </joined-subclass>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
-
- </joined-subclass>
-
-</hibernate-mapping>
Copied:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml
(from rev 18431,
core/trunk/envers/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="INTERFACE" abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
+
+ </joined-subclass>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
+
+ </joined-subclass>
+
+</hibernate-mapping>
Deleted:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml
===================================================================
---
core/trunk/envers/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="INTERFACE" abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- </class>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </joined-subclass>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </joined-subclass>
-
-</hibernate-mapping>
Copied:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml
(from rev 18431,
core/trunk/envers/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="INTERFACE" abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </joined-subclass>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </joined-subclass>
+
+</hibernate-mapping>
Deleted:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml
===================================================================
---
core/trunk/envers/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="INTERFACE" abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </class>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
-
- </joined-subclass>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
-
- </joined-subclass>
-
-</hibernate-mapping>
Copied:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml
(from rev 18431,
core/trunk/envers/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="INTERFACE" abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </class>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
+
+ </joined-subclass>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
+
+ </joined-subclass>
+
+</hibernate-mapping>
Deleted:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml
===================================================================
---
core/trunk/envers/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="SIMPLES_interface"
discriminator-value="SIMPLE_INTERFACE">
-
- <id name="id" column="ID" type="long">
- <generator class="native" />
- </id>
-
- <discriminator column="DISCRIMINATOR" />
-
- <property name="data" column="DATA" />
-
- </class>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- discriminator-value="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
-
- </subclass>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- discriminator-value="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
-
- </subclass>
-
-
-
-</hibernate-mapping>
Copied:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml
(from rev 18431,
core/trunk/envers/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="SIMPLES_interface"
discriminator-value="SIMPLE_INTERFACE">
+
+ <id name="id" column="ID" type="long">
+ <generator class="native" />
+ </id>
+
+ <discriminator column="DISCRIMINATOR" />
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ discriminator-value="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
+
+ </subclass>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ discriminator-value="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
+
+ </subclass>
+
+
+
+</hibernate-mapping>
Deleted:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml
===================================================================
---
core/trunk/envers/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="SIMPLES_interface"
discriminator-value="SIMPLE_INTERFACE">
-
- <id name="id" column="ID" type="long">
- <generator class="native" />
- </id>
-
- <discriminator column="DISCRIMINATOR" />
-
- <property name="data" column="DATA" />
-
- </class>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- discriminator-value="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </subclass>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- discriminator-value="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </subclass>
-
-</hibernate-mapping>
Copied:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml
(from rev 18431,
core/trunk/envers/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="SIMPLES_interface"
discriminator-value="SIMPLE_INTERFACE">
+
+ <id name="id" column="ID" type="long">
+ <generator class="native" />
+ </id>
+
+ <discriminator column="DISCRIMINATOR" />
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ discriminator-value="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </subclass>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ discriminator-value="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </subclass>
+
+</hibernate-mapping>
Deleted:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml
===================================================================
---
core/trunk/envers/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="SIMPLES_interface"
discriminator-value="SIMPLE_INTERFACE">
-
- <id name="id" column="ID" type="long">
- <generator class="native" />
- </id>
-
- <discriminator column="DISCRIMINATOR" />
-
- <property name="data" column="DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </class>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- discriminator-value="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
-
- </subclass>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- discriminator-value="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
-
- </subclass>
-
-</hibernate-mapping>
Copied:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml
(from rev 18431,
core/trunk/envers/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="SIMPLES_interface"
discriminator-value="SIMPLE_INTERFACE">
+
+ <id name="id" column="ID" type="long">
+ <generator class="native" />
+ </id>
+
+ <discriminator column="DISCRIMINATOR" />
+
+ <property name="data" column="DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </class>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ discriminator-value="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
+
+ </subclass>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ discriminator-value="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
+
+ </subclass>
+
+</hibernate-mapping>
Deleted:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml
===================================================================
---
core/trunk/envers/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- </class>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
-
- </union-subclass>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
-
- </union-subclass>
-
-</hibernate-mapping>
Copied:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml
(from rev 18431,
core/trunk/envers/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
+
+ </union-subclass>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
+
+ </union-subclass>
+
+</hibernate-mapping>
Deleted:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml
===================================================================
---
core/trunk/envers/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- </class>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </union-subclass>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </union-subclass>
-
-</hibernate-mapping>
Copied:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml
(from rev 18431,
core/trunk/envers/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </union-subclass>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </union-subclass>
+
+</hibernate-mapping>
Deleted:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml
===================================================================
---
core/trunk/envers/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml 2010-01-07
14:43:39 UTC (rev 18431)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </class>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
-
- </union-subclass>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
-
- </union-subclass>
-
-</hibernate-mapping>
Copied:
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml
(from rev 18431,
core/trunk/envers/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml)
===================================================================
---
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml
(rev 0)
+++
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml 2010-01-07
14:51:20 UTC (rev 18432)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </class>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData"
column="IMPLEMENTOR_DATA" />
+
+ </union-subclass>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData"
column="NON_IMPLEMENTOR_DATA" />
+
+ </union-subclass>
+
+</hibernate-mapping>
Modified: core/branches/envers-hibernate-3.3/src/test/resources/testng.xml
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/resources/testng.xml 2010-01-07 14:43:39
UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/resources/testng.xml 2010-01-07 14:51:20
UTC (rev 18432)
@@ -31,6 +31,15 @@
<package
name="org.hibernate.envers.test.integration.inheritance.tableperclass.relation"
/>
<package
name="org.hibernate.envers.test.integration.interfaces.components" />
<package
name="org.hibernate.envers.test.integration.interfaces.relation" />
+ <package
name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.subclass"
/>
+ <package
name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.joined"
/>
+ <package
name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.union"
/>
+ <package
name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.subclass"
/>
+ <package
name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.joined"
/>
+ <package
name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.union"
/>
+ <package
name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.subclass"
/>
+ <package
name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.joined"
/>
+ <package
name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.union"
/>
<package name="org.hibernate.envers.test.integration.manytomany"
/>
<package
name="org.hibernate.envers.test.integration.manytomany.biowned" />
<package
name="org.hibernate.envers.test.integration.manytomany.sametable" />