Clover coverage report - Replica - 1.0-Alpha
Coverage timestamp: Dom Fev 1 2004 17:00:58 WET
file stats: LOC: 44   Methods: 2
NCLOC: 18   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
UpdateDbCommand.java - 16,7% 50% 25%
coverage coverage
 1   
 /*
 2   
  * Replica is published under the terms
 3   
  * of the Apache Software License.
 4   
  */
 5   
 package replica.database.commands.sql;
 6   
 
 7   
 import java.sql.SQLException;
 8   
 import java.sql.Statement;
 9   
 
 10   
 import replica.core.ApplicationMessage;
 11   
 import replica.database.commands.StatementDbCommand;
 12   
 import replica.server.commands.PrintCommand;
 13   
 
 14   
 /**
 15   
  * 
 16   
  * @author Pedro Costa
 17   
  * @author Helder Silva
 18   
  * @since 20/Jan/2004
 19   
  */
 20   
 public class UpdateDbCommand extends StatementDbCommand {
 21   
 
 22   
     /**
 23   
      * 
 24   
      */
 25  3
     public UpdateDbCommand() {
 26  3
         super();
 27   
     }
 28   
 
 29   
     /* (non-Javadoc)
 30   
      * @see replica.database.commands.DatabaseCommand#execute(java.sql.Statement, java.lang.String)
 31   
      */
 32  0
     protected Object execute(Statement st, String command) throws SQLException{
 33   
         
 34  0
         int res = st.executeUpdate( command );
 35   
         
 36  0
         ApplicationMessage result = new ApplicationMessage();
 37  0
         result.setOriginator(ApplicationMessage.DATABASE_MODULE);
 38  0
         result.setBody( PrintCommand.NAME + " " + res + " rows afected.");
 39   
         
 40  0
         return result;
 41   
     }
 42   
 
 43   
 }
 44