Clover coverage report - Replica - 1.0-Alpha
Coverage timestamp: Dom Fev 1 2004 17:00:58 WET
file stats: LOC: 48   Methods: 2
NCLOC: 21   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
CallDbCommand.java 0% 0% 0% 0%
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 CallDbCommand extends StatementDbCommand {
 21   
 
 22   
     /**
 23   
      * 
 24   
      */
 25  0
     public CallDbCommand() {
 26  0
         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  0
         boolean hasResult =  st.execute( command );
 34   
         
 35  0
         if( hasResult )
 36  0
             return st.getResultSet();
 37   
         
 38  0
         int updateCount = st.getUpdateCount();
 39   
                     
 40  0
         ApplicationMessage result = new ApplicationMessage();
 41  0
         result.setOriginator(ApplicationMessage.DATABASE_MODULE);
 42  0
         result.setBody( PrintCommand.NAME + " " + updateCount + " rows afected.");
 43   
 
 44  0
         return result;
 45   
     }
 46   
 
 47   
 }
 48