Module is.codion.framework.db.core
Package is.codion.framework.db
Interface EntityConnection.Copy.Builder
- Enclosing interface:
- EntityConnection.Copy
public static interface EntityConnection.Copy.Builder
A builder for a
EntityConnection.Copy operation.-
Method Summary
Modifier and TypeMethodDescriptionbatchSize(int batchSize) build()condition(is.codion.framework.domain.entity.condition.Condition condition) Specifies a condition to use when determining which entities of the given type to copy, if none is specified all entities are copied.entityTypes(is.codion.framework.domain.entity.EntityType... entityTypes) voidexecute()Builds and executes this copy operationincludePrimaryKeys(boolean includePrimaryKeys)
-
Method Details
-
entityTypes
EntityConnection.Copy.Builder entityTypes(is.codion.framework.domain.entity.EntityType... entityTypes) - Parameters:
entityTypes- the entity types to copy- Returns:
- this builder instance
-
batchSize
- Parameters:
batchSize- the commit batch size- Returns:
- this buildr instance
- Throws:
IllegalArgumentException- ifbatchSizeis not a positive integer
-
includePrimaryKeys
- Parameters:
includePrimaryKeys- true if the primary key values should be included when copying- Returns:
- this builder instance
-
condition
EntityConnection.Copy.Builder condition(is.codion.framework.domain.entity.condition.Condition condition) Specifies a condition to use when determining which entities of the given type to copy, if none is specified all entities are copied.- Parameters:
condition- the condition to use- Returns:
- this builder instance
-
execute
void execute() throws is.codion.common.db.exception.DatabaseExceptionBuilds and executes this copy operation- Throws:
is.codion.common.db.exception.DatabaseException- in case of an exception
-
build
EntityConnection.Copy build()- Returns:
- a new
EntityConnection.Copyinstance
-