Class AbstractIterationHandler<TARGET,RESULT>

java.lang.Object
org.seasar.doma.internal.jdbc.command.AbstractIterationHandler<TARGET,RESULT>
All Implemented Interfaces:
ResultSetHandler<RESULT>
Direct Known Subclasses:
AssociationEntityPoolIterationHandler, EntityIterationHandler, EntityPoolIterationHandler, MapIterationHandler, ScalarIterationHandler

public abstract class AbstractIterationHandler<TARGET,RESULT> extends Object implements ResultSetHandler<RESULT>
  • Field Details

  • Constructor Details

  • Method Details

    • handle

      public Supplier<RESULT> handle(ResultSet resultSet, SelectQuery query, ResultSetRowIndexConsumer consumer) throws SQLException
      Description copied from interface: ResultSetHandler
      Processes a ResultSet and converts it into the specified result type.

      This method is called after executing a database query to process the returned ResultSet. It should iterate through the ResultSet and transform the data according to the implementation's logic. The consumer parameter can be used to track the current row position during processing.

      Specified by:
      handle in interface ResultSetHandler<TARGET>
      Parameters:
      resultSet - the JDBC ResultSet to process
      query - the query that produced this ResultSet
      consumer - a consumer that receives information about the current row being processed
      Returns:
      a supplier that provides the result of processing the ResultSet
      Throws:
      SQLException - if a database access error occurs during ResultSet processing
    • iterate

      protected RESULT iterate(Iterator<TARGET> iterator)
    • createObjectProvider

      protected abstract ObjectProvider<TARGET> createObjectProvider(SelectQuery query)