Class AggregateCommand<RESULT,ENTITY>

java.lang.Object
org.seasar.doma.jdbc.aggregate.AggregateCommand<RESULT,ENTITY>
Type Parameters:
RESULT - the result type of the aggregation
ENTITY - the root entity type used within the aggregation
All Implemented Interfaces:
Command<RESULT>

public class AggregateCommand<RESULT,ENTITY> extends Object implements Command<RESULT>
The AggregateCommand class represents a command designed to execute an aggregate operation on a stream of entities and return a result.
  • Constructor Details

  • Method Details

    • execute

      public RESULT execute()
      Description copied from interface: Command
      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.

      Specified by:
      execute in interface Command<RESULT>
      Returns:
      the result of executing the command, the type depends on the specific command implementation
    • getQuery

      public Query getQuery()
      Description copied from interface: Command
      Returns the query associated with this command.

      The query contains the SQL statement and parameters that will be executed by this command.

      Specified by:
      getQuery in interface Command<RESULT>
      Returns:
      the query object that this command will execute