1 /* JJT: 0.2.2 */ 2 3 package mobisnap.mobile_trx; 4 5 /*** 6 * Implements table reference 7 */ 8 public class ASTMonitorName extends mobisnap.mobile_trx.SimpleNode { 9 String s1, s2, s3; 10 11 public ASTMonitorName(int id) { 12 super(id); 13 } 14 15 public ASTMonitorName( MobisnapSQL p, int i) { 16 super( p, i); 17 id = i; 18 } 19 20 /*** Accept the visitor. **/ 21 public Object jjtAccept(MobisnapSQLVisitor visitor, Object data) { 22 return visitor.visit(this, data); 23 } 24 25 /*** 26 * Displays the source code of the node 27 * 28 * @param msql_type Specifies which type of processing should be performed 29 * MobisnapConstants.MSQL_SERVER = 1 30 * MobisnapConstants.MSQL_TENTATIVE_CLIENT = 2 31 * MobisnapConstants.MSQL_STABLE_CLIENT = 3 32 */ 33 public void sourceCode( int msql_type, StringBuffer buffer) throws Exception { 34 if( msql_type == mobisnap.MobisnapConstants.MSQL_ORIGINAL) { 35 super.sourceCode( msql_type, buffer); 36 return; 37 } 38 if( s2 == null) { 39 try { 40 buffer.append( " "); 41 Object obj = MobisnapSQL.names.getName( s1).getValue(); 42 if( obj instanceof String) { 43 buffer.append( "'"); 44 buffer.append( obj.toString()); 45 buffer.append( "'"); 46 } else if( obj instanceof java.sql.Date) 47 buffer.append( MSQLTypeUtil.date2String( (java.sql.Date)obj)); 48 else 49 buffer.append( obj.toString()); 50 buffer.append( " "); 51 return; 52 } catch( Exception e) { 53 // do nothing 54 } 55 } 56 buffer.append( " "); 57 buffer.append( s1); 58 if( s2 != null) { 59 buffer.append( "."); 60 buffer.append( s2); 61 } 62 if( s3 != null) { 63 buffer.append( "."); 64 buffer.append( s3); 65 } 66 buffer.append( " "); 67 } 68 }

This page was automatically generated by Maven