Interface Grouper<R,T>
- All Superinterfaces:
AutoCloseable, Closeable
Interface which processes groups of rows into other groups of rows.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceIs used to generate a newGrouperinstance for every query against the target table. -
Method Summary
Modifier and TypeMethodDescriptionaccumulate(R source) Is called for each source row in the group, other than the first one, and then thestepmethod is called.Is called for the first source row in the group, and then thestepmethod is called.default voidclose()Is called when thisGrouperinstance is no longer needed.default voidfinished()Is called after the last source row in the group has been provided, and then thestepmethod is called.Is called to produce the next target row.
-
Method Details
-
begin
Is called for the first source row in the group, and then thestepmethod is called.- Parameters:
source- never null- Returns:
- the next source row instance to use, or null if it was kept by the grouper
- Throws:
IOException
-
accumulate
Is called for each source row in the group, other than the first one, and then thestepmethod is called.- Parameters:
source- never null- Returns:
- the next source row instance to use, or null if it was kept by the grouper
- Throws:
IOException
-
finished
Is called after the last source row in the group has been provided, and then thestepmethod is called.- Throws:
IOException
-
step
Is called to produce the next target row. Returning null indicates that no target rows remain, and that reading of source group rows can resume.- Parameters:
target- never null; all columns are initially unset- Returns:
- null if no target rows remain
- Throws:
IOException
-
close
Is called when thisGrouperinstance is no longer needed.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-