Package org.mifosplatform.infrastructure.survey.domain

Examples of org.mifosplatform.infrastructure.survey.domain.Likelihood


        try {

            this.likelihoodDataValidator.validateForUpdate(command);

            final Likelihood likelihood = this.repository.findOne(likelihoodId);

            if (!likelihood.update(command).isEmpty()) {
                this.repository.save(likelihood);

                if (likelihood.isActivateCommand(command)) {
                    List<Likelihood> likelihoods = this.repository
                            .findByPpiNameAndLikeliHoodId(likelihood.getPpiName(), likelihood.getId());

                    for (Likelihood aLikelihood : likelihoods) {
                        aLikelihood.disable();
                    }
                    this.repository.save(likelihoods);
                }

            }

            return new CommandProcessingResultBuilder().withCommandId(command.commandId()).withEntityId(likelihood.getId()).build();

        } catch (final DataIntegrityViolationException dve) {
            handleDataIntegrityIssues(dve);
            return CommandProcessingResult.empty();
        }
View Full Code Here

TOP

Related Classes of org.mifosplatform.infrastructure.survey.domain.Likelihood

Copyright © 2018 www.massapicom. 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.