org.axiondb.engine.commands
Class SelectCommand

java.lang.Object
  extended by org.axiondb.engine.commands.BaseAxionCommand
      extended by org.axiondb.engine.commands.SelectCommand
All Implemented Interfaces:
AxionCommand
Direct Known Subclasses:
SubSelectCommand

public class SelectCommand
extends BaseAxionCommand

A SELECT query.

Version:
$Revision: 1.111 $ $Date: 2005/12/23 01:32:25 $

Field Summary
protected  AxionQueryContext _context
           
protected  Database _currentDatabase
           
protected  AxionQueryPlanner _planner
           
 
Constructor Summary
SelectCommand(AxionQueryContext context)
           
 
Method Summary
protected  void buildBindVariables()
           
protected  void buildTableList(Database db)
           
 boolean execute(Database database)
          Executes an SQL statement that may return multiple results.
 AxionResultSet executeQuery(Database db)
          Execute this command, returning a ResultSet.
 AxionResultSet executeQuery(Database db, boolean isReadOnly)
          Execute an SQL statement that returns a single ResultSet object with the given read-only state.
 int executeUpdate(Database database)
          Unsupported
 Map getColumnIdToFieldMap()
           
 AxionQueryContext getQueryContext()
           
 RowIterator makeRowIterator(Database db, boolean isReadOnly)
           
 RowIterator makeRowIterator(Database db, boolean isReadOnly, boolean refresh)
           
protected  void resolve(Database db)
           
 String toString()
           
 
Methods inherited from class org.axiondb.engine.commands.BaseAxionCommand
assertNotReadOnly, attemptToConvertValue, bindAll, clearBindings, createResolveSelectableVisitor, 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, wait, wait, wait
 

Field Detail

_context

protected AxionQueryContext _context

_currentDatabase

protected Database _currentDatabase

_planner

protected AxionQueryPlanner _planner
Constructor Detail

SelectCommand

public SelectCommand(AxionQueryContext context)
Method Detail

execute

public boolean execute(Database database)
                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
Execute this command, returning a ResultSet.

Returns:
the ResultSetgenerated by this command.
Throws:
AxionException
See Also:
Statement.executeQuery(java.lang.String), PreparedStatement.executeQuery()

executeQuery

public AxionResultSet executeQuery(Database db,
                                   boolean isReadOnly)
                            throws AxionException
Description copied from interface: AxionCommand
Execute an SQL statement that returns a single ResultSet object with the given read-only state.

Specified by:
executeQuery in interface AxionCommand
Overrides:
executeQuery in class BaseAxionCommand
Parameters:
db - Database in which query will be executed
isReadOnly - true if statement is read-only, false otherwise
Returns:
the generated ResultSet
Throws:
AxionException

executeUpdate

public int executeUpdate(Database database)
                  throws AxionException
Unsupported

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

getColumnIdToFieldMap

public Map getColumnIdToFieldMap()

getQueryContext

public AxionQueryContext getQueryContext()

toString

public String toString()
Overrides:
toString in class Object

buildTableList

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

buildBindVariables

protected void buildBindVariables()
Overrides:
buildBindVariables in class BaseAxionCommand

makeRowIterator

public RowIterator makeRowIterator(Database db,
                                   boolean isReadOnly)
                            throws AxionException
Throws:
AxionException

makeRowIterator

public RowIterator makeRowIterator(Database db,
                                   boolean isReadOnly,
                                   boolean refresh)
                            throws AxionException
Throws:
AxionException

resolve

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