Module org.seasar.doma.core
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractIterationHandler(IterationCallback<TARGET, RESULT> iterationCallback) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ObjectProvider<TARGET>createObjectProvider(SelectQuery query) handle(ResultSet resultSet, SelectQuery query, ResultSetRowIndexConsumer consumer) Processes a ResultSet and converts it into the specified result type.protected RESULT
-
Field Details
-
iterationCallback
-
-
Constructor Details
-
AbstractIterationHandler
-
-
Method Details
-
handle
public Supplier<RESULT> handle(ResultSet resultSet, SelectQuery query, ResultSetRowIndexConsumer consumer) throws SQLException Description copied from interface:ResultSetHandlerProcesses 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:
handlein interfaceResultSetHandler<TARGET>- Parameters:
resultSet- the JDBC ResultSet to processquery- the query that produced this ResultSetconsumer- 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
-
createObjectProvider
-