Examples of update()


Examples of org.mifosplatform.portfolio.client.domain.ClientIdentifier.update()

            final Client client = this.clientRepository.findOneWithNotFoundDetection(clientId);
            final ClientIdentifier clientIdentifierForUpdate = this.clientIdentifierRepository.findOne(identifierId);
            if (clientIdentifierForUpdate == null) { throw new ClientIdentifierNotFoundException(identifierId); }

            final Map<String, Object> changes = clientIdentifierForUpdate.update(command);

            if (changes.containsKey("documentTypeId")) {
                documentType = this.codeValueRepository.findOneWithNotFoundDetection(documentTypeId);
                if (documentType == null) { throw new CodeValueNotFoundException(documentTypeId); }
View Full Code Here

Examples of org.mifosplatform.portfolio.collateral.domain.LoanCollateral.update()

            CodeValue collateralType = null;

            final LoanCollateral collateralForUpdate = this.collateralRepository.findOne(collateralId);
            if (collateralForUpdate == null) { throw new CollateralNotFoundException(loanId, collateralId); }

            final Map<String, Object> changes = collateralForUpdate.update(command);

            if (changes.containsKey(COLLATERAL_JSON_INPUT_PARAMS.COLLATERAL_TYPE_ID.getValue())) {

                collateralType = this.codeValueRepository.findOneByCodeNameAndIdWithNotFoundDetection(
                        CollateralApiConstants.COLLATERAL_CODE_NAME, collateralTypeId);
View Full Code Here

Examples of org.mifosplatform.portfolio.fund.domain.Fund.update()

            this.fromApiJsonDeserializer.validateForUpdate(command.json());

            final Fund fund = this.fundRepository.findOne(fundId);
            if (fund == null) { throw new FundNotFoundException(fundId); }

            final Map<String, Object> changes = fund.update(command);
            if (!changes.isEmpty()) {
                this.fundRepository.saveAndFlush(fund);
            }

            return new CommandProcessingResultBuilder().withCommandId(command.commandId()).withEntityId(fund.getId()).with(changes).build();
View Full Code Here

Examples of org.mifosplatform.portfolio.group.domain.Group.update()

            final LocalDate activationDate = command.localDateValueOfParameterNamed(GroupingTypesApiConstants.activationDateParamName);

            validateOfficeOpeningDateisAfterGroupOrCenterOpeningDate(groupOffice, groupForUpdate.getGroupLevel(), activationDate);

            final Map<String, Object> actualChanges = groupForUpdate.update(command);

            if (actualChanges.containsKey(GroupingTypesApiConstants.staffIdParamName)) {
                final Long newValue = command.longValueOfParameterNamed(GroupingTypesApiConstants.staffIdParamName);

                Staff newStaff = null;
View Full Code Here

Examples of org.mifosplatform.portfolio.group.domain.GroupRole.update()

            this.fromApiJsonDeserializer.validateForUpdateRole(command);

            final Group group = this.groupRepository.findOneWithNotFoundDetection(command.getGroupId());

            final GroupRole groupRole = this.groupRoleRepository.findOneWithNotFoundDetection(command.entityId());
            final Map<String, Object> actualChanges = groupRole.update(command);

            if (actualChanges.containsKey(GroupingTypesApiConstants.roleParamName)) {
                final Long newValue = command.longValueOfParameterNamed(GroupingTypesApiConstants.roleParamName);

                CodeValue role = null;
View Full Code Here

Examples of org.mifosplatform.portfolio.interestratechart.domain.InterestRateChart.update()

    public CommandProcessingResult update(Long interestRateChartId, JsonCommand command) {
        this.interestRateChartDataValidator.validateUpdate(command.json());
        final Map<String, Object> changes = new LinkedHashMap<>(20);
        final InterestRateChart interestRateChart = this.interestRateChartAssembler.assembleFrom(interestRateChartId);

        interestRateChart.update(command, changes);

        this.interestRateChartRepository.saveAndFlush(interestRateChart);

        return new CommandProcessingResultBuilder() //
                .withCommandId(command.commandId()) //
View Full Code Here

Examples of org.mifosplatform.portfolio.interestratechart.domain.InterestRateChartSlab.update()

        this.interestRateChartSlabDataValidator.validateUpdate(command.json());
        final Map<String, Object> changes = new LinkedHashMap<>(20);
        final InterestRateChartSlab updateChartSlabs = this.interestRateChartSlabAssembler.assembleFrom(chartSlabId,
                interestRateChartId);
        final Locale locale = command.extractLocale();
        updateChartSlabs.update(command, changes,locale);

        this.chartSlabRepository.saveAndFlush(updateChartSlabs);

        return new CommandProcessingResultBuilder() //
                .withCommandId(command.commandId()) //
View Full Code Here

Examples of org.mifosplatform.portfolio.loanaccount.domain.LoanCharge.update()

                    } else {
                        final Long loanChargeId = id;
                        final LoanCharge loanCharge = this.loanChargeRepository.findOne(loanChargeId);
                        if (loanCharge == null) { throw new LoanChargeNotFoundException(loanChargeId); }

                        loanCharge.update(amount, dueDate, numberOfRepayments);

                        loanCharges.add(loanCharge);
                    }
                }
            }
View Full Code Here

Examples of org.mifosplatform.portfolio.loanaccount.guarantor.domain.Guarantor.update()

            final Loan loan = this.loanRepositoryWrapper.findOneWithNotFoundDetection(loanId);
            final Guarantor guarantorForUpdate = this.guarantorRepository.findByLoanAndId(loan, guarantorId);
            if (guarantorForUpdate == null) { throw new GuarantorNotFoundException(loanId, guarantorId); }

            final Map<String, Object> changesOnly = guarantorForUpdate.update(command);

            if (changesOnly.containsKey(GUARANTOR_JSON_INPUT_PARAMS.CLIENT_RELATIONSHIP_TYPE_ID.getValue())) {
                final Long clientRelationshipId = guarantorCommand.getClientRelationshipTypeId();
                CodeValue clientRelationshipType = null;
                if (clientRelationshipId != null) {
View Full Code Here

Examples of org.mifosplatform.portfolio.loanproduct.domain.LoanProduct.update()

            if (product == null) { throw new LoanProductNotFoundException(loanProductId); }

            this.fromApiJsonDeserializer.validateForUpdate(command.json(), product);
            validateInputDates(command);

            final Map<String, Object> changes = product.update(command, this.aprCalculator);

            if (changes.containsKey("fundId")) {
                final Long fundId = (Long) changes.get("fundId");
                final Fund fund = findFundByIdIfProvided(fundId);
                product.update(fund);
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.