Clover coverage report - Replica - 1.0-Alpha
Coverage timestamp: Dom Fev 1 2004 17:00:58 WET
file stats: LOC: 58   Methods: 4
NCLOC: 22   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
ShutdownDatabaseCommand.java 0% 0% 0% 0%
coverage
 1   
 /*
 2   
  * Replica is published under the terms
 3   
  * of the Apache Software License.
 4   
  */
 5   
 package replica.server.commands;
 6   
 
 7   
 import org.hsqldb.Server;
 8   
 
 9   
 import replica.core.ApplicationMessage;
 10   
 
 11   
 /**
 12   
  * 
 13   
  * @author Pedro Costa
 14   
  * @author Helder Silva
 15   
  * @since 31/Jan/2004
 16   
  */
 17   
 public class ShutdownDatabaseCommand extends LoggedInCommand {
 18   
 
 19   
     Server server;
 20   
     
 21   
     /**
 22   
      * 
 23   
      */
 24  0
     public ShutdownDatabaseCommand() {
 25  0
         super();
 26   
     }
 27   
 
 28   
     /* (non-Javadoc)
 29   
      * @see replica.server.commands.LoggedInCommand#internalExecute(replica.core.ApplicationMessage)
 30   
      */
 31  0
     protected Object internalExecute(ApplicationMessage arg) {
 32   
         
 33  0
         if( getServer() == null )
 34  0
             return "Database is not running.";
 35   
             
 36  0
         getServer().stop();
 37   
         
 38  0
         setServer(null);
 39   
         
 40  0
         return "Server stopped.";
 41   
     }
 42   
 
 43   
     /**
 44   
      * @return
 45   
      */
 46  0
     public Server getServer() {
 47  0
         return server;
 48   
     }
 49   
 
 50   
     /**
 51   
      * @param server
 52   
      */
 53  0
     public void setServer(Server server) {
 54  0
         this.server = server;
 55   
     }
 56   
 
 57   
 }
 58