fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From my...@apache.org
Subject [fineract-cn-deposit-account-management] 07/26: close product with commands
Date Mon, 22 Jan 2018 15:49:29 GMT
This is an automated email from the ASF dual-hosted git repository.

myrle pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-deposit-account-management.git

commit 9e4fcdea48f0d009985357c970014ddfba552be4
Author: mgeiss <mgeiss@mifos.org>
AuthorDate: Wed Sep 6 14:07:05 2017 +0200

    close product with commands
---
 .../service/internal/command/handler/ProductDefinitionAggregate.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/service/src/main/java/io/mifos/deposit/service/internal/command/handler/ProductDefinitionAggregate.java
b/service/src/main/java/io/mifos/deposit/service/internal/command/handler/ProductDefinitionAggregate.java
index 3e51c69..788c4c4 100644
--- a/service/src/main/java/io/mifos/deposit/service/internal/command/handler/ProductDefinitionAggregate.java
+++ b/service/src/main/java/io/mifos/deposit/service/internal/command/handler/ProductDefinitionAggregate.java
@@ -109,7 +109,7 @@ public class ProductDefinitionAggregate {
   @CommandHandler
   @EventEmitter(selectorName = EventConstants.SELECTOR_NAME, selectorValue = EventConstants.POST_PRODUCT_DEFINITION_COMMAND)
   @Transactional
-  public String activateProductdefintion(final ActivateProductDefinitionCommand activateProductDefinitionCommand)
{
+  public String activateProductDefinition(final ActivateProductDefinitionCommand activateProductDefinitionCommand)
{
     final Optional<ProductDefinitionEntity> optionalProductDefinition = productDefinitionRepository.findByIdentifier(activateProductDefinitionCommand.identifier());
 
     if (optionalProductDefinition.isPresent()) {
@@ -137,7 +137,7 @@ public class ProductDefinitionAggregate {
   @CommandHandler
   @EventEmitter(selectorName = EventConstants.SELECTOR_NAME, selectorValue = EventConstants.POST_PRODUCT_DEFINITION_COMMAND)
   @Transactional
-  public String deactivateProductdefintion(final DeactivateProductDefinitionCommand activateProductDefinitionCommand)
{
+  public String deactivateProductDefinition(final DeactivateProductDefinitionCommand activateProductDefinitionCommand)
{
     final Optional<ProductDefinitionEntity> optionalProductDefinition = productDefinitionRepository.findByIdentifier(activateProductDefinitionCommand.identifier());
 
     if (optionalProductDefinition.isPresent()) {
@@ -207,6 +207,7 @@ public class ProductDefinitionAggregate {
       this.productDefinitionCommandRepository.delete(
           this.productDefinitionCommandRepository.findByProductDefinition(productDefinitionEntity)
       );
+      this.productDefinitionCommandRepository.flush();
 
       this.deleteDependingEntities(productDefinitionEntity);
 

-- 
To stop receiving notification emails like this one, please contact
myrle@apache.org.

Mime
View raw message