Examples of ProductMixNotFoundException


Examples of org.mifosplatform.portfolio.loanproduct.productmix.exception.ProductMixNotFoundException

            final Map<Long, ProductMixData> productMixData = this.jdbcTemplate.query(sql, extractor, new Object[] { productId });

            return productMixData.get(productId);

        } catch (final EmptyResultDataAccessException e) {
            throw new ProductMixNotFoundException(productId);
        }
    }
View Full Code Here

Examples of org.mifosplatform.portfolio.loanproduct.productmix.exception.ProductMixNotFoundException

            this.context.authenticatedUser();
            this.fromApiJsonDeserializer.validateForUpdate(command.json());
            final Map<String, Object> changes = new LinkedHashMap<>();

            final List<ProductMix> existedProductMixes = this.productMixRepository.findByProductId(productId);
            if (CollectionUtils.isEmpty(existedProductMixes)) { throw new ProductMixNotFoundException(productId); }
            final Set<String> restrictedIds = new HashSet<>(Arrays.asList(command.arrayValueOfParameterNamed("restrictedProducts")));

            // updating with empty array means deleting the existed records.
            if (restrictedIds.isEmpty()) {
                final List<Long> removedRestrictedProductIds = this.productMixRepository.findRestrictedProductIdsByProductId(productId);
View Full Code Here

Examples of org.mifosplatform.portfolio.loanproduct.productmix.exception.ProductMixNotFoundException

        try {
            this.context.authenticatedUser();
            final Map<String, Object> changes = new LinkedHashMap<>();

            final List<ProductMix> existedProductMixes = this.productMixRepository.findByProductId(productId);
            if (CollectionUtils.isEmpty(existedProductMixes)) { throw new ProductMixNotFoundException(productId); }
            this.productMixRepository.delete(existedProductMixes);
            changes.put("removedProductsForMix", getProductIdsFromCollection(existedProductMixes));
            return new CommandProcessingResultBuilder().with(changes).withProductId(productId).build();
        } catch (final DataIntegrityViolationException dve) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.