Package org.mifosplatform.infrastructure.core.data

Examples of org.mifosplatform.infrastructure.core.data.EnumOptionData


    public static EnumOptionData entityType(final Integer entityType) {
        return entityType(InterestIncentiveEntityType.fromInt(entityType));
    }

    public static EnumOptionData entityType(final InterestIncentiveEntityType type) {
        EnumOptionData nameOptionData = new EnumOptionData(InterestIncentiveEntityType.INVALID.getValue().longValue(),
                InterestIncentiveEntityType.INVALID.getCode(), "Invalid");

        switch (type) {
            case INVALID:
            break;
            case ACCOUNT:
                nameOptionData = new EnumOptionData(InterestIncentiveEntityType.ACCOUNT.getValue().longValue(),
                        InterestIncentiveEntityType.ACCOUNT.getCode(), "account");
            break;
            case CUSTOMER:
                nameOptionData = new EnumOptionData(InterestIncentiveEntityType.CUSTOMER.getValue().longValue(),
                        InterestIncentiveEntityType.CUSTOMER.getCode(), "Customer");
            break;
        }

        return nameOptionData;
View Full Code Here


    public static EnumOptionData incentiveType(final Integer incentiveType) {
        return incentiveType(InterestIncentiveType.fromInt(incentiveType));
    }

    public static EnumOptionData incentiveType(final InterestIncentiveType type) {
        EnumOptionData nameOptionData = new EnumOptionData(InterestIncentiveType.INVALID.getValue().longValue(),
                InterestIncentiveType.INVALID.getCode(), "Invalid");

        switch (type) {
            case INVALID:
            break;
            case FIXED:
                nameOptionData = new EnumOptionData(InterestIncentiveType.FIXED.getValue().longValue(),
                        InterestIncentiveType.FIXED.getCode(), "Fixed");
            break;
            case INCENTIVE:
                nameOptionData = new EnumOptionData(InterestIncentiveType.INCENTIVE.getValue().longValue(),
                        InterestIncentiveType.INCENTIVE.getCode(), "Incentive");
            break;
        }

        return nameOptionData;
View Full Code Here

    public static EnumOptionData periodType(final Integer type) {
        return periodType(PeriodFrequencyType.fromInt(type));
    }

    public static EnumOptionData periodType(final PeriodFrequencyType type) {
        EnumOptionData optionData = new EnumOptionData(PeriodFrequencyType.INVALID.getValue().longValue(),
                PeriodFrequencyType.INVALID.getCode(), "Invalid");

        switch (type) {
            case INVALID:
            break;
            case DAYS:
                optionData = new EnumOptionData(PeriodFrequencyType.DAYS.getValue().longValue(),
                        PeriodFrequencyType.DAYS.getCode(), "Days");
            break;
            case WEEKS:
                optionData = new EnumOptionData(PeriodFrequencyType.WEEKS.getValue().longValue(),
                        PeriodFrequencyType.WEEKS.getCode(), "Weeks");
            break;
            case MONTHS:
                optionData = new EnumOptionData(PeriodFrequencyType.MONTHS.getValue().longValue(),
                        PeriodFrequencyType.MONTHS.getCode(), "Months");
            break;
            case YEARS:
                optionData = new EnumOptionData(PeriodFrequencyType.YEARS.getValue().longValue(),
                        PeriodFrequencyType.YEARS.getCode(), "Years");
            break;
        }

        return optionData;
View Full Code Here

            final String description = rs.getString("ircdDescription");
            final Integer fromPeriod = JdbcSupport.getInteger(rs, "ircdFromPeriod");
            final Integer toPeriod = JdbcSupport.getInteger(rs, "ircdToPeriod");
            final Integer periodTypeId = JdbcSupport.getInteger(rs, "ircdPeriodTypeId");
            final EnumOptionData periodType = InterestRateChartEnumerations.periodType(periodTypeId);
            final BigDecimal amountRangeFrom = rs.getBigDecimal("ircdAmountRangeFrom");
            final BigDecimal amountRangeTo = rs.getBigDecimal("ircdAmountRangeTo");
            final BigDecimal annualInterestRate = rs.getBigDecimal("ircdAnnualInterestRate");

            // currency Slabs
View Full Code Here

            if (id == null) { return null; }

            final String attributeValue = rs.getString("attributeValue");
            String attributeValueDesc = null;
            final Integer entityType = JdbcSupport.getInteger(rs, "entityType");
            final EnumOptionData entityTypeData = InterestIncentivesEnumerations.entityType(entityType);

            final Integer attributeName = JdbcSupport.getInteger(rs, "attributeName");
            if (InterestIncentiveAttributeName.isCodeValueAttribute(InterestIncentiveAttributeName.fromInt(attributeName))) {
                attributeValueDesc = rs.getString("attributeValueDesc");
            }
            final EnumOptionData attributeNameData = InterestIncentivesEnumerations.attributeName(attributeName);
            final Integer conditionType = JdbcSupport.getInteger(rs, "conditionType");
            final EnumOptionData conditionTypeData = CommonEnumerations.conditionType(conditionType, "incentive");
            final Integer incentiveType = JdbcSupport.getInteger(rs, "incentiveType");
            final EnumOptionData incentiveTypeData = InterestIncentivesEnumerations.incentiveType(incentiveType);
            final BigDecimal amount = rs.getBigDecimal("amount");

            return DepositAccountInterestIncentiveData.instance(id, entityTypeData, attributeNameData, conditionTypeData, attributeValue,
                    attributeValueDesc, incentiveTypeData, amount);
View Full Code Here

            final CurrencyData currency = new CurrencyData(currencyCode, currencyName, currencyDigits, inMultiplesOf,
                    currencyDisplaySymbol, currencyNameCode);
            final BigDecimal nominalAnnualInterestRate = rs.getBigDecimal("nominalAnnualInterestRate");

            final Integer compoundingInterestPeriodTypeValue = JdbcSupport.getInteger(rs, "compoundingInterestPeriodType");
            final EnumOptionData compoundingInterestPeriodType = SavingsEnumerations
                    .compoundingInterestPeriodType(compoundingInterestPeriodTypeValue);

            final Integer interestPostingPeriodTypeValue = JdbcSupport.getInteger(rs, "interestPostingPeriodType");
            final EnumOptionData interestPostingPeriodType = SavingsEnumerations.interestPostingPeriodType(interestPostingPeriodTypeValue);

            final Integer interestCalculationTypeValue = JdbcSupport.getInteger(rs, "interestCalculationType");
            final EnumOptionData interestCalculationType = SavingsEnumerations.interestCalculationType(interestCalculationTypeValue);

            EnumOptionData interestCalculationDaysInYearType = null;
            final Integer interestCalculationDaysInYearTypeValue = JdbcSupport.getInteger(rs, "interestCalculationDaysInYearType");
            if (interestCalculationDaysInYearTypeValue != null) {
                interestCalculationDaysInYearType = SavingsEnumerations
                        .interestCalculationDaysInYearType(interestCalculationDaysInYearTypeValue);
            }

            final Integer accountingRuleId = JdbcSupport.getInteger(rs, "accountingType");
            final EnumOptionData accountingRuleType = AccountingEnumerations.accountingRuleType(accountingRuleId);

            final BigDecimal minRequiredOpeningBalance = rs.getBigDecimal("minRequiredOpeningBalance");

            final Integer lockinPeriodFrequency = JdbcSupport.getInteger(rs, "lockinPeriodFrequency");
            EnumOptionData lockinPeriodFrequencyType = null;
            final Integer lockinPeriodFrequencyTypeValue = JdbcSupport.getInteger(rs, "lockinPeriodFrequencyType");
            if (lockinPeriodFrequencyTypeValue != null) {
                lockinPeriodFrequencyType = SavingsEnumerations.lockinPeriodFrequencyType(lockinPeriodFrequencyTypeValue);
            }
View Full Code Here

    public static EnumOptionData organisationalRole(final Integer id) {
        return organisationalRole(StaffOrganisationalRoleType.fromInt(id));
    }

    public static EnumOptionData organisationalRole(final StaffOrganisationalRoleType type) {
        EnumOptionData optionData = new EnumOptionData(StaffOrganisationalRoleType.INVALID.getValue().longValue(),
                StaffOrganisationalRoleType.INVALID.getCode(), "Invalid");
        switch (type) {
            case PROGRAM_DIRECTOR:
                optionData = new EnumOptionData(type.getValue().longValue(), type.getCode(), "Program Director");
            break;
            case BRANCH_MANAGER:
                optionData = new EnumOptionData(type.getValue().longValue(), type.getCode(), "Branch Manager");
            break;
            case FIELD_OFFICER_COORDINATOR:
                optionData = new EnumOptionData(type.getValue().longValue(), type.getCode(), "Field Officer Coordinator");
            break;
            case FIELD_OFFICER:
                optionData = new EnumOptionData(type.getValue().longValue(), type.getCode(), "Field Officer");
            break;
            case INVALID:
            break;
        }
        return optionData;
View Full Code Here

            this.joiningDate = joiningDate.toDateTimeAtStartOfDay().toDate();
        }
    }

    public EnumOptionData organisationalRoleData() {
        EnumOptionData organisationalRole = null;
        if (this.organisationalRoleType != null) {
            organisationalRole = StaffEnumerations.organisationalRole(this.organisationalRoleType);
        }
        return organisationalRole;
    }
View Full Code Here

    public static EnumOptionData interestCalculationDaysInYearType(final Integer type) {
        return interestCalculationDaysInYearType(SavingsInterestCalculationDaysInYearType.fromInt(type));
    }

    public static EnumOptionData interestCalculationDaysInYearType(final SavingsInterestCalculationDaysInYearType type) {
        EnumOptionData optionData = new EnumOptionData(SavingsInterestCalculationDaysInYearType.INVALID.getValue().longValue(),
                SavingsInterestCalculationDaysInYearType.INVALID.getCode(), "Invalid");

        switch (type) {
            case INVALID:
            break;
            case DAYS_360:
                optionData = new EnumOptionData(SavingsInterestCalculationDaysInYearType.DAYS_360.getValue().longValue(),
                        SavingsInterestCalculationDaysInYearType.DAYS_360.getCode(), "360 Days");
            break;
            case DAYS_365:
                optionData = new EnumOptionData(SavingsInterestCalculationDaysInYearType.DAYS_365.getValue().longValue(),
                        SavingsInterestCalculationDaysInYearType.DAYS_365.getCode(), "365 Days");
            break;
        }

        return optionData;
View Full Code Here

    public static EnumOptionData withdrawalFeeType(final Integer type) {
        return withdrawalFeeType(SavingsWithdrawalFeesType.fromInt(type));
    }

    public static EnumOptionData withdrawalFeeType(final SavingsWithdrawalFeesType type) {
        EnumOptionData optionData = new EnumOptionData(SavingsWithdrawalFeesType.INVALID.getValue().longValue(),
                SavingsWithdrawalFeesType.INVALID.getCode(), "Invalid");

        switch (type) {
            case INVALID:
            break;
            case FLAT:
                optionData = new EnumOptionData(SavingsWithdrawalFeesType.FLAT.getValue().longValue(),
                        SavingsWithdrawalFeesType.FLAT.getCode(), "Flat");
            break;
            case PERCENT_OF_AMOUNT:
                optionData = new EnumOptionData(SavingsWithdrawalFeesType.PERCENT_OF_AMOUNT.getValue().longValue(),
                        SavingsWithdrawalFeesType.PERCENT_OF_AMOUNT.getCode(), "% of Amount");
            break;
        }

        return optionData;
View Full Code Here

TOP

Related Classes of org.mifosplatform.infrastructure.core.data.EnumOptionData

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.