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
ConstructorsConstructorDescriptionCreateOutputJobItemPersistTask(PrimaryKey outputJobKey, EntityDefaultValueService entityDefaultValueService, DocumentDao documentDao, Collection<AddressAsStringProvider> addressAsStringProviders) -
Method Summary
Modifier and TypeMethodDescriptionCreate a function that creates an instance of Z.protected EntitygetEntity(CommandContext commandContext, EntityId entityId) run(Optional<Iterable<OutputJobItemBuilder>> outputJobItemBuilders, CommandContext commandContext) protected voidsetRelation(CommandContext commandContext, Entity entity, String relationName, @Nullable EntityId entityDescriptor) Methods inherited from class AbstractPartitionedPersistTask
getTaskData, partition, partition, partitionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:AbstractPartitionedPersistTaskCreate a function that creates an instance of Z. This function is called once for each context and should be used to load entities (or otherContextrelated objects) which are used in every iteration.- Specified by:
createTaskDatain 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
-