001package gudusoft.gsqlparser.nodes; 002 003import gudusoft.gsqlparser.EDbObjectType; 004 005/** 006 * fetch .. from cursor 007 */ 008public class TFetchSqlNode extends TParseTreeNode { 009 private TObjectName cursorName = null; 010 011 public TObjectName getCursorName() { 012 return cursorName; 013 } 014 015 private TObjectNameList variableNames = null; 016 017 public TObjectNameList getVariableNames() { 018 return variableNames; 019 } 020 021 public void init(Object arg1) { 022 this.cursorName = (TObjectName) arg1; 023// if (cursorName.getObjectType() != TObjectName.ttobjCursorName){ 024// this.cursorName.setObjectType(TObjectName.ttobjCursorName); 025// } 026 027 if (cursorName.getDbObjectType() != EDbObjectType.cursor){ 028 this.cursorName.setDbObjectType(EDbObjectType.cursor); 029 } 030 031 } 032 033 public void init(Object arg1,Object arg2){ 034 init(arg1); 035 036 if (arg2 != null){ 037 this.variableNames = (TObjectNameList)(arg2); 038 for(int i=0;i<this.variableNames.size();i++){ 039 040 this.variableNames.getObjectName(i).setObjectType(TObjectName.ttobjVariable); 041 } 042 } 043 } 044}