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