001package gudusoft.gsqlparser.nodes.mssql;
002
003import gudusoft.gsqlparser.nodes.*;
004import gudusoft.gsqlparser.TBaseType;
005
006public class TMssqlSetSqlNode extends TParseTreeNode {
007    private int setType = TBaseType.mstUnknown;
008
009    private TExpressionList variable_expr_list;
010
011    public TExpressionList getVariable_expr_list() {
012        return variable_expr_list;
013    }
014
015    public int getSetType() {
016        return setType;
017    }
018
019    public TObjectName getVarName() {
020        return varName;
021    }
022
023    private TObjectName varName = null;
024    private TSelectSqlNode subquery = null;
025    private TExpression varExpr = null;
026    private TFunctionCall xmlMethod = null;
027
028    public void setXmlMethod(TFunctionCall xmlMethod) {
029        this.xmlMethod = xmlMethod;
030    }
031
032    public TFunctionCall getXmlMethod() {
033
034        return xmlMethod;
035    }
036
037    public TSelectSqlNode getSubquery() {
038        return subquery;
039    }
040
041    public TExpression getVarExpr() {
042        return varExpr;
043    }
044
045    public void setSetType(int setType) {
046        this.setType = setType;
047    }
048
049    public void init(Object arg1,Object arg2){
050        if (arg1 != null){
051            if(arg1 instanceof TObjectName){
052                this.varName = (TObjectName)arg1;
053                this.varName.setObjectType(TObjectName.ttobjVariable);
054            }else if(arg1 instanceof  TExpressionList){
055                this.variable_expr_list = (TExpressionList)arg1;
056            }
057        }
058
059        if (arg2 != null){
060            if (arg2 instanceof TExpression){
061                this.varExpr = (TExpression)arg2;
062            }else if (arg2 instanceof TSelectSqlNode){
063                this.subquery = (TSelectSqlNode)arg2;
064            }
065        }
066    }
067}