org.axiondb.engine.commands
Class InsertIntoClause

java.lang.Object
  extended by org.axiondb.engine.commands.BaseAxionCommand
      extended by org.axiondb.engine.commands.InsertIntoClause
All Implemented Interfaces:
AxionCommand

public abstract class InsertIntoClause
extends BaseAxionCommand

An INSERT INTO Clause.


Constructor Summary
InsertIntoClause(DMLWhenClause when, TableIdentifier tid, java.util.List cols, boolean useDefaultValues)
           
InsertIntoClause(DMLWhenClause when, TableIdentifier tid, java.util.List cols, java.util.List vals)
           
 
Method Summary
protected  void addRowToTable(Database db, Row srcRow, RowDecorator dec)
           
protected  void assertRules(Table source)
           
protected  void buildBindVariables()
           
 boolean execute(Database db)
          Executes an SQL statement that may return multiple results.
 AxionResultSet executeQuery(Database db)
          Executes an SQL statement that returns a single read-only ResultSet object such as a SELECT statement.
 int executeUpdate(Database db)
          Executes an SQL that may add, delete or modify zero or more rows within the database, such as an INSERT, UPDATE or DELETE statement.
protected  int getColumnCount()
           
 java.util.Iterator getColumnIterator()
           
 int getProcessedRowCount()
           
protected  Table getTargetTable()
           
 TableIdentifier getTargetTableId()
           
protected  int getValueCount()
           
 java.util.Iterator getValueIterator()
           
protected  java.util.List getValues()
           
 DMLWhenClause getWhenClause()
           
 boolean insertMatchingRow(Database db, RowDecorator dec, Row srcRow)
           
protected  boolean isTargetTablePartOfSubQuery()
           
protected  RowDecorator makeRowDecorator()
           
 void preProcess(Database db)
           
protected  void resolve(Database db)
           
 
Methods inherited from class org.axiondb.engine.commands.BaseAxionCommand
assertNotReadOnly, attemptToConvertValue, bindAll, clearBindings, createResolveSelectableVisitor, executeQuery, getBindVariableIterator, getBindVariableIterator, getBindVariables, getBindVariableVisitor, getColIdentifierList, getCommitSize, getEffectedRowCount, getResultSet, getRowIterator, makeRowDecorator, populateDefaultValues, populateSequenceColumns, resolveGeneratedColumns, resolveGeneratedColumns, resolveSelectable, resolveSelectable, resolveSelectableList, resolveSelectableList, setBindVariableVisitor, setDeferAllConstraintIfRequired, setEffectedRowCount, setResultSet, updateGeneratedValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InsertIntoClause

public InsertIntoClause(DMLWhenClause when,
                        TableIdentifier tid,
                        java.util.List cols,
                        java.util.List vals)

InsertIntoClause

public InsertIntoClause(DMLWhenClause when,
                        TableIdentifier tid,
                        java.util.List cols,
                        boolean useDefaultValues)
Method Detail

execute

public boolean execute(Database db)
                throws AxionException
Description copied from interface: AxionCommand
Executes an SQL statement that may return multiple results.

Returns:
true if one or more ResultSets were generated, false otherwise
Throws:
AxionException
See Also:
Statement.execute(java.lang.String), PreparedStatement.execute()

executeQuery

public AxionResultSet executeQuery(Database db)
                            throws AxionException
Description copied from interface: AxionCommand
Executes an SQL statement that returns a single read-only ResultSet object such as a SELECT statement.

Returns:
the generated ResultSet
Throws:
AxionException
See Also:
Statement.executeQuery(java.lang.String), PreparedStatement.executeQuery()

executeUpdate

public int executeUpdate(Database db)
                  throws AxionException
Description copied from interface: AxionCommand
Executes an SQL that may add, delete or modify zero or more rows within the database, such as an INSERT, UPDATE or DELETE statement. In addition, SQL statements that return nothing, such as SQL DDL statements, can be executed via this method.

Returns:
the number of rows modified
Throws:
AxionException
See Also:
Statement.executeUpdate(java.lang.String), PreparedStatement.executeUpdate()

getColumnIterator

public final java.util.Iterator getColumnIterator()

getProcessedRowCount

public final int getProcessedRowCount()

getTargetTableId

public TableIdentifier getTargetTableId()

getValueIterator

public final java.util.Iterator getValueIterator()

insertMatchingRow

public boolean insertMatchingRow(Database db,
                                 RowDecorator dec,
                                 Row srcRow)
                          throws AxionException
Throws:
AxionException

preProcess

public void preProcess(Database db)
                throws AxionException
Throws:
AxionException

addRowToTable

protected void addRowToTable(Database db,
                             Row srcRow,
                             RowDecorator dec)
                      throws AxionException
Throws:
AxionException

assertRules

protected void assertRules(Table source)
                    throws AxionException
Throws:
AxionException

buildBindVariables

protected void buildBindVariables()
Overrides:
buildBindVariables in class BaseAxionCommand

getColumnCount

protected final int getColumnCount()

getTargetTable

protected final Table getTargetTable()

getValueCount

protected final int getValueCount()

getValues

protected final java.util.List getValues()

getWhenClause

public final DMLWhenClause getWhenClause()

isTargetTablePartOfSubQuery

protected boolean isTargetTablePartOfSubQuery()
                                       throws AxionException
Throws:
AxionException

resolve

protected void resolve(Database db)
                throws AxionException
Throws:
AxionException

makeRowDecorator

protected final RowDecorator makeRowDecorator()