org.axiondb

Interface AxionCommand

public interface AxionCommand

A command to be executed against a Database.

Version: $Revision: 1.15 $ $Date: 2005/12/22 09:02:30 $

Author: Chuck Burdick Ahimanikya Satapathy

Method Summary
voidbindAll(Object[] values)
Sets the values of the all bind variable within this command.
voidclearBindings()
Clears all bind variables within this command.
booleanexecute(Database db)
Executes an SQL statement that may return multiple results.
AxionResultSetexecuteQuery(Database db)
Executes an SQL statement that returns a single read-only java.sql.ResultSet object such as a SELECT statement.
AxionResultSetexecuteQuery(Database db, boolean isReadOnly)
Execute an SQL statement that returns a single java.sql.ResultSet object with the given read-only state.
intexecuteUpdate(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.
ListgetBindVariables()
intgetEffectedRowCount()
Returns the last row count generated by AxionCommand or AxionCommand.
ResultSetgetResultSet()
Returns the last java.sql.ResultSet generated by AxionCommand or AxionCommand.

Method Detail

bindAll

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

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

clearBindings

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

execute

public boolean execute(Database db)
Executes an SQL statement that may return multiple results.

Returns: true if one or more java.sql.ResultSets were generated, false otherwise

See Also: java.sql.Statement#execute(java.lang.String) java.sql.PreparedStatement#execute

executeQuery

public AxionResultSet executeQuery(Database db)
Executes an SQL statement that returns a single read-only java.sql.ResultSet object such as a SELECT statement.

Returns: the generated java.sql.ResultSet

See Also: java.sql.Statement#executeQuery(java.lang.String) java.sql.PreparedStatement#executeQuery

executeQuery

public AxionResultSet executeQuery(Database db, boolean isReadOnly)
Execute an SQL statement that returns a single java.sql.ResultSet object with the given read-only state.

Parameters: db Database in which query will be executed isReadOnly true if statement is read-only, false otherwise

Returns: the generated java.sql.ResultSet

executeUpdate

public 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. In addition, SQL statements that return nothing, such as SQL DDL statements, can be executed via this method.

Returns: the number of rows modified

See Also: java.sql.Statement#executeUpdate(java.lang.String) java.sql.PreparedStatement#executeUpdate

getBindVariables

public List getBindVariables()

getEffectedRowCount

public int getEffectedRowCount()
Returns the last row count generated by AxionCommand or AxionCommand.

getResultSet

public ResultSet getResultSet()
Returns the last java.sql.ResultSet generated by AxionCommand or AxionCommand.