- All Superinterfaces:
AutoCloseable
,Closeable
Interface which processes groups of rows into other groups of rows.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Is called to generate a newGrouper
instance for every query against the target table. -
Method Summary
Modifier and TypeMethodDescriptionaccumulate
(R source) Called for each source row in the group, other than the first one.Called for the first source row in the group.default void
close()
Is called when thisGrouper
instance is no longer needed.Is called when all source group rows have been provided, and the first row for the target group should be assigned.Is called to produce the next target group row.
-
Method Details
-
begin
Called for the first source row in the group.- Parameters:
source
- never null- Returns:
- the next source row instance to use, or null if it was kept by the grouper
- Throws:
IOException
-
accumulate
Called for each source row in the group, other than the first one.- Parameters:
source
- never null- Returns:
- the next source row instance to use, or null if it was kept by the grouper
- Throws:
IOException
-
process
Is called when all source group rows have been provided, and the first row for the target group should be assigned. Returning null signals that the target group is empty, and the next source group can begin.- Parameters:
target
- never null; all columns are initially unset- Returns:
- null if target group is empty
- Throws:
IOException
-
step
Is called to produce the next target group row. Returning null signals that no target rows remain, and the next source group can begin.- Parameters:
target
- never null; all columns are initially unset- Returns:
- null if no target rows remain
- Throws:
IOException
-
close
Is called when thisGrouper
instance is no longer needed.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-