Clover coverage report - Replica - 1.0-Alpha
Coverage timestamp: Dom Fev 1 2004 17:00:58 WET
file stats: LOC: 62   Methods: 3
NCLOC: 28   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
ValueUseReservation.java 0% 0% 0% 0%
coverage
 1   
 package mobisnap.common.reservation;
 2   
 
 3   
 import java.io.*;
 4   
 import mobisnap.mobile_trx.*;
 5   
 
 6   
 /**
 7   
  * Represents a value-use reservation
 8   
  * 
 9   
  * @version 0.045 12-Dec-2000
 10   
  * @author Nuno Pregui�a
 11   
  */
 12   
 public class ValueUseReservation
 13   
     extends ReservationBase
 14   
     implements Serializable
 15   
 {
 16   
     Object value;
 17   
     
 18  0
     public ValueUseReservation( String table, String column, Object value) {
 19  0
         super( table, column);
 20  0
         this.value = value;
 21   
     }
 22   
 
 23   
     /**
 24   
      * Checks the given parameters are backed up by this reservation.
 25   
      * If so, sets the reserved value to the variable and
 26   
      * associate the reservation with the given variable - through a REservationUseBase
 27   
      * class which is returned
 28   
      * NOTE: Currently only select in the form of
 29   
      * "select col(,col)* into var(,var)* from table where cond1 (AND cond2)*"
 30   
      * can be checked
 31   
      * 
 32   
      * @param var Variable involved
 33   
      * @param table Table name of possible reservation
 34   
      * @param column Column name of possible reservation
 35   
      * @param where Table row specification
 36   
      * @return Return null if there is no associateion between the given parameters
 37   
      * ans this reservation. Otherwise returns a class to represent the reservation use
 38   
      */
 39  0
     public ReservationUseBase checkReservation( MSQLTVariable var, String table, String column, SimpleNode where) {
 40  0
         if( checkReservation( table, column, where)) {
 41  0
             ReservationUseBase rub = new ValueUseReservationUse( this);
 42  0
             var.associateRsrv( rub);
 43  0
             try {
 44  0
                 var.setValue( value);
 45   
             } catch( Exception e) {
 46   
                 // do nothing
 47   
             }
 48  0
             return rub;
 49   
         }
 50  0
         return null;
 51   
 
 52   
     }
 53   
     
 54   
     /**
 55   
      * Returns a readable representation of this reervation - format:<BR>
 56   
      * escrow rsrv_id reservation column from table where row specification value number
 57   
      */
 58  0
     public String toString() {
 59  0
         return "VALUE-USE " + super.toString() + " VALUE " + value;
 60   
     }
 61   
 }
 62