Clover coverage report - Replica - 1.0-Alpha
Coverage timestamp: Dom Fev 1 2004 17:00:58 WET
file stats: LOC: 72   Methods: 4
NCLOC: 44   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
ASTPlSqlRelationalExpression.java - 0% 0% 0%
coverage
 1   
 /* JJT:    0.2.2 */
 2   
 
 3   
 package    mobisnap.mobile_trx;
 4   
 
 5   
 /**
 6   
  * Implements relational expression
 7   
  */
 8   
 public class ASTPlSqlRelationalExpression extends    mobisnap.mobile_trx.SimpleNode {
 9   
     public ASTPlSqlSimpleExpression first;
 10   
     public byte type = 0;
 11   
     public Object v1, v2;
 12   
     
 13   
 
 14  0
     public ASTPlSqlRelationalExpression(int id) {
 15  0
         super(id);
 16   
     }
 17   
 
 18  0
     public ASTPlSqlRelationalExpression( MobisnapSQL    p, int i) {
 19  0
         super( p, i);
 20  0
         id = i;
 21   
     }
 22   
     
 23   
     /** Accept the visitor. **/
 24  0
     public Object jjtAccept(MobisnapSQLVisitor visitor, Object data) {
 25  0
         return visitor.visit(this, data);
 26   
     }
 27   
     
 28   
     /**
 29   
      * Returns the value of the expression
 30   
      * 
 31   
      * @param msql_type Specifies which type of processing should be performed
 32   
      *        MobisnapConstants.MSQL_SERVER = 1
 33   
      *        MobisnapConstants.MSQL_TENTATIVE_CLIENT = 2
 34   
      *        MobisnapConstants.MSQL_STABLE_CLIENT = 3
 35   
      *        MobisnapConstants.MSQL_RESERVATION_CLIENT = 4
 36   
      * @param cond True if reservations associated iwth transaction should be 
 37   
      * propagated to the current transaction
 38   
      */
 39  0
     public Object value( int msql_type, boolean cond) throws Exception {
 40  0
         switch( type) {
 41   
         case 0:
 42  0
             return first.value( msql_type, cond);
 43   
         case 1:
 44  0
             ASTRelop op = (ASTRelop)v1;
 45  0
             switch( op.type) {
 46   
             case ASTRelop.OP_EQUAL:
 47  0
                 return MSQLTypeUtil.equal( first.value( msql_type, cond), ((ASTPlSqlSimpleExpression)v2).value( msql_type, cond));
 48   
             case ASTRelop.OP_NOTEQUAL:
 49  0
                 return MSQLTypeUtil.notEqual( first.value( msql_type, cond), ((ASTPlSqlSimpleExpression)v2).value( msql_type, cond));
 50   
 /*            case ASTRelop.OP_CARDINAL:
 51   
                 return MSQLTypeUtil.cardinal( first.value( msql_type, cond), ((ASTPlSqlSimpleExpression)v2).value( msql_type, cond));
 52   
 */            case ASTRelop.OP_MOREORLESS:
 53  0
                 return MSQLTypeUtil.moreOrLess( first.value( msql_type, cond), ((ASTPlSqlSimpleExpression)v2).value( msql_type, cond));
 54   
             case ASTRelop.OP_MORE:
 55  0
                 return MSQLTypeUtil.more( first.value( msql_type, cond), ((ASTPlSqlSimpleExpression)v2).value( msql_type, cond));
 56   
             case ASTRelop.OP_MOREEQUAL:
 57  0
                 return MSQLTypeUtil.moreEqual( first.value( msql_type, cond), ((ASTPlSqlSimpleExpression)v2).value( msql_type, cond));
 58   
             case ASTRelop.OP_LESS:
 59  0
                 return MSQLTypeUtil.less( first.value( msql_type, cond), ((ASTPlSqlSimpleExpression)v2).value( msql_type, cond));
 60   
             case ASTRelop.OP_LESSEQUAL:
 61  0
                 return MSQLTypeUtil.lessEqual( first.value( msql_type, cond), ((ASTPlSqlSimpleExpression)v2).value( msql_type, cond));
 62   
             default:
 63  0
                 throw new mobisnap.MobisnapException( "Internal error 1 in relational expression");
 64   
             }
 65   
         default:
 66  0
                 throw new mobisnap.MobisnapException( "Internal error 2 in relational expression");
 67   
         }
 68   
     }
 69   
     
 70   
 
 71   
 }
 72