Author: arminw
Date: Wed Oct  4 04:47:59 2006
New Revision: 452863

URL: http://svn.apache.org/viewvc?view=rev&rev=452863
Log:
use IdentityFactory

Modified:
    db/ojb/trunk/src/test/org/apache/ojb/broker/AbstractExtentClassTest.java
    db/ojb/trunk/src/test/org/apache/ojb/broker/AnonymousFieldsTest.java
    db/ojb/trunk/src/test/org/apache/ojb/broker/AutomaticForeignKeys.java

Modified: 
db/ojb/trunk/src/test/org/apache/ojb/broker/AbstractExtentClassTest.java
URL: 
http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/broker/AbstractExtentClassTest.java?view=diff&rev=452863&r1=452862&r2=452863
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/AbstractExtentClassTest.java 
(original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/AbstractExtentClassTest.java 
Wed Oct  4 04:47:59 2006
@@ -52,7 +52,7 @@
         broker.commitTransaction();
         broker.clearCache();
 
-        Identity cont = new Identity(container, broker);
+        Identity cont = broker.serviceIdentity().buildIdentity(container);
         broker.beginTransaction();
         XContainer retContainer = (XContainer) 
broker.getObjectByIdentity(cont);
         broker.commitTransaction();

Modified: db/ojb/trunk/src/test/org/apache/ojb/broker/AnonymousFieldsTest.java
URL: 
http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/broker/AnonymousFieldsTest.java?view=diff&rev=452863&r1=452862&r2=452863
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/AnonymousFieldsTest.java 
(original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/AnonymousFieldsTest.java Wed 
Oct  4 04:47:59 2006
@@ -505,7 +505,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();
@@ -531,7 +531,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();
@@ -558,7 +558,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();
@@ -583,7 +583,7 @@
         broker.store(entry);
         broker.commitTransaction();
 
-        Identity oid = new Identity(entry, broker);
+        Identity oid = broker.serviceIdentity().buildIdentity(entry);
 
         entry.setSomeSuperValue(2718282);
         entry.setSomeValue(10000);
@@ -615,7 +615,7 @@
         broker.store(entry);
         broker.commitTransaction();
 
-        Identity oid = new Identity(entry, broker);
+        Identity oid = broker.serviceIdentity().buildIdentity(entry);
 
         entry.setSomeSuperValue(2718282);
         entry.setSomeValue(10000);
@@ -649,7 +649,7 @@
         broker.store(entry);
         broker.commitTransaction();
 
-        Identity oid = new Identity(entry, broker);
+        Identity oid = broker.serviceIdentity().buildIdentity(entry);
 
         entry.setSomeSuperValue(2718282);
         entry.setSomeValue(10000);

Modified: db/ojb/trunk/src/test/org/apache/ojb/broker/AutomaticForeignKeys.java
URL: 
http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/broker/AutomaticForeignKeys.java?view=diff&rev=452863&r1=452862&r2=452863
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/AutomaticForeignKeys.java 
(original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/AutomaticForeignKeys.java Wed 
Oct  4 04:47:59 2006
@@ -39,13 +39,13 @@
                        ProductGroup pg = new ProductGroup();
                        pg.setName("Software");
                        art.setProductGroup(pg);
-                       Identity artOID = new Identity(art, broker);
                        broker.beginTransaction();
                        broker.store(art);
                        broker.store(pg);
                        broker.commitTransaction();
                        broker.clearCache();
-                       InterfaceArticle readInArt = (Article) 
broker.getObjectByIdentity(artOID);
+            Identity artOID = broker.serviceIdentity().buildIdentity(art);
+            InterfaceArticle readInArt = (Article) 
broker.getObjectByIdentity(artOID);
                        InterfaceProductGroup readInPg = 
readInArt.getProductGroup();
                        assertEquals(art.getArticleName(), 
readInArt.getArticleName());
                        assertEquals(pg.getName(), readInPg.getName());
@@ -81,12 +81,12 @@
                        pg.add(art2);
                        pg.add(art3);
 
-                       Identity pgOID = new Identity(pg, broker);
             broker.beginTransaction();
                        broker.store(pg);
             broker.commitTransaction();
                        broker.clearCache();
-                       InterfaceProductGroup readInPG =
+            Identity pgOID = broker.serviceIdentity().buildIdentity(pg);
+            InterfaceProductGroup readInPG =
                                (InterfaceProductGroup) 
broker.getObjectByIdentity(pgOID);
                        assertEquals(pg.getName(), readInPG.getName());
                        assertEquals(pg.getAllArticles().size(), 
readInPG.getAllArticles().size());



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to