Show
Ignore:
Timestamp:
04/22/02 14:57:50 (10 years ago)
Author:
team4
Message:

*** empty log message ***

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-0_71-bugfixes/Rapla/src/org/rapla/storage/dbsql/EntityStorage.java

    r285 r339  
    195195        PreparedStatement stmt = null; 
    196196        try { 
     197            if ( config.getLog().enabled(6)) { 
     198                config.getLog().log(6,"  Executing SQL: " + sql  
     199                                    + " {" + id + "}"); 
     200            } 
    197201            stmt = con.prepareStatement(sql); 
    198202            stmt.setInt(1,id.intValue()); 
     
    272276        try { 
    273277            stmt = idcon.prepareStatement(updateIdSql); 
     278            if ( config.getLog().enabled(7)) { 
     279                config.getLog().log(7," Requesting ID: " + updateIdSql   
     280                                    + "{" + requestedIds + "},{" + sessionId + "}" ); 
     281            } 
    274282            stmt.setInt(1,requestedIds); 
    275283            stmt.setInt(2,sessionId); 
     
    383391                entity.setId(requestId(1)); 
    384392                stmt = con.prepareStatement(insertSql); 
     393                if ( config.getLog().enabled(7)) { 
     394                    config.getLog().log(7,"  Preparing sql-insert: " + insertSql  ); 
     395                } 
    385396            } else { 
    386397                String query = updateSql; 
    387398                stmt = con.prepareStatement(query); 
    388                 stmt.setInt(count(query,'?'),(entity.getId().intValue())); 
     399                int id = entity.getId().intValue(); 
     400                if ( config.getLog().enabled(7)) { 
     401                    config.getLog().log(7,"  Preparing sql-update: " + updateSql  
     402                                        + "{" + id + "}"); 
     403                } 
     404                stmt.setInt(count(query,'?'),id); 
    389405            } 
    390406            write(stmt, entity); 
     
    397413    public void delete(Entity entity) throws SQLException { 
    398414        checkOldSchema(); 
     415        /* Serious BUG in Version 0.71 
    399416        Iterator it = subStores.iterator(); 
    400417        while (it.hasNext()) { 
    401418            ((Storage) it.next()).deleteAll(); 
    402419        } 
    403  
     420        */ 
    404421        PreparedStatement stmt = null; 
    405422        try { 
     
    407424                return; 
    408425            stmt = con.prepareStatement(deleteSql); 
    409             stmt.setInt(1,entity.getId().intValue()); 
     426            int id = entity.getId().intValue(); 
     427            stmt.setInt(1,id); 
     428            if ( config.getLog().enabled(7)) { 
     429                config.getLog().log(7,"  Executing sql-delete: " + deleteSql  
     430                                    + "{" + id + "}"); 
     431            } 
    410432            stmt.executeUpdate(); 
    411433        } finally {