1 /* JJT: 0.2.2 */
2
3 package mobisnap.mobile_trx;
4
5 import mobisnap.MobisnapConstants;
6
7 /***
8 * Implements table reference
9 */
10 public class ASTTableReference extends mobisnap.mobile_trx.SimpleNode {
11 String s1, s2;
12
13 public ASTTableReference(int id) {
14 super(id);
15 }
16
17 public ASTTableReference( MobisnapSQL p, int i) {
18 super( p, i);
19 id = i;
20 }
21
22 /*** Accept the visitor. **/
23 public Object jjtAccept(MobisnapSQLVisitor visitor, Object data) {
24 return visitor.visit(this, data);
25 }
26
27 public String tableName() {
28 return toString( MobisnapConstants.MSQL_ORIGINAL).trim();
29 }
30 /***
31 * Displays the source code of the node
32 *
33 * @param msql_type Specifies which type of processing should be performed
34 * MobisnapConstants.MSQL_SERVER = 1
35 * MobisnapConstants.MSQL_TENTATIVE_CLIENT = 2
36 * MobisnapConstants.MSQL_STABLE_CLIENT = 3
37 */
38 public void sourceCode( int msql_type, StringBuffer buffer) throws Exception {
39 if( msql_type == mobisnap.MobisnapConstants.MSQL_ORIGINAL) {
40 super.sourceCode( msql_type, buffer);
41 return;
42 }
43 buffer.append( " ");
44 if( msql_type == MobisnapConstants.MSQL_STABLE_CLIENT)
45 buffer.append( "stable_");
46 buffer.append( s1);
47 if( s2 != null) {
48 buffer.append( ".");
49 buffer.append( s2);
50 }
51 buffer.append( " ");
52 }
53 }
This page was automatically generated by Maven