package com.alibaba.druid.sql.dialect.sqlserver.ast.stmt;

import com.alibaba.druid.sql.ast.SQLExpr;
import com.alibaba.druid.sql.ast.statement.SQLRollbackStatement;
import com.alibaba.druid.sql.dialect.sqlserver.ast.SQLServerStatement;
import com.alibaba.druid.sql.dialect.sqlserver.visitor.SQLServerASTVisitor;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;

public class SQLServerRollbackStatement extends SQLRollbackStatement implements SQLServerStatement {
   private boolean work = false;
   private SQLExpr name;

   public boolean isWork() {
      return this.work;
   }

   public void setWork(boolean work) {
      this.work = work;
   }

   public void accept0(SQLASTVisitor visitor) {
      if (visitor instanceof SQLServerASTVisitor) {
         this.accept0((SQLServerASTVisitor)visitor);
      } else {
         super.accept0(visitor);
      }

   }

   public void accept0(SQLServerASTVisitor visitor) {
      visitor.visit(this);
      visitor.endVisit(this);
   }

   public SQLExpr getName() {
      return this.name;
   }

   public void setName(SQLExpr name) {
      this.name = name;
   }
}
