Clover coverage report - Replica - 1.0-Alpha
Coverage timestamp: Dom Fev 1 2004 17:00:58 WET
file stats: LOC: 40   Methods: 2
NCLOC: 29   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
MSQLTInteger.java 0% 0% 0% 0%
coverage
 1   
 package mobisnap.mobile_trx;
 2   
 
 3   
 import java.math.*;
 4   
 
 5   
 /**
 6   
  * Used to represent variables and constants internally
 7   
  */
 8   
 public class MSQLTInteger extends MSQLTVariable
 9   
 {
 10   
     int precision, scale;
 11   
 
 12  0
     public MSQLTInteger( boolean constant, boolean notnull, int precision, int scale) {
 13  0
         super( constant, notnull);
 14  0
         this.precision = precision;
 15  0
         this.scale = scale;
 16   
     }
 17   
     
 18   
     /**
 19   
      * Sets the value of the given variable
 20   
      */
 21  0
     public void setValue( Object obj) throws Exception {
 22  0
         if( constant && value != null)
 23  0
             throw new mobisnap.MobisnapException( "Assigning value to constant");
 24  0
         if( obj instanceof Integer)
 25  0
             value = obj;
 26  0
         else if( obj instanceof Double)
 27  0
             value = new Integer( ((Double)obj).intValue());
 28  0
         else if( obj instanceof Float)
 29  0
             value = new Integer( ((Float)obj).intValue());
 30  0
         else if( obj instanceof BigDecimal)
 31  0
             value = new Integer( ((BigDecimal)obj).intValue());
 32  0
         else if( obj instanceof SQLNull && ! notnull)
 33  0
             value = obj;
 34  0
         else if( obj instanceof String)
 35  0
             value = new Integer( (String)obj);
 36   
         else
 37  0
             throw new mobisnap.MobisnapException( "Invalid assgnment to integer : " + obj.getClass().getName());
 38   
     }
 39   
 }
 40