cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amania...@apache.org
Subject svn commit: r600160 [2/3] - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src: main/java/org/apache/cayenne/ main/java/org/apache/cayenne/access/ main/java/org/apache/cayenne/access/jdbc/ main/java/org/apache/cayenne/access/trans/ main/ja...
Date Sat, 01 Dec 2007 16:42:12 GMT
Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/PregeneratedPKTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/PregeneratedPKTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/PregeneratedPKTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/PregeneratedPKTest.java Sat Dec  1 08:42:05 2007
@@ -44,7 +44,7 @@
     public void testIntPk() throws Exception {
 
         DataContext context = createDataContext();
-        Artist a = (Artist) context.newObject(Artist.class);
+        Artist a = context.newObject(Artist.class);
         a.setArtistName("XXX");
 
         updateId(context, a.getObjectId());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCallbacksTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCallbacksTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCallbacksTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCallbacksTest.java Sat Dec  1 08:42:05 2007
@@ -44,7 +44,7 @@
         DataContext context = createDataContext();
 
         // no callbacks
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         assertNotNull(a1);
         assertFalse(a1.isPrePersisted());
 
@@ -53,7 +53,7 @@
                 Artist.class,
                 "prePersistCallback");
 
-        Artist a2 = (Artist) context.newObject(Artist.class);
+        Artist a2 = context.newObject(Artist.class);
         assertNotNull(a2);
         assertTrue(a2.isPrePersisted());
 
@@ -64,13 +64,13 @@
                 listener2,
                 "publicCallback");
 
-        Artist a3 = (Artist) context.newObject(Artist.class);
+        Artist a3 = context.newObject(Artist.class);
         assertNotNull(a3);
         assertTrue(a3.isPrePersisted());
 
         assertSame(a3, listener2.getPublicCalledbackEntity());
 
-        Painting p3 = (Painting) context.newObject(Painting.class);
+        Painting p3 = context.newObject(Painting.class);
         assertNotNull(p3);
         assertFalse(p3.isPrePersisted());
         assertSame(a3, listener2.getPublicCalledbackEntity());
@@ -84,7 +84,7 @@
         DataContext context = createDataContext();
 
         // no callbacks
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         a1.setArtistName("XX");
         context.commitChanges();
         context.deleteObject(a1);
@@ -94,7 +94,7 @@
         registry
                 .addListener(LifecycleEvent.PRE_REMOVE, Artist.class, "preRemoveCallback");
 
-        Artist a2 = (Artist) context.newObject(Artist.class);
+        Artist a2 = context.newObject(Artist.class);
         a2.setArtistName("XX");
         context.commitChanges();
         context.deleteObject(a2);
@@ -108,7 +108,7 @@
                 listener2,
                 "publicCallback");
 
-        Artist a3 = (Artist) context.newObject(Artist.class);
+        Artist a3 = context.newObject(Artist.class);
         a3.setArtistName("XX");
         context.commitChanges();
         context.deleteObject(a3);
@@ -117,7 +117,7 @@
 
         assertSame(a3, listener2.getPublicCalledbackEntity());
 
-        Painting p3 = (Painting) context.newObject(Painting.class);
+        Painting p3 = context.newObject(Painting.class);
         p3.setPaintingTitle("XX");
         context.commitChanges();
         context.deleteObject(p3);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCommitTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCommitTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCommitTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCommitTest.java Sat Dec  1 08:42:05 2007
@@ -32,7 +32,7 @@
         DataContext context = createDataContext();
         
         // commit new object
-        Artist a = (Artist) context.newObject(Artist.class);
+        Artist a = context.newObject(Artist.class);
         a.setArtistName("Test");
 
         assertTrue(context.hasChanges());
@@ -57,7 +57,7 @@
         assertSame(a.getObjectId(), newIds[0]);
         
         // commit a mix of new and modified
-        Painting p = (Painting) context.newObject(Painting.class);
+        Painting p = context.newObject(Painting.class);
         p.setPaintingTitle("PT");
         p.setToArtist(a);
         a.setArtistName(a.getArtistName() + "_");

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCompoundRelTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCompoundRelTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCompoundRelTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCompoundRelTest.java Sat Dec  1 08:42:05 2007
@@ -45,9 +45,9 @@
     }
 
     public void testInsert() {
-        CompoundPkTestEntity master = (CompoundPkTestEntity) ctxt
+        CompoundPkTestEntity master = ctxt
                 .newObject(CompoundPkTestEntity.class);
-        CompoundFkTestEntity detail = (CompoundFkTestEntity) ctxt
+        CompoundFkTestEntity detail = ctxt
                 .newObject(CompoundFkTestEntity.class);
         master.addToCompoundFkArray(detail);
         master.setName("m1");

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCrossDBTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCrossDBTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCrossDBTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCrossDBTest.java Sat Dec  1 08:42:05 2007
@@ -39,13 +39,13 @@
         DataContext context = createDataContext();
 
         // insert
-        CrossdbM1E1 o1 = (CrossdbM1E1) context.newObject(CrossdbM1E1.class);
+        CrossdbM1E1 o1 = context.newObject(CrossdbM1E1.class);
         o1.setName("o1");
 
-        CrossdbM2E1 o2 = (CrossdbM2E1) context.newObject(CrossdbM2E1.class);
+        CrossdbM2E1 o2 = context.newObject(CrossdbM2E1.class);
         o2.setName("o2");
 
-        CrossdbM2E2 o3 = (CrossdbM2E2) context.newObject(CrossdbM2E2.class);
+        CrossdbM2E2 o3 = context.newObject(CrossdbM2E2.class);
         o3.setName("o3");
 
         o3.setToM1E1(o1);
@@ -53,7 +53,7 @@
         context.commitChanges();
 
         // update
-        CrossdbM1E1 o11 = (CrossdbM1E1) context.newObject(CrossdbM1E1.class);
+        CrossdbM1E1 o11 = context.newObject(CrossdbM1E1.class);
         o11.setName("o11");
         o3.setToM1E1(o11);
         context.commitChanges();

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDataChannelEventsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDataChannelEventsTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDataChannelEventsTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDataChannelEventsTest.java Sat Dec  1 08:42:05 2007
@@ -36,7 +36,7 @@
     public void testCommitEvent() {
         DataContext context = createDataContext();
 
-        Artist a = (Artist) context.newObject(Artist.class);
+        Artist a = context.newObject(Artist.class);
         a.setArtistName("X");
         context.commitChanges();
 
@@ -54,7 +54,7 @@
     public void testRollbackEvent() {
         DataContext context = createDataContext();
 
-        Artist a = (Artist) context.newObject(Artist.class);
+        Artist a = context.newObject(Artist.class);
         a.setArtistName("X");
         context.commitChanges();
 
@@ -72,7 +72,7 @@
     public void testChangeEventOnChildChange() {
         DataContext context = createDataContext();
 
-        Artist a = (Artist) context.newObject(Artist.class);
+        Artist a = context.newObject(Artist.class);
         a.setArtistName("X");
         context.commitChanges();
 
@@ -93,7 +93,7 @@
     public void testChangeEventOnPeerChange() throws Exception {
         DataContext context = createDataContext();
 
-        Artist a = (Artist) context.newObject(Artist.class);
+        Artist a = context.newObject(Artist.class);
         a.setArtistName("X");
         context.commitChanges();
 
@@ -120,7 +120,7 @@
         DataContext context = createDataContext();
         DataContext childPeer1 = context.createChildDataContext();
 
-        Artist a = (Artist) childPeer1.newObject(Artist.class);
+        Artist a = childPeer1.newObject(Artist.class);
         a.setArtistName("X");
         childPeer1.commitChanges();
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDecoratedStackTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDecoratedStackTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDecoratedStackTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDecoratedStackTest.java Sat Dec  1 08:42:05 2007
@@ -46,7 +46,7 @@
         DataContext context = new DataContext(decorator, new ObjectStore(dd
                 .getSharedSnapshotCache()));
 
-        Artist a = (Artist) context.newObject(Artist.class);
+        Artist a = context.newObject(Artist.class);
         a.setArtistName("XXX");
         context.commitChanges();
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDeleteRulesTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDeleteRulesTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDeleteRulesTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDeleteRulesTest.java Sat Dec  1 08:42:05 2007
@@ -81,9 +81,9 @@
      */
     public void testCascadeToManyFlattened() {
         // testing Artist.groupArray relationship
-        ArtGroup aGroup = (ArtGroup) context.newObject(ArtGroup.class);
+        ArtGroup aGroup = context.newObject(ArtGroup.class);
         aGroup.setName("Group Name");
-        Artist anArtist = (Artist) context.newObject(Artist.class);
+        Artist anArtist = context.newObject(Artist.class);
         anArtist.setArtistName("A Name");
         anArtist.addToGroupArray(aGroup);
         assertTrue(anArtist.getGroupArray().contains(aGroup));
@@ -113,9 +113,9 @@
      */
     public void testNullifyToManyFlattened() {
         // testing ArtGroup.artistArray relationship
-        ArtGroup aGroup = (ArtGroup) context.newObject(ArtGroup.class);
+        ArtGroup aGroup = context.newObject(ArtGroup.class);
         aGroup.setName("Group Name");
-        Artist anArtist = (Artist) context.newObject(Artist.class);
+        Artist anArtist = context.newObject(Artist.class);
         anArtist.setArtistName("A Name");
         aGroup.addToArtistArray(anArtist);
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLFunctionalExpressions.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLFunctionalExpressions.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLFunctionalExpressions.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLFunctionalExpressions.java Sat Dec  1 08:42:05 2007
@@ -47,11 +47,11 @@
         Calendar cal = Calendar.getInstance();
         int year = cal.get(Calendar.YEAR);
 
-        DateTestEntity o1 = (DateTestEntity) context.newObject(DateTestEntity.class);
+        DateTestEntity o1 = context.newObject(DateTestEntity.class);
         cal.set(year - 3, 1, 1);
         o1.setDateColumn(cal.getTime());
 
-        DateTestEntity o2 = (DateTestEntity) context.newObject(DateTestEntity.class);
+        DateTestEntity o2 = context.newObject(DateTestEntity.class);
         cal.set(year + 3, 1, 1);
         o2.setDateColumn(cal.getTime());
 
@@ -70,11 +70,11 @@
         Calendar cal = Calendar.getInstance();
         int year = cal.get(Calendar.YEAR);
 
-        DateTestEntity o1 = (DateTestEntity) context.newObject(DateTestEntity.class);
+        DateTestEntity o1 = context.newObject(DateTestEntity.class);
         cal.set(year, 1, 1, 0, 0, 0);
         o1.setTimeColumn(cal.getTime());
 
-        DateTestEntity o2 = (DateTestEntity) context.newObject(DateTestEntity.class);
+        DateTestEntity o2 = context.newObject(DateTestEntity.class);
         cal.set(year, 1, 1, 23, 59, 59);
         o2.setTimeColumn(cal.getTime());
 
@@ -95,11 +95,11 @@
         int month = cal.get(Calendar.MONTH);
         int date = cal.get(Calendar.DATE);
 
-        DateTestEntity o1 = (DateTestEntity) context.newObject(DateTestEntity.class);
+        DateTestEntity o1 = context.newObject(DateTestEntity.class);
         cal.set(year, month, date, 0, 0, 0);
         o1.setTimestampColumn(cal.getTime());
 
-        DateTestEntity o2 = (DateTestEntity) context.newObject(DateTestEntity.class);
+        DateTestEntity o2 = context.newObject(DateTestEntity.class);
         cal.set(year, month, date, 23, 59, 59);
         o2.setTimestampColumn(cal.getTime());
 
@@ -115,11 +115,11 @@
     public void testABS() {
         ObjectContext context = createDataContext();
 
-        BigDecimalEntity o1 = (BigDecimalEntity) context
+        BigDecimalEntity o1 = context
                 .newObject(BigDecimalEntity.class);
         o1.setBigDecimalField(new BigDecimal("4.1"));
 
-        BigDecimalEntity o2 = (BigDecimalEntity) context
+        BigDecimalEntity o2 = context
                 .newObject(BigDecimalEntity.class);
         o2.setBigDecimalField(new BigDecimal("-5.1"));
 
@@ -135,11 +135,11 @@
     public void testSQRT() {
         ObjectContext context = createDataContext();
 
-        BigDecimalEntity o1 = (BigDecimalEntity) context
+        BigDecimalEntity o1 = context
                 .newObject(BigDecimalEntity.class);
         o1.setBigDecimalField(new BigDecimal("9"));
 
-        BigDecimalEntity o2 = (BigDecimalEntity) context
+        BigDecimalEntity o2 = context
                 .newObject(BigDecimalEntity.class);
         o2.setBigDecimalField(new BigDecimal("16"));
 
@@ -155,11 +155,11 @@
     public void testMOD() {
         ObjectContext context = createDataContext();
 
-        BigIntegerEntity o1 = (BigIntegerEntity) context
+        BigIntegerEntity o1 = context
                 .newObject(BigIntegerEntity.class);
         o1.setBigIntegerField(new BigInteger("9"));
 
-        BigIntegerEntity o2 = (BigIntegerEntity) context
+        BigIntegerEntity o2 = context
                 .newObject(BigIntegerEntity.class);
         o2.setBigIntegerField(new BigInteger("10"));
 
@@ -175,16 +175,16 @@
     public void testSIZE() {
         ObjectContext context = createDataContext();
 
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         a1.setArtistName("a1");
 
-        Artist a2 = (Artist) context.newObject(Artist.class);
+        Artist a2 = context.newObject(Artist.class);
         a2.setArtistName("a2");
 
-        Painting p12 = (Painting) context.newObject(Painting.class);
+        Painting p12 = context.newObject(Painting.class);
         p12.setPaintingTitle("p12");
         a2.addToPaintingArray(p12);
-        Painting p22 = (Painting) context.newObject(Painting.class);
+        Painting p22 = context.newObject(Painting.class);
         p22.setPaintingTitle("p22");
         a2.addToPaintingArray(p22);
 
@@ -206,10 +206,10 @@
     public void testCONCAT() {
         ObjectContext context = createDataContext();
 
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         a1.setArtistName("a1");
 
-        Artist a2 = (Artist) context.newObject(Artist.class);
+        Artist a2 = context.newObject(Artist.class);
         a2.setArtistName("a2");
         context.commitChanges();
 
@@ -223,10 +223,10 @@
     public void testSUBSTRING() {
         ObjectContext context = createDataContext();
 
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         a1.setArtistName("12345678");
 
-        Artist a2 = (Artist) context.newObject(Artist.class);
+        Artist a2 = context.newObject(Artist.class);
         a2.setArtistName("abcdefg");
         context.commitChanges();
 
@@ -240,14 +240,14 @@
     public void testLOWER() {
         ObjectContext context = createDataContext();
 
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         a1.setArtistName("ABCDEFG");
 
-        Artist a2 = (Artist) context.newObject(Artist.class);
+        Artist a2 = context.newObject(Artist.class);
         a2.setArtistName("abcdefg");
         context.commitChanges();
 
-        Artist a3 = (Artist) context.newObject(Artist.class);
+        Artist a3 = context.newObject(Artist.class);
         a3.setArtistName("Xabcdefg");
         context.commitChanges();
 
@@ -262,14 +262,14 @@
     public void testUPPER() {
         ObjectContext context = createDataContext();
 
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         a1.setArtistName("ABCDEFG");
 
-        Artist a2 = (Artist) context.newObject(Artist.class);
+        Artist a2 = context.newObject(Artist.class);
         a2.setArtistName("abcdefg");
         context.commitChanges();
 
-        Artist a3 = (Artist) context.newObject(Artist.class);
+        Artist a3 = context.newObject(Artist.class);
         a3.setArtistName("Xabcdefg");
         context.commitChanges();
 
@@ -284,13 +284,13 @@
     public void testLENGTH() {
         ObjectContext context = createDataContext();
 
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         a1.setArtistName("1234567");
 
-        Artist a2 = (Artist) context.newObject(Artist.class);
+        Artist a2 = context.newObject(Artist.class);
         a2.setArtistName("1234567890");
 
-        Artist a3 = (Artist) context.newObject(Artist.class);
+        Artist a3 = context.newObject(Artist.class);
         a3.setArtistName("1234567890-=");
         context.commitChanges();
 
@@ -305,10 +305,10 @@
     public void testLOCATE() {
         ObjectContext context = createDataContext();
 
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         a1.setArtistName("___A___");
 
-        Artist a2 = (Artist) context.newObject(Artist.class);
+        Artist a2 = context.newObject(Artist.class);
         a2.setArtistName("_A_____");
         context.commitChanges();
 
@@ -333,8 +333,8 @@
                 "INSERT INTO ARTIST (ARTIST_ID,ARTIST_NAME) VALUES(2, 'A  ')"));
         context.performGenericQuery(inserts);
 
-        Artist a1 = (Artist) DataObjectUtils.objectForPK(context, Artist.class, 1);
-        Artist a2 = (Artist) DataObjectUtils.objectForPK(context, Artist.class, 2);
+        Artist a1 = DataObjectUtils.objectForPK(context, Artist.class, 1);
+        Artist a2 = DataObjectUtils.objectForPK(context, Artist.class, 2);
 
         EJBQLQuery query = new EJBQLQuery(
                 "SELECT a FROM Artist a WHERE TRIM(a.artistName) = 'A'");
@@ -373,10 +373,10 @@
         
         ObjectContext context = createDataContext();
 
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         a1.setArtistName("XXXA");
 
-        Artist a2 = (Artist) context.newObject(Artist.class);
+        Artist a2 = context.newObject(Artist.class);
         a2.setArtistName("AXXX");
         context.commitChanges();
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLQueryTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLQueryTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLQueryTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLQueryTest.java Sat Dec  1 08:42:05 2007
@@ -380,7 +380,7 @@
 
         ObjectContext context = createDataContext();
 
-        Artist a = (Artist) DataObjectUtils.objectForPK(context, Artist.class, 33002);
+        Artist a = DataObjectUtils.objectForPK(context, Artist.class, 33002);
 
         String ejbql = "select P from Painting P WHERE p.toArtist = :param";
         EJBQLQuery query = new EJBQLQuery(ejbql);
@@ -416,7 +416,7 @@
         Map key1 = new HashMap();
         key1.put(CompoundPkTestEntity.KEY1_PK_COLUMN, "b1");
         key1.put(CompoundPkTestEntity.KEY2_PK_COLUMN, "b2");
-        CompoundPkTestEntity a = (CompoundPkTestEntity) DataObjectUtils.objectForPK(
+        CompoundPkTestEntity a = DataObjectUtils.objectForPK(
                 context,
                 CompoundPkTestEntity.class,
                 key1);
@@ -444,7 +444,7 @@
         Map key1 = new HashMap();
         key1.put(CompoundPkTestEntity.KEY1_PK_COLUMN, "b1");
         key1.put(CompoundPkTestEntity.KEY2_PK_COLUMN, "b2");
-        CompoundPkTestEntity a = (CompoundPkTestEntity) DataObjectUtils.objectForPK(
+        CompoundPkTestEntity a = DataObjectUtils.objectForPK(
                 context,
                 CompoundPkTestEntity.class,
                 key1);
@@ -468,7 +468,7 @@
         Map key1 = new HashMap();
         key1.put(CompoundPkTestEntity.KEY1_PK_COLUMN, "b1");
         key1.put(CompoundPkTestEntity.KEY2_PK_COLUMN, "b2");
-        CompoundPkTestEntity a = (CompoundPkTestEntity) DataObjectUtils.objectForPK(
+        CompoundPkTestEntity a = DataObjectUtils.objectForPK(
                 context,
                 CompoundPkTestEntity.class,
                 key1);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLUpdateTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLUpdateTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLUpdateTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLUpdateTest.java Sat Dec  1 08:42:05 2007
@@ -191,15 +191,15 @@
     public void testUpdateNoQualifierBoolean() throws Exception {
 
         ObjectContext context = createDataContext();
-        BooleanTestEntity o1 = (BooleanTestEntity) context
+        BooleanTestEntity o1 = context
                 .newObject(BooleanTestEntity.class);
         o1.setBooleanColumn(Boolean.TRUE);
 
-        BooleanTestEntity o2 = (BooleanTestEntity) context
+        BooleanTestEntity o2 = context
                 .newObject(BooleanTestEntity.class);
         o2.setBooleanColumn(Boolean.FALSE);
 
-        BooleanTestEntity o3 = (BooleanTestEntity) context
+        BooleanTestEntity o3 = context
                 .newObject(BooleanTestEntity.class);
         o3.setBooleanColumn(Boolean.FALSE);
 
@@ -229,7 +229,7 @@
         createTestData("prepare");
 
         ObjectContext context = createDataContext();
-        Artist object = (Artist) DataObjectUtils
+        Artist object = DataObjectUtils
                 .objectForPK(context, Artist.class, 33003);
 
         EJBQLQuery check = new EJBQLQuery("select count(p) from Painting p "
@@ -261,7 +261,7 @@
         Map key1 = new HashMap();
         key1.put(CompoundPkTestEntity.KEY1_PK_COLUMN, "b1");
         key1.put(CompoundPkTestEntity.KEY2_PK_COLUMN, "b2");
-        CompoundPkTestEntity object = (CompoundPkTestEntity) DataObjectUtils.objectForPK(
+        CompoundPkTestEntity object = DataObjectUtils.objectForPK(
                 context,
                 CompoundPkTestEntity.class,
                 key1);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextExtrasTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextExtrasTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextExtrasTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextExtrasTest.java Sat Dec  1 08:42:05 2007
@@ -53,7 +53,7 @@
         deleteTestData();
         DataContext context = createDataContext();
 
-        Artist object = (Artist) context.newObject(Artist.class);
+        Artist object = context.newObject(Artist.class);
         object.setArtistName("ABC");
         assertEquals(PersistenceState.NEW, object.getPersistenceState());
 
@@ -71,7 +71,7 @@
     public void testResolveFault() {
         DataContext context = createDataContext();
 
-        Artist o1 = (Artist) context.newObject(Artist.class);
+        Artist o1 = context.newObject(Artist.class);
         o1.setArtistName("a");
         context.commitChanges();
 
@@ -137,7 +137,7 @@
 
     public void testNewObjectWithClass() {
         DataContext context = createDataContext();
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         assertTrue(context.getGraphManager().registeredNodes().contains(a1));
         assertTrue(context.newObjects().contains(a1));
     }
@@ -198,7 +198,7 @@
 
         adapter.setPkGenerator(newGenerator);
         try {
-            Artist newArtist = (Artist) context.newObject(Artist.class);
+            Artist newArtist = context.newObject(Artist.class);
             newArtist.setArtistName("aaa");
             context.commitChanges();
             fail("Exception expected but not thrown due to missing PK generation routine.");
@@ -291,7 +291,7 @@
         List objects = context.performQuery(new SelectQuery(Artist.class));
         Artist a1 = (Artist) objects.get(0);
 
-        Painting p1 = (Painting) context.newObject(Painting.class);
+        Painting p1 = context.newObject(Painting.class);
         p1.setPaintingTitle("XXX");
         a1.addToPaintingArray(p1);
         a1.resetValidationFlags();
@@ -329,7 +329,7 @@
         Painting p1 = (Painting) objects.get(0);
 
         Artist oldArtist = p1.getToArtist();
-        Artist newArtist = (Artist) DataObjectUtils.objectForPK(
+        Artist newArtist = DataObjectUtils.objectForPK(
                 context,
                 Artist.class,
                 33002);
@@ -358,7 +358,7 @@
         Painting p1 = (Painting) objects.get(0);
 
         Artist oldArtist = p1.getToArtist();
-        Artist newArtist = (Artist) DataObjectUtils.objectForPK(
+        Artist newArtist = DataObjectUtils.objectForPK(
                 context,
                 Artist.class,
                 33002);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPerformQueryAPITest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPerformQueryAPITest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPerformQueryAPITest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPerformQueryAPITest.java Sat Dec  1 08:42:05 2007
@@ -149,7 +149,7 @@
 
     public void testPerfomQueryNonSelecting() throws Exception {
         DataContext context = createDataContext();
-        Artist a = (Artist) context.newObject(Artist.class);
+        Artist a = context.newObject(Artist.class);
         a.setArtistName("aa");
         context.commitChanges();
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPrefetchTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPrefetchTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPrefetchTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPrefetchTest.java Sat Dec  1 08:42:05 2007
@@ -445,7 +445,7 @@
 
     public void testPrefetchingToOneNull() throws Exception {
 
-        Painting p1 = (Painting) context.newObject(Painting.class);
+        Painting p1 = context.newObject(Painting.class);
         p1.setPaintingTitle("aaaa");
 
         context.commitChanges();

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextQueryChainTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextQueryChainTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextQueryChainTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextQueryChainTest.java Sat Dec  1 08:42:05 2007
@@ -31,7 +31,7 @@
 
     public void testSelectQuery() {
         DataContext context = createDataContext();
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         a1.setArtistName("X");
         context.commitChanges();
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSQLTemplateTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSQLTemplateTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSQLTemplateTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSQLTemplateTest.java Sat Dec  1 08:42:05 2007
@@ -313,7 +313,7 @@
         pk.put(CompoundPkTestEntity.KEY1_PK_COLUMN, "a1");
         pk.put(CompoundPkTestEntity.KEY2_PK_COLUMN, "a2");
 
-        CompoundPkTestEntity a = (CompoundPkTestEntity) DataObjectUtils.objectForPK(
+        CompoundPkTestEntity a = DataObjectUtils.objectForPK(
                 context,
                 CompoundPkTestEntity.class,
                 pk);
@@ -340,7 +340,7 @@
         pk.put(CompoundPkTestEntity.KEY1_PK_COLUMN, "a1");
         pk.put(CompoundPkTestEntity.KEY2_PK_COLUMN, "a2");
 
-        CompoundPkTestEntity a = (CompoundPkTestEntity) DataObjectUtils.objectForPK(
+        CompoundPkTestEntity a = DataObjectUtils.objectForPK(
                 context,
                 CompoundPkTestEntity.class,
                 pk);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSerializationTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSerializationTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSerializationTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSerializationTest.java Sat Dec  1 08:42:05 2007
@@ -95,7 +95,7 @@
         assertNotNull(deserializedContext.getEntityResolver());
         assertSame(context.getEntityResolver(), deserializedContext.getEntityResolver());
         
-        Artist a = (Artist) DataObjectUtils.objectForPK(deserializedContext, Artist.class, 33001);
+        Artist a = DataObjectUtils.objectForPK(deserializedContext, Artist.class, 33001);
         assertNotNull(a);
         a.setArtistName(a.getArtistName() + "___");
         deserializedContext.commitChanges();
@@ -126,7 +126,7 @@
                 deserializedContext.getParentDataDomain().getSharedSnapshotCache(),
                 deserializedContext.getObjectStore().getDataRowCache());
         
-        Artist a = (Artist) DataObjectUtils.objectForPK(deserializedContext, Artist.class, 33001);
+        Artist a = DataObjectUtils.objectForPK(deserializedContext, Artist.class, 33001);
         assertNotNull(a);
         a.setArtistName(a.getArtistName() + "___");
         

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSharedCacheEmpiricTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSharedCacheEmpiricTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSharedCacheEmpiricTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSharedCacheEmpiricTest.java Sat Dec  1 08:42:05 2007
@@ -24,7 +24,6 @@
 
 import org.apache.art.Artist;
 import org.apache.cayenne.DataRow;
-import org.apache.cayenne.DataChannel;
 import org.apache.cayenne.PersistenceState;
 import org.apache.cayenne.event.EventManager;
 import org.apache.cayenne.query.SQLTemplate;
@@ -52,8 +51,8 @@
                 Collections.EMPTY_MAP,
                 new EventManager());
 
-        c1 = new DataContext((DataChannel) getDomain(), new ObjectStore(cache));
-        c2 = new DataContext((DataChannel) getDomain(), new ObjectStore(cache));
+        c1 = new DataContext(getDomain(), new ObjectStore(cache));
+        c2 = new DataContext(getDomain(), new ObjectStore(cache));
 
         // prepare a single artist record
         SQLTemplate insert = new SQLTemplate(

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextTest.java Sat Dec  1 08:42:05 2007
@@ -458,7 +458,7 @@
     }
 
     public void changeMaxConnections(int delta) {
-        DataNode node = (DataNode) context
+        DataNode node = context
                 .getParentDataDomain()
                 .getDataNodes()
                 .iterator()

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextValidationTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextValidationTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextValidationTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextValidationTest.java Sat Dec  1 08:42:05 2007
@@ -47,13 +47,13 @@
         // test that validation is called properly
 
         context.setValidatingObjectsOnCommit(true);
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         a1.setArtistName("a1");
         context.commitChanges();
         assertTrue(a1.isValidateForSaveCalled());
 
         context.setValidatingObjectsOnCommit(false);
-        Artist a2 = (Artist) context.newObject(Artist.class);
+        Artist a2 = context.newObject(Artist.class);
         a2.setArtistName("a2");
         context.commitChanges();
         assertFalse(a2.isValidateForSaveCalled());
@@ -67,7 +67,7 @@
             public void validateForSave(Object object, ValidationResult validationResult) {
 
                 Artist a = (Artist) object;
-                Painting p = (Painting) a.getObjectContext().newObject(Painting.class);
+                Painting p = a.getObjectContext().newObject(Painting.class);
                 p.setPaintingTitle("XXX");
                 p.setToArtist(a);
             }
@@ -76,13 +76,13 @@
         DataContext context = createDataContext();
 
         context.setValidatingObjectsOnCommit(true);
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         a1.setValidationDelegate(delegate);
         a1.setArtistName("a1");
 
         // add another artist to ensure that modifying context works when more than one
         // object is committed
-        Artist a2 = (Artist) context.newObject(Artist.class);
+        Artist a2 = context.newObject(Artist.class);
         a2.setValidationDelegate(delegate);
         a2.setArtistName("a2");
         context.commitChanges();

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataDomainCallbacksTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataDomainCallbacksTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataDomainCallbacksTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataDomainCallbacksTest.java Sat Dec  1 08:42:05 2007
@@ -54,7 +54,7 @@
                 listener,
                 "publicCallback");
 
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         a1.setArtistName("XX");
         context.commitChanges();
         assertFalse(a1.isPostLoaded());
@@ -114,7 +114,7 @@
 
         ObjectContext context = createDataContext();
 
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         a1.setArtistName("XX");
         context.commitChanges();
         assertFalse(a1.isPreUpdated());
@@ -154,7 +154,7 @@
 
         ObjectContext context = createDataContext();
 
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         a1.setArtistName("XX");
         context.commitChanges();
         assertFalse(a1.isPostUpdated());
@@ -196,7 +196,7 @@
 
         ObjectContext context = createDataContext();
 
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         a1.setArtistName("XX");
         context.commitChanges();
 
@@ -225,7 +225,7 @@
                 .getCallbackRegistry();
 
         ObjectContext context = createDataContext();
-        Artist a1 = (Artist) context.newObject(Artist.class);
+        Artist a1 = context.newObject(Artist.class);
         a1.setArtistName("XX");
         context.commitChanges();
         assertFalse(a1.isPostPersisted());
@@ -247,7 +247,7 @@
                 listener2,
                 "publicCallback");
 
-        Artist a2 = (Artist) context.newObject(Artist.class);
+        Artist a2 = context.newObject(Artist.class);
         a2.setArtistName("XX");
         context.commitChanges();
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataRowUtilsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataRowUtilsTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataRowUtilsTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataRowUtilsTest.java Sat Dec  1 08:42:05 2007
@@ -79,7 +79,7 @@
         SelectQuery artistQ = new SelectQuery(Artist.class, Expression
                 .fromString("artistName = 'artist2'"));
         Artist anotherArtist = (Artist) context.performQuery(artistQ).get(0);
-        Painting painting = (Painting) context.newObject(Painting.class);
+        Painting painting = context.newObject(Painting.class);
         painting.setPaintingTitle("PX");
         painting.setToArtist(anotherArtist);
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DateTimeTypesTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DateTimeTypesTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DateTimeTypesTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DateTimeTypesTest.java Sat Dec  1 08:42:05 2007
@@ -45,7 +45,7 @@
 
     public void testCalendar() throws Exception {
 
-        CalendarEntity test = (CalendarEntity) context.newObject(CalendarEntity.class);
+        CalendarEntity test = context.newObject(CalendarEntity.class);
 
         Calendar cal = Calendar.getInstance();
         cal.clear();

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DbLoaderTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DbLoaderTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DbLoaderTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DbLoaderTest.java Sat Dec  1 08:42:05 2007
@@ -263,7 +263,7 @@
     }
 
     private DataMap originalMap() {
-        return (DataMap) getNode().getDataMaps().iterator().next();
+        return getNode().getDataMaps().iterator().next();
     }
 
     /**

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DeleteObjectTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DeleteObjectTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DeleteObjectTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DeleteObjectTest.java Sat Dec  1 08:42:05 2007
@@ -161,7 +161,7 @@
     }
 
     public void testDeleteNew() throws Exception {
-        Artist artist = (Artist) context.newObject(Artist.class);
+        Artist artist = context.newObject(Artist.class);
         artist.setArtistName("a");
 
         assertEquals(PersistenceState.NEW, artist.getPersistenceState());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DeleteRulesTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DeleteRulesTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DeleteRulesTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DeleteRulesTest.java Sat Dec  1 08:42:05 2007
@@ -93,9 +93,9 @@
         int oldRule = changeDeleteRule(DeleteRule.NO_ACTION);
 
         try {
-            DeleteRuleFlatA a = (DeleteRuleFlatA) context
+            DeleteRuleFlatA a = context
                     .newObject(DeleteRuleFlatA.class);
-            DeleteRuleFlatB b = (DeleteRuleFlatB) context
+            DeleteRuleFlatB b = context
                     .newObject(DeleteRuleFlatB.class);
 
             a.addToFlatB(b);
@@ -123,9 +123,9 @@
         ObjRelationship reverse = unsetReverse();
 
         try {
-            DeleteRuleFlatA a = (DeleteRuleFlatA) context
+            DeleteRuleFlatA a = context
                     .newObject(DeleteRuleFlatA.class);
-            DeleteRuleFlatB b = (DeleteRuleFlatB) context
+            DeleteRuleFlatB b = context
                     .newObject(DeleteRuleFlatB.class);
 
             a.addToFlatB(b);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/IdentityColumnsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/IdentityColumnsTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/IdentityColumnsTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/IdentityColumnsTest.java Sat Dec  1 08:42:05 2007
@@ -50,7 +50,7 @@
      */
     public void testCAY823() throws Exception {
         DataContext context = createDataContext();
-        GeneratedColumnTestEntity idObject = (GeneratedColumnTestEntity) context
+        GeneratedColumnTestEntity idObject = context
                 .newObject(GeneratedColumnTestEntity.class);
 
         String name = "n_" + System.currentTimeMillis();
@@ -72,7 +72,7 @@
 
     public void testNewObject() throws Exception {
         DataContext context = createDataContext();
-        GeneratedColumnTestEntity idObject = (GeneratedColumnTestEntity) context
+        GeneratedColumnTestEntity idObject = context
                 .newObject(GeneratedColumnTestEntity.class);
 
         String name = "n_" + System.currentTimeMillis();
@@ -86,7 +86,7 @@
 
         // make sure that id is the same as id in the DB
         context.invalidateObjects(Collections.singleton(idObject));
-        GeneratedColumnTestEntity object = (GeneratedColumnTestEntity) DataObjectUtils
+        GeneratedColumnTestEntity object = DataObjectUtils
                 .objectForPK(context, GeneratedColumnTestEntity.class, id);
         assertNotNull(object);
         assertEquals(name, object.getName());
@@ -97,12 +97,12 @@
      */
     public void testUnrelatedUpdate() throws Exception {
         DataContext context = createDataContext();
-        GeneratedColumnTestEntity m = (GeneratedColumnTestEntity) context
+        GeneratedColumnTestEntity m = context
                 .newObject(GeneratedColumnTestEntity.class);
 
         m.setName("m");
 
-        GeneratedColumnDep d = (GeneratedColumnDep) context
+        GeneratedColumnDep d = context
                 .newObject(GeneratedColumnDep.class);
         d.setName("d");
         d.setToMaster(m);
@@ -128,11 +128,11 @@
     public void testMultipleNewObjectsSeparateTables() throws Exception {
         DataContext context = createDataContext();
 
-        GeneratedColumnTestEntity idObject1 = (GeneratedColumnTestEntity) context
+        GeneratedColumnTestEntity idObject1 = context
                 .newObject(GeneratedColumnTestEntity.class);
         idObject1.setName("o1");
 
-        GeneratedColumnTest2 idObject2 = (GeneratedColumnTest2) context
+        GeneratedColumnTest2 idObject2 = context
                 .newObject(GeneratedColumnTest2.class);
         idObject2.setName("o2");
 
@@ -148,11 +148,11 @@
         };
 
         GeneratedColumnTestEntity[] idObjects = new GeneratedColumnTestEntity[] {
-                (GeneratedColumnTestEntity) context
+                context
                         .newObject(GeneratedColumnTestEntity.class),
-                (GeneratedColumnTestEntity) context
+                context
                         .newObject(GeneratedColumnTestEntity.class),
-                (GeneratedColumnTestEntity) context
+                context
                         .newObject(GeneratedColumnTestEntity.class)
         };
 
@@ -171,7 +171,7 @@
         context.invalidateObjects(Arrays.asList(idObjects));
 
         for (int i = 0; i < ids.length; i++) {
-            GeneratedColumnTestEntity object = (GeneratedColumnTestEntity) DataObjectUtils
+            GeneratedColumnTestEntity object = DataObjectUtils
                     .objectForPK(context, GeneratedColumnTestEntity.class, ids[i]);
             assertNotNull(object);
             assertEquals(names[i], object.getName());
@@ -188,16 +188,16 @@
             String depName2 = "dep2_" + System.currentTimeMillis();
 
             DataContext context = createDataContext();
-            GeneratedColumnCompMaster master = (GeneratedColumnCompMaster) context
+            GeneratedColumnCompMaster master = context
                     .newObject(GeneratedColumnCompMaster.class);
             master.setName(masterName);
 
-            GeneratedColumnCompKey dep1 = (GeneratedColumnCompKey) context
+            GeneratedColumnCompKey dep1 = context
                     .newObject(GeneratedColumnCompKey.class);
             dep1.setName(depName1);
             dep1.setToMaster(master);
 
-            GeneratedColumnCompKey dep2 = (GeneratedColumnCompKey) context
+            GeneratedColumnCompKey dep2 = context
                     .newObject(GeneratedColumnCompKey.class);
             dep2.setName(depName2);
             dep2.setToMaster(master);
@@ -235,11 +235,11 @@
 
     public void testUpdateDependentWithNewMaster() throws Exception {
         DataContext context = createDataContext();
-        GeneratedColumnTestEntity master1 = (GeneratedColumnTestEntity) context
+        GeneratedColumnTestEntity master1 = context
                 .newObject(GeneratedColumnTestEntity.class);
         master1.setName("aaa");
 
-        GeneratedColumnDep dependent = (GeneratedColumnDep) context
+        GeneratedColumnDep dependent = context
                 .newObject(GeneratedColumnDep.class);
         dependent.setName("aaa");
         dependent.setToMaster(master1);
@@ -247,7 +247,7 @@
         context.commitChanges();
 
         // change master
-        GeneratedColumnTestEntity master2 = (GeneratedColumnTestEntity) context
+        GeneratedColumnTestEntity master2 = context
                 .newObject(GeneratedColumnTestEntity.class);
         master2.setName("bbb");
 
@@ -281,11 +281,11 @@
 
     public void testPropagateToDependent() throws Exception {
         DataContext context = createDataContext();
-        GeneratedColumnTestEntity idObject = (GeneratedColumnTestEntity) context
+        GeneratedColumnTestEntity idObject = context
                 .newObject(GeneratedColumnTestEntity.class);
         idObject.setName("aaa");
 
-        GeneratedColumnDep dependent = (GeneratedColumnDep) idObject
+        GeneratedColumnDep dependent = idObject
                 .getObjectContext()
                 .newObject(GeneratedColumnDep.class);
         dependent.setName("aaa");

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/InheritanceTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/InheritanceTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/InheritanceTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/InheritanceTest.java Sat Dec  1 08:42:05 2007
@@ -49,16 +49,16 @@
     }
 
     public void testSave() throws Exception {
-        ClientCompany company = (ClientCompany) context.newObject(ClientCompany.class);
+        ClientCompany company = context.newObject(ClientCompany.class);
         company.setName("Boeing");
 
-        CustomerRepresentative rep = (CustomerRepresentative) context
+        CustomerRepresentative rep = context
                 .newObject(CustomerRepresentative.class);
         rep.setName("Joe Schmoe");
         rep.setToClientCompany(company);
         rep.setPersonType("C");
 
-        Employee employee = (Employee) context.newObject(Employee.class);
+        Employee employee = context.newObject(Employee.class);
         employee.setName("Our Joe Schmoe");
         employee.setPersonType("E");
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentEventsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentEventsTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentEventsTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentEventsTest.java Sat Dec  1 08:42:05 2007
@@ -28,7 +28,7 @@
         DataContext context = createDataContext();
         DataContext child1 = context.createChildDataContext();
 
-        Artist ac = (Artist) child1.newObject(Artist.class);
+        Artist ac = child1.newObject(Artist.class);
         ac.setArtistName("X");
         child1.commitChangesToParent();
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentPeerEventsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentPeerEventsTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentPeerEventsTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentPeerEventsTest.java Sat Dec  1 08:42:05 2007
@@ -29,7 +29,7 @@
     public void testPeerObjectUpdatedSimpleProperty() throws Exception {
         DataContext context = createDataContext();
 
-        Artist a = (Artist) context.newObject(Artist.class);
+        Artist a = context.newObject(Artist.class);
         a.setArtistName("X");
         context.commitChanges();
 
@@ -58,10 +58,10 @@
 
         DataContext context = createDataContext();
 
-        Artist a = (Artist) context.newObject(Artist.class);
-        Artist altA = (Artist) context.newObject(Artist.class);
+        Artist a = context.newObject(Artist.class);
+        Artist altA = context.newObject(Artist.class);
 
-        Painting p = (Painting) context.newObject(Painting.class);
+        Painting p = context.newObject(Painting.class);
         p.setToArtist(a);
         p.setPaintingTitle("PPP");
         a.setArtistName("X");
@@ -96,14 +96,14 @@
 
         DataContext context = createDataContext();
 
-        Artist a = (Artist) context.newObject(Artist.class);
+        Artist a = context.newObject(Artist.class);
         a.setArtistName("X");
 
-        Painting px = (Painting) context.newObject(Painting.class);
+        Painting px = context.newObject(Painting.class);
         px.setToArtist(a);
         px.setPaintingTitle("PX");
 
-        Painting py = (Painting) context.newObject(Painting.class);
+        Painting py = context.newObject(Painting.class);
         py.setPaintingTitle("PY");
 
         context.commitChanges();

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextPeerEventsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextPeerEventsTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextPeerEventsTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextPeerEventsTest.java Sat Dec  1 08:42:05 2007
@@ -30,7 +30,7 @@
         DataContext context = createDataContext();
 
         DataContext peer1 = context.createChildDataContext();
-        Artist a1 = (Artist) peer1.newObject(Artist.class);
+        Artist a1 = peer1.newObject(Artist.class);
         a1.setArtistName("Y");
         ObjectId a1TempId = a1.getObjectId();
 
@@ -48,7 +48,7 @@
     public void testPeerObjectUpdatedSimpleProperty() {
         DataContext context = createDataContext();
 
-        Artist a = (Artist) context.newObject(Artist.class);
+        Artist a = context.newObject(Artist.class);
         a.setArtistName("X");
         context.commitChanges();
 
@@ -71,10 +71,10 @@
 
         DataContext context = createDataContext();
 
-        Artist a = (Artist) context.newObject(Artist.class);
-        Artist altA = (Artist) context.newObject(Artist.class);
+        Artist a = context.newObject(Artist.class);
+        Artist altA = context.newObject(Artist.class);
 
-        Painting p = (Painting) context.newObject(Painting.class);
+        Painting p = context.newObject(Painting.class);
         p.setToArtist(a);
         p.setPaintingTitle("PPP");
         a.setArtistName("X");
@@ -103,14 +103,14 @@
 
         DataContext context = createDataContext();
 
-        Artist a = (Artist) context.newObject(Artist.class);
+        Artist a = context.newObject(Artist.class);
         a.setArtistName("X");
 
-        Painting px = (Painting) context.newObject(Painting.class);
+        Painting px = context.newObject(Painting.class);
         px.setToArtist(a);
         px.setPaintingTitle("PX");
 
-        Painting py = (Painting) context.newObject(Painting.class);
+        Painting py = context.newObject(Painting.class);
         py.setPaintingTitle("PY");
 
         context.commitChanges();

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextReadTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextReadTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextReadTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextReadTest.java Sat Dec  1 08:42:05 2007
@@ -203,8 +203,8 @@
         DataContext context = createDataContext();
         DataContext childContext = context.createChildDataContext();
 
-        Artist _new = (Artist) context.newObject(Artist.class);
-        Painting _newP = (Painting) context.newObject(Painting.class);
+        Artist _new = context.newObject(Artist.class);
+        Painting _newP = context.newObject(Painting.class);
         _new.addToPaintingArray(_newP);
 
         blockQueries();
@@ -295,20 +295,20 @@
         int committedTargetSrcId = 33004;
         int newTargetSrcId = 33005;
 
-        Painting hollowTargetSrc = (Painting) DataObjectUtils.objectForPK(
+        Painting hollowTargetSrc = DataObjectUtils.objectForPK(
                 parent,
                 Painting.class,
                 hollowTargetSrcId);
         Artist hollowTarget = hollowTargetSrc.getToArtist();
 
-        Painting modifiedTargetSrc = (Painting) DataObjectUtils.objectForPK(
+        Painting modifiedTargetSrc = DataObjectUtils.objectForPK(
                 parent,
                 Painting.class,
                 modifiedTargetSrcId);
         Artist modifiedTarget = modifiedTargetSrc.getToArtist();
         modifiedTarget.setArtistName("M1");
 
-        Painting deletedTargetSrc = (Painting) DataObjectUtils.objectForPK(
+        Painting deletedTargetSrc = DataObjectUtils.objectForPK(
                 parent,
                 Painting.class,
                 deletedTargetSrcId);
@@ -316,18 +316,18 @@
         deletedTargetSrc.setToArtist(null);
         parent.deleteObject(deletedTarget);
 
-        Painting committedTargetSrc = (Painting) DataObjectUtils.objectForPK(
+        Painting committedTargetSrc = DataObjectUtils.objectForPK(
                 parent,
                 Painting.class,
                 committedTargetSrcId);
         Artist committedTarget = committedTargetSrc.getToArtist();
         committedTarget.getArtistName();
 
-        Painting newTargetSrc = (Painting) DataObjectUtils.objectForPK(
+        Painting newTargetSrc = DataObjectUtils.objectForPK(
                 parent,
                 Painting.class,
                 newTargetSrcId);
-        Artist newTarget = (Artist) parent.newObject(Artist.class);
+        Artist newTarget = parent.newObject(Artist.class);
         newTarget.setArtistName("N1");
         newTargetSrc.setToArtist(newTarget);
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextValidationTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextValidationTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextValidationTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextValidationTest.java Sat Dec  1 08:42:05 2007
@@ -34,7 +34,7 @@
                 "Child context must have inherited the validation flag from parent",
                 childContext.isValidatingObjectsOnCommit());
 
-        Artist a1 = (Artist) childContext.newObject(Artist.class);
+        Artist a1 = childContext.newObject(Artist.class);
         try {
             childContext.commitChangesToParent();
             fail("No validation was performed");

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextWriteTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextWriteTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextWriteTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextWriteTest.java Sat Dec  1 08:42:05 2007
@@ -52,7 +52,7 @@
         DataContext childContext = context.createChildDataContext();
 
         Artist a = DataObjectUtils.objectForPK(childContext, Artist.class, 33001);
-        Painting p = (Painting) childContext.newObject(Painting.class);
+        Painting p = childContext.newObject(Painting.class);
         p.setPaintingTitle("X");
         a.addToPaintingArray(p);
 
@@ -75,7 +75,7 @@
         DataContext childContext = context.createChildDataContext();
         DataContext childContextPeer = context.createChildDataContext();
 
-        Painting childP1 = (Painting) DataObjectUtils.objectForPK(
+        Painting childP1 = DataObjectUtils.objectForPK(
                 childContext,
                 Painting.class,
                 33001);
@@ -225,7 +225,7 @@
 
         assertEquals(4, objects.size());
 
-        Artist childNew = (Artist) childContext.newObject(Artist.class);
+        Artist childNew = childContext.newObject(Artist.class);
         childNew.setArtistName("NNN");
 
         Artist childModified = (Artist) objects.get(0);
@@ -365,10 +365,10 @@
         DataContext context = createDataContext();
         DataContext childContext = context.createChildDataContext();
 
-        Painting childMaster = (Painting) childContext.newObject(Painting.class);
+        Painting childMaster = childContext.newObject(Painting.class);
         childMaster.setPaintingTitle("Master");
 
-        PaintingInfo childDetail1 = (PaintingInfo) childContext
+        PaintingInfo childDetail1 = childContext
                 .newObject(PaintingInfo.class);
         childDetail1.setTextReview("Detail1");
         childDetail1.setPainting(childMaster);
@@ -406,10 +406,10 @@
         DataContext context = createDataContext();
         DataContext childContext = context.createChildDataContext();
 
-        Artist childO1 = (Artist) childContext.newObject(Artist.class);
+        Artist childO1 = childContext.newObject(Artist.class);
         childO1.setArtistName("Master");
 
-        ArtGroup childO2 = (ArtGroup) childContext.newObject(ArtGroup.class);
+        ArtGroup childO2 = childContext.newObject(ArtGroup.class);
         childO2.setName("Detail1");
         childO2.addToArtistArray(childO1);
 
@@ -450,16 +450,16 @@
         DataContext context = createDataContext();
         DataContext childContext = context.createChildDataContext();
 
-        Artist childO1 = (Artist) childContext.newObject(Artist.class);
+        Artist childO1 = childContext.newObject(Artist.class);
         childO1.setArtistName("o1");
 
-        ArtGroup childO2 = (ArtGroup) childContext.newObject(ArtGroup.class);
+        ArtGroup childO2 = childContext.newObject(ArtGroup.class);
         childO2.setName("o2");
         childO2.addToArtistArray(childO1);
 
         childContext.commitChangesToParent();
 
-        ArtGroup childO3 = (ArtGroup) childContext.newObject(ArtGroup.class);
+        ArtGroup childO3 = childContext.newObject(ArtGroup.class);
         childO3.setName("o3");
         childO1.addToGroupArray(childO3);
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NumericTypesTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NumericTypesTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NumericTypesTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NumericTypesTest.java Sat Dec  1 08:42:05 2007
@@ -56,7 +56,7 @@
 
     public void testLong() throws Exception {
 
-        LongEntity test = (LongEntity) context.newObject(LongEntity.class);
+        LongEntity test = context.newObject(LongEntity.class);
 
         Long i = new Long(Integer.MAX_VALUE + 10l);
         test.setLongField(i);
@@ -73,7 +73,7 @@
 
     public void testBigInteger() throws Exception {
 
-        BigIntegerEntity test = (BigIntegerEntity) context
+        BigIntegerEntity test = context
                 .newObject(BigIntegerEntity.class);
 
         BigInteger i = new BigInteger("1234567890");
@@ -91,7 +91,7 @@
 
     public void testBigDecimal() throws Exception {
 
-        BigDecimalEntity test = (BigDecimalEntity) context
+        BigDecimalEntity test = context
                 .newObject(BigDecimalEntity.class);
 
         BigDecimal i = new BigDecimal("1234567890.44");
@@ -234,7 +234,7 @@
     public void testDecimalPK() throws Exception {
 
         // populate (testing insert as well)
-        DecimalPKTestEntity object = (DecimalPKTestEntity) context
+        DecimalPKTestEntity object = context
                 .newObject(DecimalPKTestEntity.class);
 
         object.setName("o1");
@@ -249,7 +249,7 @@
     public void testDecimalPK1() throws Exception {
 
         // populate (testing insert as well)
-        DecimalPKTest1 object = (DecimalPKTest1) context.newObject(DecimalPKTest1.class);
+        DecimalPKTest1 object = context.newObject(DecimalPKTest1.class);
 
         object.setName("o2");
         object.setDecimalPK(new Double(1.25));

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreDiffRetainingTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreDiffRetainingTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreDiffRetainingTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreDiffRetainingTest.java Sat Dec  1 08:42:05 2007
@@ -38,7 +38,7 @@
         createTestData("test");
 
         DataContext context = createDataContext();
-        Artist a = (Artist) DataObjectUtils.objectForPK(context, Artist.class, 2000);
+        Artist a = DataObjectUtils.objectForPK(context, Artist.class, 2000);
         ObjectStore objectStore = context.getObjectStore();
 
         assertNull(objectStore.getChangesByObjectId().get(a.getObjectId()));
@@ -51,7 +51,7 @@
         createTestData("test");
 
         DataContext context = createDataContext();
-        Artist a = (Artist) DataObjectUtils.objectForPK(context, Artist.class, 2000);
+        Artist a = DataObjectUtils.objectForPK(context, Artist.class, 2000);
         ObjectStore objectStore = context.getObjectStore();
 
         assertNull(objectStore.getChangesByObjectId().get(a.getObjectId()));
@@ -61,7 +61,7 @@
         // snapshot is not retained... in testing this I am leaving some flexibility for
         // the framework to retain a snapshot when it deems appropriate...
 
-        a.addToPaintingArray((Painting) context.newObject(Painting.class));
+        a.addToPaintingArray(context.newObject(Painting.class));
         a.setArtistName("some other name");
         assertNotNull("Snapshot wasn't retained - CAY-213", objectStore
                 .getChangesByObjectId()

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreGCTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreGCTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreGCTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreGCTest.java Sat Dec  1 08:42:05 2007
@@ -56,7 +56,7 @@
         final DataContext context = createDataContext();
 
         assertEquals(0, context.getObjectStore().registeredObjectsCount());
-        Artist a = (Artist) context.newObject(Artist.class);
+        Artist a = context.newObject(Artist.class);
         a.setArtistName("X");
         a = null;
         assertEquals(1, context.getObjectStore().registeredObjectsCount());
@@ -89,7 +89,7 @@
                 "insert into ARTIST (ARTIST_ID, ARTIST_NAME) values (1, 'aa')"));
 
         assertEquals(0, context.getObjectStore().registeredObjectsCount());
-        Artist a = (Artist) DataObjectUtils.objectForPK(context, Artist.class, 1);
+        Artist a = DataObjectUtils.objectForPK(context, Artist.class, 1);
         a.setArtistName("Y");
         a = null;
         assertEquals(1, context.getObjectStore().registeredObjectsCount());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreTest.java Sat Dec  1 08:42:05 2007
@@ -125,15 +125,15 @@
         DataContext context = createDataContext();
 
         // Create a gallery.
-        Gallery g = (Gallery) context.newObject(Gallery.class);
+        Gallery g = context.newObject(Gallery.class);
         g.setGalleryName("Test Gallery");
 
         // Create an artist in the same context.
-        Artist a = (Artist) context.newObject(Artist.class);
+        Artist a = context.newObject(Artist.class);
         a.setArtistName("Test Artist");
 
         // Create a painting in the same context.
-        Painting p = (Painting) context.newObject(Painting.class);
+        Painting p = context.newObject(Painting.class);
         p.setPaintingTitle("Test Painting");
 
         // Set the painting's gallery.

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/OptimisticLockingTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/OptimisticLockingTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/OptimisticLockingTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/OptimisticLockingTest.java Sat Dec  1 08:42:05 2007
@@ -345,7 +345,7 @@
         context.commitChanges();
 
         // change relationship and save... no optimistic lock failure expected
-        SimpleLockingTestEntity object1 = (SimpleLockingTestEntity) context
+        SimpleLockingTestEntity object1 = context
                 .newObject(SimpleLockingTestEntity.class);
         object.setToSimpleLockingTest(object1);
         context.commitChanges();

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/PrimitiveAttributesTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/PrimitiveAttributesTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/PrimitiveAttributesTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/PrimitiveAttributesTest.java Sat Dec  1 08:42:05 2007
@@ -27,7 +27,7 @@
     public void testCommit() {
         ObjectContext context = createDataContext();
 
-        PrimitivesTestEntity e = (PrimitivesTestEntity) context
+        PrimitivesTestEntity e = context
                 .newObject(PrimitivesTestEntity.class);
         e.setBooleanColumn(true);
         e.setIntColumn(88);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/RefreshQueryInContextTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/RefreshQueryInContextTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/RefreshQueryInContextTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/RefreshQueryInContextTest.java Sat Dec  1 08:42:05 2007
@@ -178,7 +178,7 @@
         List paints = context.performQuery(q);
 
         // fetch P1 separately from cached query
-        Painting p1 = (Painting) DataObjectUtils.objectForPK(
+        Painting p1 = DataObjectUtils.objectForPK(
                 context,
                 Painting.class,
                 33001);
@@ -240,7 +240,7 @@
         List paints = context.performQuery(q);
 
         // fetch P1 separately from cached query
-        Painting p1 = (Painting) DataObjectUtils.objectForPK(
+        Painting p1 = DataObjectUtils.objectForPK(
                 context,
                 Painting.class,
                 33001);
@@ -302,7 +302,7 @@
         List paints = context.performQuery(q);
 
         // fetch P1 separately from cached query
-        Painting p1 = (Painting) DataObjectUtils.objectForPK(
+        Painting p1 = DataObjectUtils.objectForPK(
                 context,
                 Painting.class,
                 33001);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ToManyListTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ToManyListTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ToManyListTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ToManyListTest.java Sat Dec  1 08:42:05 2007
@@ -54,11 +54,11 @@
                 .isFault());
         assertEquals(0, list.size());
 
-        Painting p1 = (Painting) context.newObject(Painting.class);
+        Painting p1 = context.newObject(Painting.class);
         list.add(p1);
         assertEquals(1, list.size());
 
-        Painting p2 = (Painting) context.newObject(Painting.class);
+        Painting p2 = context.newObject(Painting.class);
         list.add(p2);
         assertEquals(2, list.size());
 
@@ -76,12 +76,12 @@
 
         assertTrue("List must be unresolved for an existing object", list.isFault());
 
-        Painting p1 = (Painting) context.newObject(Painting.class);
+        Painting p1 = context.newObject(Painting.class);
         list.add(p1);
         assertTrue("List must be unresolved when adding an object...", list.isFault());
         assertTrue(list.addedToUnresolved.contains(p1));
 
-        Painting p2 = (Painting) context.newObject(Painting.class);
+        Painting p2 = context.newObject(Painting.class);
         list.add(p2);
         assertTrue("List must be unresolved when adding an object...", list.isFault());
         assertTrue(list.addedToUnresolved.contains(p2));
@@ -100,7 +100,7 @@
     public void testSavedUnresolvedMerge() throws Exception {
         ToManyList list = createForExistingArtist();
 
-        Painting p1 = (Painting) context.newObject(Painting.class);
+        Painting p1 = context.newObject(Painting.class);
         p1.setPaintingTitle("p1");
 
         // list being tested is a separate copy from
@@ -119,7 +119,7 @@
         assertTrue("List must be unresolved when adding an object...", list.isFault());
         assertTrue(list.addedToUnresolved.contains(p1));
 
-        Painting p2 = (Painting) context.newObject(Painting.class);
+        Painting p2 = context.newObject(Painting.class);
         list.add(p2);
         assertTrue("List must be unresolved when adding an object...", list.isFault());
         assertTrue(list.addedToUnresolved.contains(p2));
@@ -135,9 +135,9 @@
     public void testThrowOutDeleted() throws Exception {
         ToManyList list = createForExistingArtist();
 
-        Painting p1 = (Painting) context.newObject(Painting.class);
+        Painting p1 = context.newObject(Painting.class);
         p1.setPaintingTitle("p1");
-        Painting p2 = (Painting) context.newObject(Painting.class);
+        Painting p2 = context.newObject(Painting.class);
         p2.setPaintingTitle("p2");
 
         // list being tested is a separate copy from
@@ -181,10 +181,10 @@
     }
 
     public void testRealRelationship() throws Exception {
-        Artist artist = (Artist) context.newObject(Artist.class);
+        Artist artist = context.newObject(Artist.class);
         artist.setArtistName("aaa");
 
-        Painting p1 = (Painting) context.newObject(Painting.class);
+        Painting p1 = context.newObject(Painting.class);
         p1.setPaintingTitle("p1");
 
         context.commitChanges();
@@ -193,7 +193,7 @@
         ToManyList list = (ToManyList) artist.getPaintingArray();
         assertTrue("List must be unresolved...", list.isFault());
 
-        Painting p2 = (Painting) context.newObject(Painting.class);
+        Painting p2 = context.newObject(Painting.class);
         p2.setPaintingTitle("p2");
 
         artist.addToPaintingArray(p1);
@@ -212,10 +212,10 @@
     }
 
     public void testRealRelationshipRollback() throws Exception {
-        Artist artist = (Artist) context.newObject(Artist.class);
+        Artist artist = context.newObject(Artist.class);
         artist.setArtistName("aaa");
 
-        Painting p1 = (Painting) context.newObject(Painting.class);
+        Painting p1 = context.newObject(Painting.class);
         p1.setPaintingTitle("p1");
         artist.addToPaintingArray(p1);
         context.commitChanges();
@@ -224,7 +224,7 @@
         ToManyList list = (ToManyList) artist.getPaintingArray();
         assertTrue("List must be unresolved...", list.isFault());
 
-        Painting p2 = (Painting) context.newObject(Painting.class);
+        Painting p2 = context.newObject(Painting.class);
 
         artist.addToPaintingArray(p2);
         assertTrue("List must be unresolved...", list.isFault());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/TransactionThreadTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/TransactionThreadTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/TransactionThreadTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/TransactionThreadTest.java Sat Dec  1 08:42:05 2007
@@ -55,7 +55,7 @@
     public void testThreadConnectionReuseOnQueryFromWillCommit() throws Exception {
         deleteTestData();
 
-        Artist a = (Artist) createDataContext().newObject(Artist.class);
+        Artist a = createDataContext().newObject(Artist.class);
         a.setArtistName("aaa");
 
         Delegate delegate = new Delegate() {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/UserTransactionTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/UserTransactionTest.java?rev=600160&r1=600159&r2=600160&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/UserTransactionTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/UserTransactionTest.java Sat Dec  1 08:42:05 2007
@@ -29,7 +29,7 @@
     public void testCommit() throws Exception {
         DataContext context = createDataContext();
 
-        Artist a = (Artist) context.newObject(Artist.class);
+        Artist a = context.newObject(Artist.class);
         a.setArtistName("AAA");
 
         final boolean[] willAddConnectionCalled = new boolean[1];



Mime
View raw message