db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r520723 - in /db/ojb/trunk/src: java/org/apache/ojb/broker/metadata/ java/org/apache/ojb/broker/metadata/torque/ test/org/apache/ojb/broker/metadata/
Date Wed, 21 Mar 2007 02:30:40 GMT
Author: arminw
Date: Tue Mar 20 19:30:39 2007
New Revision: 520723

URL: http://svn.apache.org/viewvc?view=rev&rev=520723
Log:
change method

Modified:
    db/ojb/trunk/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java
    db/ojb/trunk/src/java/org/apache/ojb/broker/metadata/torque/TorqueForeignKeyGenerator.java
    db/ojb/trunk/src/java/org/apache/ojb/broker/metadata/torque/TorqueTablePreprocessor.java
    db/ojb/trunk/src/test/org/apache/ojb/broker/metadata/MetadataTest.java

Modified: db/ojb/trunk/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java?view=diff&rev=520723&r1=520722&r2=520723
==============================================================================
--- db/ojb/trunk/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java (original)
+++ db/ojb/trunk/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java Tue Mar
20 19:30:39 2007
@@ -330,7 +330,7 @@
         ClassDescriptor result = (ClassDescriptor) m_firstConcreteClassMap.get(cld.getClassNameOfObject());
         if (result == null)
         {
-            if(!cld.isMappedToTable() || cld.isAbstract())
+            if(!cld.isMappedToTable())
             {
                 if(cld.isExtent())
                 {
@@ -386,7 +386,7 @@
                     // prevent infinite recursion caused by cyclic references
                     continue;
                 }
-                if (extCld.isMappedToTable() && !extCld.isAbstract())
+                if (extCld.isMappedToTable())
                 {
                     concreteSubclassClds.add(extCld);
                 }

Modified: db/ojb/trunk/src/java/org/apache/ojb/broker/metadata/torque/TorqueForeignKeyGenerator.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/java/org/apache/ojb/broker/metadata/torque/TorqueForeignKeyGenerator.java?view=diff&rev=520723&r1=520722&r2=520723
==============================================================================
--- db/ojb/trunk/src/java/org/apache/ojb/broker/metadata/torque/TorqueForeignKeyGenerator.java
(original)
+++ db/ojb/trunk/src/java/org/apache/ojb/broker/metadata/torque/TorqueForeignKeyGenerator.java
Tue Mar 20 19:30:39 2007
@@ -41,7 +41,7 @@
         Iterator classDescriptorIterators = this.repository.iterator();
         while (classDescriptorIterators.hasNext()) {
             ClassDescriptor cd = (ClassDescriptor) classDescriptorIterators.next();
-            if(cd.isAbstract() || cd.isInterface())
+            if(!cd.isMappedToTable())
             {
 				logger.debug( "Skip constraint build for abstract class/ interface " + cd.getClassNameOfObject()
);
             }
@@ -97,7 +97,7 @@
     private void buildManyToManyReferences(ClassDescriptor cd, CollectionDescriptor collectionDescriptor,
                                            Object keys[], Vector columns)
     {
-        if(cd.isAbstract() || cd.isInterface())
+        if(!cd.isMappedToTable())
         {
 			logger.debug( "Skip foreign key build for MtoM, found abstract base class or interface
" + cd.getClassNameOfObject() );
             return;
@@ -148,7 +148,7 @@
 
     private void buildForeignKey(ClassDescriptor foreignClassDescriptor, Vector foreignKeyIndices,
ClassDescriptor classDescriptor) {
 
-        if(classDescriptor.isAbstract() || classDescriptor.isInterface())
+        if(!classDescriptor.isMappedToTable())
         {
 			logger.debug( "Skip foreign key build, found abstract base class or interface " + classDescriptor.getClassNameOfObject()
);
             return;

Modified: db/ojb/trunk/src/java/org/apache/ojb/broker/metadata/torque/TorqueTablePreprocessor.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/java/org/apache/ojb/broker/metadata/torque/TorqueTablePreprocessor.java?view=diff&rev=520723&r1=520722&r2=520723
==============================================================================
--- db/ojb/trunk/src/java/org/apache/ojb/broker/metadata/torque/TorqueTablePreprocessor.java
(original)
+++ db/ojb/trunk/src/java/org/apache/ojb/broker/metadata/torque/TorqueTablePreprocessor.java
Tue Mar 20 19:30:39 2007
@@ -35,7 +35,7 @@
         Iterator classDescriptorIterators = this.repository.iterator();
         while (classDescriptorIterators.hasNext()) {
             ClassDescriptor cd = (ClassDescriptor) classDescriptorIterators.next();
-            if(cd.isAbstract() || cd.isInterface())
+            if(cd.isMappedToTable())
             {
                 System.out.println("Skip table build for abstract base class / interface
called "+cd.getClassNameOfObject());
             }

Modified: db/ojb/trunk/src/test/org/apache/ojb/broker/metadata/MetadataTest.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/broker/metadata/MetadataTest.java?view=diff&rev=520723&r1=520722&r2=520723
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/metadata/MetadataTest.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/metadata/MetadataTest.java Tue Mar 20 19:30:39
2007
@@ -109,7 +109,7 @@
         ClassDescriptor cld = dr.getDescriptorFor(Repository.SMInterface.class);
         ClassDescriptor firstConcrete = dr.findFirstConcreteClass(cld);
         assertTrue(firstConcrete.isMappedToTable());
-        assertFalse(firstConcrete.isAbstract());
+        assertTrue(firstConcrete.isMappedToTable());
     }
 
     public void testDescriptorRepository_1()



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message