net.sf.jsqlparser.statement.replace
Class Replace

java.lang.Object
  extended by net.sf.jsqlparser.statement.replace.Replace
All Implemented Interfaces:
Statement

public class Replace
extends java.lang.Object
implements Statement

The replace statement.


Field Summary
private  java.util.List columns
           
private  java.util.List expressions
           
private  ItemsList itemsList
           
private  Table table
           
private  boolean useValues
           
 
Constructor Summary
Replace()
           
 
Method Summary
 void accept(StatementVisitor statementVisitor)
           
 java.util.List getColumns()
          A list of Columns either from a "REPLACE mytab (col1, col2) [...]" or a "REPLACE mytab SET col1=exp1, col2=exp2".
 java.util.List getExpressions()
          A list of Expressions (from a "REPLACE mytab SET col1=exp1, col2=exp2").
 ItemsList getItemsList()
          An ItemsList (either from a "REPLACE mytab VALUES (exp1,exp2)" or a "REPLACE mytab SELECT * FROM mytab2") it is null in case of a "REPLACE mytab SET col1=exp1, col2=exp2"
 Table getTable()
           
 boolean isUseValues()
           
 void setColumns(java.util.List list)
           
 void setExpressions(java.util.List list)
           
 void setItemsList(ItemsList list)
           
 void setTable(Table name)
           
 void setUseValues(boolean useValues)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

table

private Table table

columns

private java.util.List columns

itemsList

private ItemsList itemsList

expressions

private java.util.List expressions

useValues

private boolean useValues
Constructor Detail

Replace

public Replace()
Method Detail

accept

public void accept(StatementVisitor statementVisitor)
Specified by:
accept in interface Statement

getTable

public Table getTable()

setTable

public void setTable(Table name)

getColumns

public java.util.List getColumns()
A list of Columns either from a "REPLACE mytab (col1, col2) [...]" or a "REPLACE mytab SET col1=exp1, col2=exp2".

Returns:
a list of Columns

getItemsList

public ItemsList getItemsList()
An ItemsList (either from a "REPLACE mytab VALUES (exp1,exp2)" or a "REPLACE mytab SELECT * FROM mytab2") it is null in case of a "REPLACE mytab SET col1=exp1, col2=exp2"


setColumns

public void setColumns(java.util.List list)

setItemsList

public void setItemsList(ItemsList list)

getExpressions

public java.util.List getExpressions()
A list of Expressions (from a "REPLACE mytab SET col1=exp1, col2=exp2").
it is null in case of a "REPLACE mytab (col1, col2) [...]"


setExpressions

public void setExpressions(java.util.List list)

isUseValues

public boolean isUseValues()

setUseValues

public void setUseValues(boolean useValues)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object