001package gudusoft.gsqlparser.stmt; 002 003import java.util.ArrayList; 004 005import gudusoft.gsqlparser.*; 006import gudusoft.gsqlparser.nodes.*; 007 008 009public class TAlterTypeStatement extends TCustomSqlStatement { 010 011 private TObjectName typeName; 012 private ArrayList<TAlterTypeOption> alterTypeOptionList; 013 private boolean ifExists; 014 015 016 public ArrayList<TAlterTypeOption> getAlterTypeOptionList() { 017 return alterTypeOptionList; 018 } 019 020 021 public TAlterTypeStatement(EDbVendor dbvendor) { 022 super(dbvendor); 023 sqlstatementtype = ESqlStatementType.sstaltertype; 024 } 025 026 void buildsql() { 027 } 028 029 void clear() { 030 } 031 032 String getasprettytext() { 033 return ""; 034 } 035 036 void iterate(TVisitorAbs pvisitor) { 037 } 038 039 public TObjectName getTypeName() { 040 return typeName; 041 } 042 043 public boolean isIfExists() { 044 return ifExists; 045 } 046 047 public void setIfExists(boolean ifExists) { 048 this.ifExists = ifExists; 049 } 050 051 public int doParseStatement(TCustomSqlStatement psql) { 052 if (rootNode == null) return -1; 053 super.doParseStatement(psql); 054 055 TAlterTypeSqlNode node = (TAlterTypeSqlNode) rootNode; 056 typeName = node.getTypeName(); 057 typeName.setDbObjectTypeDirectly(EDbObjectType.type); 058 this.alterTypeOptionList = node.getAlterTypeOptionList(); 059 this.ifExists = node.isIfExists(); 060 061 062 return 0; 063 } 064 065 public void accept(TParseTreeVisitor v){ 066 v.preVisit(this); 067 v.postVisit(this); 068 } 069 070 public void acceptChildren(TParseTreeVisitor v){ 071 v.preVisit(this); 072 v.postVisit(this); 073 } 074}