001package gudusoft.gsqlparser.nodes; 002 003import gudusoft.gsqlparser.EDbObjectType; 004import gudusoft.gsqlparser.TCustomSqlStatement; 005 006 007public class TSymbolTableItem { 008 private int type = TObjectName.ttobjUnknown; 009 /** 010 * SQL statement includes this symbol 011 */ 012 private TCustomSqlStatement stmt = null; 013 014 public TParseTreeNode getData() { 015 return data; 016 } 017 018 public TCustomSqlStatement getStmt() { 019 return stmt; 020 } 021 022 public int getType() { 023 return type; 024 } 025 026 private EDbObjectType dbObjectType = EDbObjectType.unknown; 027 028 public EDbObjectType getDbObjectType() { 029 return dbObjectType; 030 } 031 032 /** 033 * point to data of this symbol 034 * type = ttobjparameter, data is TParameterDeclaration 035 * type = ttobjVariable, data is TVarDeclStmt 036 */ 037 private TParseTreeNode data = null; 038 039 public TSymbolTableItem(int ptype, TCustomSqlStatement pstmt,TParseTreeNode pdata){ 040 this.type = ptype; 041 this.stmt = pstmt; 042 this.data = pdata; 043 } 044 045 public TSymbolTableItem(EDbObjectType dbObjectType, TCustomSqlStatement pstmt,TParseTreeNode pdata){ 046 this.dbObjectType = dbObjectType; 047 this.stmt = pstmt; 048 this.data = pdata; 049 } 050 051 public void setType(int type) { 052 this.type = type; 053 } 054 055 public void setStmt(TCustomSqlStatement stmt) { 056 this.stmt = stmt; 057 } 058}