Class CreateOutputJobItemPersistTask
java.lang.Object
ch.tocco.nice2.persist.core.api.exec.AbstractPartitionedPersistTask<OutputJobItemBuilder,Void,Entity>
ch.tocco.nice2.outputcenter.impl.persisttask.CreateOutputJobItemPersistTask
- All Implemented Interfaces:
PersistTask<Iterable<OutputJobItemBuilder>,
Iterable<Void>>
public class CreateOutputJobItemPersistTask
extends AbstractPartitionedPersistTask<OutputJobItemBuilder,Void,Entity>
-
Constructor Summary
ConstructorDescriptionCreateOutputJobItemPersistTask
(PrimaryKey outputJobKey, EntityDefaultValueService entityDefaultValueService, DocumentDao documentDao, Collection<AddressAsStringProvider> addressAsStringProviders) -
Method Summary
Modifier and TypeMethodDescriptionCreate a function that creates an instance of Z.protected Entity
getEntity
(CommandContext commandContext, EntityId entityId) run
(Optional<Iterable<OutputJobItemBuilder>> outputJobItemBuilders, CommandContext commandContext) protected void
setRelation
(CommandContext commandContext, Entity entity, String relationName, @Nullable EntityId entityDescriptor) Methods inherited from class ch.tocco.nice2.persist.core.api.exec.AbstractPartitionedPersistTask
getTaskData, partition, partition, partition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.PersistTask
andThenDo, compose, compose2, composeWhen, discardResult, expand, expand, getDescription, ifElse, orWhen, orWhenNot, passWhen, passWhenNot, skipErrors, unwrap
-
Constructor Details
-
CreateOutputJobItemPersistTask
public CreateOutputJobItemPersistTask(PrimaryKey outputJobKey, EntityDefaultValueService entityDefaultValueService, DocumentDao documentDao, Collection<AddressAsStringProvider> addressAsStringProviders)
-
-
Method Details
-
createTaskData
Description copied from class:AbstractPartitionedPersistTask
Create a function that creates an instance of Z. This function is called once for each context and should be used to load entities (or otherContext
related objects) which are used in every iteration.- Specified by:
createTaskData
in classAbstractPartitionedPersistTask<OutputJobItemBuilder,
Void, Entity>
-
run
public Iterable<Void> run(Optional<Iterable<OutputJobItemBuilder>> outputJobItemBuilders, CommandContext commandContext) throws Exception - Throws:
Exception
-
setRelation
protected void setRelation(CommandContext commandContext, Entity entity, String relationName, @Nullable @Nullable EntityId entityDescriptor) throws InterruptedException - Throws:
InterruptedException
-
getEntity
-