db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/metadata/torque TorqueForeignKeyGenerator.java
Date Sat, 06 Dec 2003 12:32:34 GMT
thma        2003/12/06 04:32:34

  Modified:    src/java/org/apache/ojb/broker/metadata/torque
                        TorqueForeignKeyGenerator.java
  Log:
  eliminate System.out.println calls!
  
  Revision  Changes    Path
  1.7       +7 -8      db-ojb/src/java/org/apache/ojb/broker/metadata/torque/TorqueForeignKeyGenerator.java
  
  Index: TorqueForeignKeyGenerator.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/torque/TorqueForeignKeyGenerator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TorqueForeignKeyGenerator.java	2 Apr 2003 08:23:44 -0000	1.6
  +++ TorqueForeignKeyGenerator.java	6 Dec 2003 12:32:34 -0000	1.7
  @@ -59,13 +59,15 @@
   import org.apache.ojb.broker.metadata.DescriptorRepository;
   import org.apache.ojb.broker.metadata.FieldDescriptor;
   import org.apache.ojb.broker.metadata.ObjectReferenceDescriptor;
  +import org.apache.ojb.broker.util.logging.Logger;
  +import org.apache.ojb.broker.util.logging.LoggerFactory;
   
   import java.util.HashMap;
   import java.util.Iterator;
   import java.util.Vector;
   
   public class TorqueForeignKeyGenerator {
  -
  +	private final Logger logger = LoggerFactory.getLogger(this.getClass());
       private DescriptorRepository repository;
       private HashMap mappingTables = new HashMap();
       private HashMap foreignKeyVectors = new HashMap();
  @@ -80,7 +82,7 @@
               ClassDescriptor cd = (ClassDescriptor) classDescriptorIterators.next();
               if(cd.isAbstract() || cd.isInterface())
               {
  -                System.out.println("Skip constraint build for abstract class/ interface
"+cd.getClassNameOfObject());
  +				logger.debug( "Skip constraint build for abstract class/ interface " + cd.getClassNameOfObject()
);
               }
               else
               {
  @@ -136,8 +138,7 @@
       {
           if(cd.isAbstract() || cd.isInterface())
           {
  -            System.out.println("Skip foreign key build for MtoM, found abstract base class
or interface " +
  -                                cd.getClassNameOfObject());
  +			logger.debug( "Skip foreign key build for MtoM, found abstract base class or interface
" + cd.getClassNameOfObject() );
               return;
           }
           StringBuffer buffer = new StringBuffer(256);
  @@ -180,8 +181,7 @@
   
           if(classDescriptor.isAbstract() || classDescriptor.isInterface())
           {
  -            System.out.println("Skip foreign key build, found abstract base class or interface
" +
  -                                classDescriptor.getClassNameOfObject());
  +			logger.debug( "Skip foreign key build, found abstract base class or interface " + classDescriptor.getClassNameOfObject()
);
               return;
           }
           StringBuffer buffer = new StringBuffer(256);
  @@ -201,8 +201,7 @@
                       FieldDescriptor fld = classDescriptor.getFieldDescriptorByName((String)
obj);
                       if(fld == null)
                       {
  -                        System.err.println("FieldDescriptor for foreign key parameter \n"+
  -                                obj+" was not found in ClassDescriptor \n"+classDescriptor);
  +						logger.debug( "FieldDescriptor for foreign key parameter \n" + obj + " was not found
in ClassDescriptor \n" + classDescriptor );
                       }
                       else columnName = fld.getColumnName();
               }
  
  
  

---------------------------------------------------------------------
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