org.axiondb.engine.commands

Class BaseAxionCommand

public abstract class BaseAxionCommand extends Object implements AxionCommand

Abstract base AxionCommandimplementation.

Version: $Revision: 1.37 $ $Date: 2005/12/22 09:02:29 $

Author: Rodney Waldhoff Chuck Burdick Ahimanikya Satapathy

Method Summary
protected voidassertNotReadOnly(Database db)
Throws an AxionExceptionif the given Databaseis read-only.
protected ObjectattemptToConvertValue(Object val, DataType type, ColumnIdentifier colid)
voidbindAll(Object[] vals)
Sets the values of all bind variable within this command.
protected voidbuildBindVariables()
voidclearBindings()
Clears all bind variables within this command.
protected voidcreateResolveSelectableVisitor(Database db)
AxionResultSetexecuteQuery(Database db, boolean isReadOnly)
protected IteratorgetBindVariableIterator()
Returns an Iteratorover all my BindVariables, in the proper order.
protected IteratorgetBindVariableIterator(Selectable sel)
ListgetBindVariables()
protected FindBindVariableVisitorgetBindVariableVisitor()
protected ListgetColIdentifierList(Table table, TableIdentifier tid)
protected intgetCommitSize(Database db)
intgetEffectedRowCount()
ResultSetgetResultSet()
protected RowIteratorgetRowIterator(Database db, TableIdentifier tid, Table table, Selectable whereNode, boolean readOnly, RowDecorator dec)
protected RowDecoratormakeRowDecorator(Table table)
protected voidpopulateDefaultValues(Database db, Table table, TableIdentifier tableId, RowDecorator dec)
protected booleanpopulateSequenceColumns(Database db, Table table, Row row)
protected voidresolveGeneratedColumns(Table table, TableIdentifier tableId, List cols)
protected voidresolveGeneratedColumns(Table table, TableIdentifier tableId, List cols, boolean useDefaultValues)
protected SelectableresolveSelectable(Selectable sel, Database db, List selected, TableIdentifier[] tables)
protected SelectableresolveSelectable(Selectable sel, Database db, TableIdentifier[] tables)
protected voidresolveSelectableList(List list, Database db, TableIdentifier table)
protected voidresolveSelectableList(List list, Database db, TableIdentifier[] tables)
protected voidsetBindVariableVisitor(FindBindVariableVisitor visitor)
protected voidsetDeferAllConstraintIfRequired(Table table)
protected voidsetEffectedRowCount(int count)
If sublasses return a number of rows effected, then upon execution, they should set that number here so it can support
protected voidsetResultSet(ResultSet rset)
If subclasses create a AxionResultSetupon execution, they should set it here so that they can support BaseAxionCommand.
protected voidupdateGeneratedValues(Database db, Table table, TableIdentifier tableId, Row row)

Method Detail

assertNotReadOnly

protected void assertNotReadOnly(Database db)
Throws an AxionExceptionif the given Databaseis read-only.

attemptToConvertValue

protected Object attemptToConvertValue(Object val, DataType type, ColumnIdentifier colid)

bindAll

public void bindAll(Object[] vals)
Sets the values of all bind variable within this command.

Parameters: index the one-based index of the variable value the value to bind the variable to

buildBindVariables

protected void buildBindVariables()

clearBindings

public void clearBindings()
Clears all bind variables within this command.

createResolveSelectableVisitor

protected final void createResolveSelectableVisitor(Database db)

executeQuery

public AxionResultSet executeQuery(Database db, boolean isReadOnly)

getBindVariableIterator

protected Iterator getBindVariableIterator()
Returns an Iteratorover all my BindVariables, in the proper order. Default impl returns empty iterator.

getBindVariableIterator

protected Iterator getBindVariableIterator(Selectable sel)

getBindVariables

public List getBindVariables()

getBindVariableVisitor

protected final FindBindVariableVisitor getBindVariableVisitor()

getColIdentifierList

protected List getColIdentifierList(Table table, TableIdentifier tid)

getCommitSize

protected int getCommitSize(Database db)

getEffectedRowCount

public final int getEffectedRowCount()

getResultSet

public final ResultSet getResultSet()

getRowIterator

protected RowIterator getRowIterator(Database db, TableIdentifier tid, Table table, Selectable whereNode, boolean readOnly, RowDecorator dec)

makeRowDecorator

protected final RowDecorator makeRowDecorator(Table table)

populateDefaultValues

protected void populateDefaultValues(Database db, Table table, TableIdentifier tableId, RowDecorator dec)

populateSequenceColumns

protected boolean populateSequenceColumns(Database db, Table table, Row row)

resolveGeneratedColumns

protected void resolveGeneratedColumns(Table table, TableIdentifier tableId, List cols)

resolveGeneratedColumns

protected void resolveGeneratedColumns(Table table, TableIdentifier tableId, List cols, boolean useDefaultValues)

resolveSelectable

protected Selectable resolveSelectable(Selectable sel, Database db, List selected, TableIdentifier[] tables)

resolveSelectable

protected Selectable resolveSelectable(Selectable sel, Database db, TableIdentifier[] tables)

resolveSelectableList

protected void resolveSelectableList(List list, Database db, TableIdentifier table)

resolveSelectableList

protected void resolveSelectableList(List list, Database db, TableIdentifier[] tables)

setBindVariableVisitor

protected final void setBindVariableVisitor(FindBindVariableVisitor visitor)

setDeferAllConstraintIfRequired

protected void setDeferAllConstraintIfRequired(Table table)

setEffectedRowCount

protected final void setEffectedRowCount(int count)
If sublasses return a number of rows effected, then upon execution, they should set that number here so it can support BaseAxionCommand

setResultSet

protected final void setResultSet(ResultSet rset)
If subclasses create a AxionResultSetupon execution, they should set it here so that they can support BaseAxionCommand.

See Also: BaseAxionCommand

updateGeneratedValues

protected void updateGeneratedValues(Database db, Table table, TableIdentifier tableId, Row row)