[cvs] expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/utility DBTool.java DBToolTests.java

JCorporate Ltd jcorp at jcorp2.servlets.net
Mon Sep 20 12:21:09 PDT 2004


Update of /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/utility
In directory jcorp2.servlets.net:/tmp/cvs-serv826

Modified Files:
	DBTool.java DBToolTests.java 
Log Message:
<Aucun commentaire entré>


Index: DBTool.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/utility/DBTool.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** DBTool.java	18 Sep 2004 00:04:59 -0000	1.44
--- DBTool.java	20 Sep 2004 19:21:07 -0000	1.45
***************
*** 167,173 ****
   * @version        $Revision$  $Date$
   * @author        Michael Nash
-      * 
-      * Modify by Yves Henri AMAIZO <amy_amaizo at compuserve.com>
-      * @since $DatabaseSchema  $Date$
   */
  public class DBTool
--- 167,170 ----
***************
*** 594,600 ****
       * @throws    HtmlException If there is a problem building the
       *            confirmation page
-      * 
-      * Modify by Yves Henri AMAIZO <amy_amaizo at compuserve.com>
-      * @since $DatabaseSchema  $Date$
       */
      public static synchronized void deleteSchema(Page myPage, String dbName,
--- 591,594 ----
***************
*** 636,646 ****
              if (myPage != null) {
                  myPage.add(new Paragraph(new Text("Removing Table" + " " +
!                         oneObject.getJDBCMetaData().getTargetSQLTable(oneObject.getDataContext()))));
              }
              try {
!                 deleteTable(dbName, oneObject.getJDBCMetaData().getTargetSQLTable(oneObject.getDataContext()));
              } catch (DBException dbe) {
                  log.warn("Unable To Delete Table: " +
!                         oneObject.getJDBCMetaData().getTargetSQLTable(oneObject.getDataContext()) + " DB Message: " +
                          dbe.getDBMessage());
              }
--- 630,640 ----
              if (myPage != null) {
                  myPage.add(new Paragraph(new Text("Removing Table" + " " +
!                         oneObject.getJDBCMetaData().getTargetTable())));
              }
              try {
!                 deleteTable(dbName, oneObject.getJDBCMetaData().getTargetTable());
              } catch (DBException dbe) {
                  log.warn("Unable To Delete Table: " +
!                         oneObject.getJDBCMetaData().getTargetTable() + " DB Message: " +
                          dbe.getDBMessage());
              }
***************
*** 1175,1179 ****
                      }
  
!                     String tableName = oneDBObject.getJDBCMetaData().getTargetSQLTable(oneDBObject.getDataContext());
                      //Postgresql JDBC 7.2 driver bug.  Tablename must be lower case
                      //which doesn't apply to other databases such as Oracle
--- 1169,1173 ----
                      }
  
!                     String tableName = oneDBObject.getJDBCMetaData().getTargetTable();
                      //Postgresql JDBC 7.2 driver bug.  Tablename must be lower case
                      //which doesn't apply to other databases such as Oracle
***************
*** 1294,1298 ****
                                      "', but " +
                                      "is not defined as part of the table '" +
!                                     oneDBObject.getJDBCMetaData().getTargetSQLTable(oneDBObject.getDataContext()) +
                                      "' in the database. You " +
                                      "must alter this table to add this field." +
--- 1288,1292 ----
                                      "', but " +
                                      "is not defined as part of the table '" +
!                                     oneDBObject.getJDBCMetaData().getTargetTable() +
                                      "' in the database. You " +
                                      "must alter this table to add this field." +
***************
*** 1347,1353 ****
       * @throws  IOException
       * @throws  ServerException
-      * 
-      * Modify by Yves Henri AMAIZO <amy_amaizo at compuserve.com>
-      * @since $DatabaseSchema  $Date$
       */
      private static void importExportAll(DBConnection myConnection,
--- 1341,1344 ----
***************
*** 1407,1416 ****
                  //oneObject.setConnection(myConnection);
                  if (choice.equals("import")) {
! 					importFile(oneObject.getClass().getName(),
! 							oneObject.getJDBCMetaData().getTargetSQLTable(oneObject.getDataContext()) + "." + extension,
! 							format, myConnection);
                  } else {
                      exportFile(oneObject.getClass().getName(),
!                             oneObject.getJDBCMetaData().getTargetSQLTable(oneObject.getDataContext()) + "." + extension,
                              format);
                  }
--- 1398,1407 ----
                  //oneObject.setConnection(myConnection);
                  if (choice.equals("import")) {
!                     importFile(oneObject.getClass().getName(),
!                             oneObject.getJDBCMetaData().getTargetTable() + "." + extension,
!                             format, myConnection);
                  } else {
                      exportFile(oneObject.getClass().getName(),
!                             oneObject.getJDBCMetaData().getTargetTable() + "." + extension,
                              format);
                  }
***************
*** 1435,1441 ****
       * @throws  ClassNotFoundException
       * @throws  ServerException
-      * 
-      * Modify by Yves Henri AMAIZO <amy_amaizo at compuserve.com>
-      * @since $DatabaseSchema  $Date$
       */
      private static void importFile(String importCmd, String fileName,
--- 1426,1429 ----
***************
*** 1450,1456 ****
  
          /* Clear existing data */
! 		  System.out.println("Clearing existing data from " +
! 				  myObj.getJDBCMetaData().getTargetSQLTable(myObj.getDataContext()));
! 		  myConnection.executeUpdate("DELETE FROM " + myObj.getJDBCMetaData().getTargetSQLTable(myObj.getDataContext()));
  
          if (format == null) {
--- 1438,1444 ----
  
          /* Clear existing data */
!         System.out.println("Clearing existing data from " +
!                 myObj.getJDBCMetaData().getTargetTable());
!         myConnection.executeUpdate("DELETE FROM " + myObj.getJDBCMetaData().getTargetTable());
  
          if (format == null) {

Index: DBToolTests.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/utility/DBToolTests.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** DBToolTests.java	18 Sep 2004 00:04:59 -0000	1.13
--- DBToolTests.java	20 Sep 2004 19:21:07 -0000	1.14
***************
*** 432,434 ****
          }
      }
! }
\ No newline at end of file
--- 432,434 ----
          }
      }
! }



More information about the cvs mailing list