- Type Parameters:
RESULT- the type of result that this command produces when executed
- All Known Implementing Classes:
AggregateCommand,AssociateCommand,BatchDeleteCommand,BatchInsertCommand,BatchModifyCommand,BatchUpdateCommand,CreateCommand,DeleteCommand,DeleteReturningCommand,FunctionCommand,InsertCommand,InsertReturningCommand,ModifyCommand,ModifyReturningCommand,ModuleCommand,ProcedureCommand,ScriptCommand,SelectCommand,SqlProcessorCommand,UpdateCommand,UpdateReturningCommand
This interface represents a command pattern implementation for database access. Each command encapsulates a specific database operation (such as select, insert, update, delete) along with its execution logic. Commands are responsible for executing queries and processing their results.
The Command interface is designed to be extensible, with various implementations for different types of database operations. Each implementation handles the specific details of executing its associated query type and processing the results.
-
Method Summary
-
Method Details
-
getQuery
Query getQuery()Returns the query associated with this command.The query contains the SQL statement and parameters that will be executed by this command.
- Returns:
- the query object that this command will execute
-
execute
RESULT execute()Executes the command and returns the result.This method is responsible for executing the database operation encapsulated by this command. It handles the execution of the SQL statement, processing of results, and any necessary resource management.
- Returns:
- the result of executing the command, the type depends on the specific command implementation
-