|
|||||||||||||||||||
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 | |||||||||||||||
SimpleNodeValue.java | - | 0% | 0% | 0% |
|
1 |
/* JJT: 0.2.2 */
|
|
2 |
|
|
3 |
package mobisnap.mobile_trx;
|
|
4 |
|
|
5 |
import java.io.*;
|
|
6 |
import java.util.*;
|
|
7 |
|
|
8 |
/**
|
|
9 |
* Used to encapsulate an expression that is simplified to a constant value
|
|
10 |
*/
|
|
11 |
public class SimpleNodeValue extends mobisnap.mobile_trx.SimpleNode { |
|
12 |
Object value; |
|
13 |
|
|
14 | 0 |
public SimpleNodeValue( Object value) {
|
15 | 0 |
super( -2);
|
16 | 0 |
this.value = value;
|
17 |
} |
|
18 |
|
|
19 |
/**
|
|
20 |
* Returns the value of the expression
|
|
21 |
*
|
|
22 |
* @param msql_type Specifies which type of processing should be performed
|
|
23 |
* MobisnapConstants.MSQL_SERVER = 1
|
|
24 |
* MobisnapConstants.MSQL_TENTATIVE_CLIENT = 2
|
|
25 |
* MobisnapConstants.MSQL_STABLE_CLIENT = 3
|
|
26 |
* MobisnapConstants.MSQL_RESERVATION_CLIENT = 4
|
|
27 |
* @param cond True if reservations associated iwth transaction should be
|
|
28 |
* propagated to the current transaction
|
|
29 |
*/
|
|
30 | 0 |
public Object value( int msql_type, boolean cond) throws Exception { |
31 | 0 |
return value;
|
32 |
} |
|
33 |
|
|
34 | 0 |
public void sourceCode( int msql_type, StringBuffer buffer) throws Exception { |
35 | 0 |
buffer.append( " ");
|
36 | 0 |
buffer.append( MSQLTypeUtil.value2String( value)); |
37 | 0 |
buffer.append( " ");
|
38 |
} |
|
39 |
} |
|
40 |
|
|