Clover coverage report - Replica - 1.0-Alpha
Coverage timestamp: Dom Fev 1 2004 17:00:58 WET
file stats: LOC: 72   Methods: 6
NCLOC: 35   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
SlotReservation.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 slot reservation
 8   
  * 
 9   
  * @version    6-Mar-2001
 10   
  * @author 
 11   
  */
 12   
 public class SlotReservation
 13   
     extends ReservationBase
 14   
     implements Serializable
 15   
 {
 16   
     ColumnCondition lowerBound;
 17   
     ColumnCondition upperBound;
 18   
     int triggerCode;
 19   
     
 20  0
     public SlotReservation( String table, ColumnCondition lowerBound, ColumnCondition upperBound, int triggerCode) {
 21  0
         super( table, "none");
 22  0
         this.lowerBound = lowerBound;
 23  0
         this.upperBound = upperBound;
 24  0
         this.triggerCode = triggerCode;
 25   
     }
 26   
     
 27  0
     public Object getLowerBound(){
 28  0
         return lowerBound;
 29   
     }
 30   
     
 31  0
     public Object getUpperBound(){
 32  0
         return upperBound;
 33   
     }
 34   
     
 35  0
     public int getTriggerCode(){
 36  0
         return triggerCode;
 37   
     }
 38   
     
 39   
     /**
 40   
      * Checks the given parameters are backed up by this reservation.
 41   
      * If so, sets the reserved value to the variable and
 42   
      * associate the reservation with the given variable - through a ReservationUseBase
 43   
      * class which is returned
 44   
      * NOTE: Currently only select in the form of
 45   
      * "select col(,col)* into var(,var)* from table where cond1 (AND cond2)*"
 46   
      * can be checked
 47   
      * 
 48   
      * @param var Variable involved
 49   
      * @param table Table name of possible reservation
 50   
      * @param column Column name of possible reservation ( it is ignored )
 51   
      * @param where Table row specification
 52   
      * @return Return null if there is no associateion between the given parameters
 53   
      * ans this reservation. Otherwise returns a class to represent the reservation use
 54   
      */
 55  0
     public ReservationUseBase checkReservation( MSQLTVariable var, String table, String column, SimpleNode where) {
 56  0
         if( checkReservation( table, "*", where)) {
 57   
             // verify slot conditions
 58  0
             ReservationUseBase rub = new SlotReservationUse( this);
 59  0
             var.associateRsrv( rub);
 60   
         }
 61  0
         return null;
 62   
 
 63   
     }
 64   
     
 65   
     /**
 66   
      * Returns a readable representation of this reservation - format:<BR>
 67   
      * slot rsrv_id reservation column from table where row specification lowerbound number upperbound number
 68   
      */
 69  0
     public String toString() {
 70  0
         return "SLOT " + super.toString() + " LOWERBOUND " + lowerBound +" UPPERBOUND "+upperBound;
 71   
     }
 72   
 }