net.sf.jsqlparser.statement.insert
Class Insert

java.lang.Object
  extended by net.sf.jsqlparser.statement.insert.Insert
All Implemented Interfaces:
Statement

public class Insert
extends java.lang.Object
implements Statement

The insert statement. Every column name in columnNames matches an item in itemsList


Field Summary
private  java.util.List columns
           
private  ItemsList itemsList
           
private  Table table
           
private  boolean useValues
           
 
Constructor Summary
Insert()
           
 
Method Summary
 void accept(StatementVisitor statementVisitor)
           
 java.util.List getColumns()
          Get the columns (found in "INSERT INTO (col1,col2..) [...]" )
 ItemsList getItemsList()
          Get the values (as VALUES (...) or SELECT)
 Table getTable()
           
 boolean isUseValues()
           
 void setColumns(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

useValues

private boolean useValues
Constructor Detail

Insert

public Insert()
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()
Get the columns (found in "INSERT INTO (col1,col2..) [...]" )

Returns:
a list of Column

setColumns

public void setColumns(java.util.List list)

getItemsList

public ItemsList getItemsList()
Get the values (as VALUES (...) or SELECT)

Returns:
the values of the insert

setItemsList

public void setItemsList(ItemsList list)

isUseValues

public boolean isUseValues()

setUseValues

public void setUseValues(boolean useValues)

toString

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