Class SQLIfStatement
- java.lang.Object
-
- com.alibaba.druid.sql.ast.SQLObjectImpl
-
- com.alibaba.druid.sql.ast.SQLStatementImpl
-
- com.alibaba.druid.sql.ast.statement.SQLIfStatement
-
- All Implemented Interfaces:
SQLDbTypedObject,SQLObject,SQLReplaceable,SQLStatement
public class SQLIfStatement extends SQLStatementImpl implements SQLReplaceable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSQLIfStatement.Elsestatic classSQLIfStatement.ElseIf
-
Field Summary
-
Fields inherited from class com.alibaba.druid.sql.ast.SQLStatementImpl
afterSemi, dbType, headHints
-
Fields inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
attributes, hint, parent, sourceColumn, sourceLine
-
-
Constructor Summary
Constructors Constructor Description SQLIfStatement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept0(SQLASTVisitor visitor)voidaddStatement(SQLStatement statement)SQLIfStatementclone()SQLExprgetCondition()List<SQLIfStatement.ElseIf>getElseIfList()SQLIfStatement.ElsegetElseItem()List<SQLStatement>getStatements()booleanreplace(SQLExpr expr, SQLExpr target)voidsetCondition(SQLExpr condition)voidsetElseItem(SQLIfStatement.Else elseItem)-
Methods inherited from class com.alibaba.druid.sql.ast.SQLStatementImpl
cloneTo, getChildren, getDbType, getHeadHintsDirect, isAfterSemi, setAfterSemi, setDbType, setHeadHints, toLowerCaseString, toParameterizedString, toString, toString, toUnformattedString
-
Methods inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
accept, acceptChild, acceptChild, addAfterComment, addAfterComment, addBeforeComment, addBeforeComment, cloneTo, computeDataType, containsAttribute, getAfterCommentsDirect, getAttribute, getAttributes, getAttributesDirect, getBeforeCommentsDirect, getHint, getParent, getParent, getSourceColumn, getSourceLine, hasAfterComment, hasBeforeComment, output, putAttribute, setHint, setParent, setSource, setSourceLine
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.alibaba.druid.sql.ast.SQLObject
accept, addAfterComment, addAfterComment, addBeforeComment, addBeforeComment, containsAttribute, getAfterCommentsDirect, getAttribute, getAttributes, getAttributesDirect, getBeforeCommentsDirect, getParent, getParent, getSourceColumn, getSourceLine, hasAfterComment, hasBeforeComment, output, putAttribute, setParent, setSource
-
-
-
-
Method Detail
-
clone
public SQLIfStatement clone()
- Specified by:
clonein interfaceSQLObject- Specified by:
clonein interfaceSQLStatement- Overrides:
clonein classSQLStatementImpl
-
accept0
public void accept0(SQLASTVisitor visitor)
- Overrides:
accept0in classSQLStatementImpl
-
getCondition
public SQLExpr getCondition()
-
setCondition
public void setCondition(SQLExpr condition)
-
getStatements
public List<SQLStatement> getStatements()
-
addStatement
public void addStatement(SQLStatement statement)
-
getElseIfList
public List<SQLIfStatement.ElseIf> getElseIfList()
-
getElseItem
public SQLIfStatement.Else getElseItem()
-
setElseItem
public void setElseItem(SQLIfStatement.Else elseItem)
-
replace
public boolean replace(SQLExpr expr, SQLExpr target)
- Specified by:
replacein interfaceSQLReplaceable
-
-