Interface MergeFromRepositoryOrFactory<T>
-
public interface MergeFromRepositoryOrFactory<T>An element of theDSLallowing to specify the behavior when aggregates cannot be found in the repository.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TorFail()Returns the aggregates or throws anAggregateNotFoundExceptionif at least one aggregate cannot be loaded from their repository.TorFromFactory()Returns the aggregates, allowing to create aggregates with itsFactorywhen they cannot be loaded from the repository.It uses theFactoryArgumentannotation on the DTO to find the factory method parameters.
-
-
-
Method Detail
-
orFail
T orFail() throws AggregateNotFoundException
Returns the aggregates or throws anAggregateNotFoundExceptionif at least one aggregate cannot be loaded from their repository.- Returns:
- the next element in the DSL.
- Throws:
AggregateNotFoundException- if an aggregate cannot be retrieved from the repository.
-
orFromFactory
T orFromFactory()
Returns the aggregates, allowing to create aggregates with itsFactorywhen they cannot be loaded from the repository.It uses theFactoryArgumentannotation on the DTO to find the factory method parameters.- Returns:
- the next element in the DSL.
-
-