You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by ar...@apache.org on 2007/02/07 02:08:34 UTC
svn commit: r504397 -
/db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/AnonymousFieldsTest.java
Author: arminw
Date: Tue Feb 6 17:08:34 2007
New Revision: 504397
URL: http://svn.apache.org/viewvc?view=rev&rev=504397
Log:
fix test
Modified:
db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/AnonymousFieldsTest.java
Modified: db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/AnonymousFieldsTest.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/AnonymousFieldsTest.java?view=diff&rev=504397&r1=504396&r2=504397
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/AnonymousFieldsTest.java (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/AnonymousFieldsTest.java Tue Feb 6 17:08:34 2007
@@ -5,12 +5,10 @@
import java.util.Collection;
import org.apache.commons.lang.SerializationUtils;
-import org.apache.ojb.broker.ObjectRepository.F1;
import org.apache.ojb.broker.metadata.ClassDescriptor;
import org.apache.ojb.broker.metadata.ObjectReferenceDescriptor;
import org.apache.ojb.broker.query.Criteria;
import org.apache.ojb.broker.query.Query;
-import org.apache.ojb.broker.query.QueryByCriteria;
import org.apache.ojb.broker.query.QueryFactory;
import org.apache.ojb.junit.PBTestCase;
@@ -506,7 +504,7 @@
broker.store(entry);
broker.commitTransaction();
- Identity oid = new Identity(entry, broker);
+ Identity oid = broker.serviceIdentity().buildIdentity(entry);
// clear cache and retrieve a copy from the DB
broker.clearCache();
@@ -532,7 +530,7 @@
broker.store(entry);
broker.commitTransaction();
- Identity oid = new Identity(entry, broker);
+ Identity oid = broker.serviceIdentity().buildIdentity(entry);
// clear cache and retrieve a copy from the DB
broker.clearCache();
@@ -559,7 +557,7 @@
broker.store(entry);
broker.commitTransaction();
- Identity oid = new Identity(entry, broker);
+ Identity oid = broker.serviceIdentity().buildIdentity(entry);
// clear cache and retrieve a copy from the DB
broker.clearCache();
@@ -584,7 +582,7 @@
broker.store(entry);
broker.commitTransaction();
- Identity oid = new Identity(entry, broker);
+ Identity oid = broker.serviceIdentity().buildIdentity(entry);
entry.setSomeSuperValue(2718282);
entry.setSomeValue(10000);
@@ -616,7 +614,7 @@
broker.store(entry);
broker.commitTransaction();
- Identity oid = new Identity(entry, broker);
+ Identity oid = broker.serviceIdentity().buildIdentity(entry);
entry.setSomeSuperValue(2718282);
entry.setSomeValue(10000);
@@ -650,7 +648,7 @@
broker.store(entry);
broker.commitTransaction();
- Identity oid = new Identity(entry, broker);
+ Identity oid = broker.serviceIdentity().buildIdentity(entry);
entry.setSomeSuperValue(2718282);
entry.setSomeValue(10000);
@@ -782,7 +780,7 @@
public void testMultipleJoinedInheritanceAndExtents()
{
- ObjectRepository.F1 entry = new ObjectRepository.F1();
+ ObjectRepository.F entry = new ObjectRepository.F();
entry.setSomeSuperValue(1);
entry.setSomeValue(2);
broker.beginTransaction();
@@ -791,7 +789,7 @@
Integer id = entry.getId();
broker.clearCache();
- entry = (F1) findById(ObjectRepository.F1.class, id.intValue());
+ entry = (ObjectRepository.F) findById(ObjectRepository.F.class, id.intValue());
assertEquals(id, entry.getId());
assertEquals(1, entry.getSomeSuperValue());
assertEquals(2, entry.getSomeValue());
@@ -799,7 +797,7 @@
public void testMultipleJoinedInheritanceAndExtentsWithCache()
{
- ObjectRepository.F1 entry = new ObjectRepository.F1();
+ ObjectRepository.F entry = new ObjectRepository.F();
entry.setSomeSuperValue(1);
entry.setSomeValue(2);
broker.beginTransaction();
@@ -807,7 +805,7 @@
broker.commitTransaction();
Integer id = entry.getId();
- entry = (F1) findById(ObjectRepository.F1.class, id.intValue());
+ entry = (ObjectRepository.F) findById(ObjectRepository.F.class, id.intValue());
assertEquals(id, entry.getId());
assertEquals(1, entry.getSomeSuperValue());
assertEquals(2, entry.getSomeValue());
@@ -815,7 +813,7 @@
public void testMultipleJoinedInheritanceAndExtents_2()
{
- ObjectRepository.F1 entry = new ObjectRepository.F1();
+ ObjectRepository.F entry = new ObjectRepository.F();
entry.setSomeSuperValue(1);
entry.setSomeValue(2);
broker.beginTransaction();
@@ -824,7 +822,7 @@
Integer id = entry.getId();
broker.clearCache();
- entry = (F1) findById(ObjectRepository.E.class, id.intValue());
+ entry = (ObjectRepository.F) findById(ObjectRepository.E.class, id.intValue());
assertEquals(id, entry.getId());
assertEquals(1, entry.getSomeSuperValue());
assertEquals(2, entry.getSomeValue());
@@ -832,7 +830,7 @@
public void testMultipleJoinedInheritanceAndExtents_2_WithCache()
{
- ObjectRepository.F1 entry = new ObjectRepository.F1();
+ ObjectRepository.F entry = new ObjectRepository.F();
entry.setSomeSuperValue(1);
entry.setSomeValue(2);
broker.beginTransaction();
@@ -840,7 +838,7 @@
broker.commitTransaction();
Integer id = entry.getId();
- entry = (F1) findById(ObjectRepository.E.class, id.intValue());
+ entry = (ObjectRepository.F) findById(ObjectRepository.E.class, id.intValue());
assertEquals(id, entry.getId());
assertEquals(1, entry.getSomeSuperValue());
assertEquals(2, entry.getSomeValue());
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org