Module is.codion.framework.db.core
Package is.codion.framework.db
Interface EntityConnection.Insert.Builder
- Enclosing interface:
- EntityConnection.Insert
public static interface EntityConnection.Insert.Builder
A builder for
EntityConnection.Insert operation.-
Method Summary
Modifier and TypeMethodDescriptionbatchSize(int batchSize) build()voidexecute()Builds and executes this insert operationonInsert(Consumer<Collection<is.codion.framework.domain.entity.Entity.Key>> onInsert) progressReporter(Consumer<Integer> progressReporter)
-
Method Details
-
batchSize
- Parameters:
batchSize- the commit batch size- Returns:
- this builder instance
-
progressReporter
- Parameters:
progressReporter- if specified this will be used to report batch progress- Returns:
- this builder instance
-
onInsert
EntityConnection.Insert.Builder onInsert(Consumer<Collection<is.codion.framework.domain.entity.Entity.Key>> onInsert) - Parameters:
onInsert- notified each time a batch is inserted, providing the inserted keys- Returns:
- this builder instance
-
execute
void execute() throws is.codion.common.db.exception.DatabaseExceptionBuilds and executes this insert operation- Throws:
is.codion.common.db.exception.DatabaseException- in case of an exception
-
build
EntityConnection.Insert build()- Returns:
- a new
EntityConnection.Insertinstance
-