Search in sources :

Example 1 with AccountFlagMapping

use of org.mifos.accounts.business.AccountFlagMapping in project head by mifos.

the class SavingsAction method getDepositDueDetails.

@TransactionDemarcate(saveToken = true)
public ActionForward getDepositDueDetails(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    logger.debug("In SavingsAction::getDepositDueDetails()");
    SavingsActionForm actionform = (SavingsActionForm) form;
    UserContext uc = (UserContext) SessionUtils.getAttribute(Constants.USER_CONTEXT_KEY, request.getSession());
    SessionUtils.removeAttribute(Constants.BUSINESS_KEY, request);
    String savingsSystemId = actionform.getGlobalAccountNum();
    SavingsBO savings = savingsDao.findBySystemId(savingsSystemId);
    for (AccountActionDateEntity actionDate : savings.getAccountActionDates()) {
        Hibernate.initialize(actionDate);
    }
    Hibernate.initialize(savings.getAccountNotes());
    for (AccountFlagMapping accountFlagMapping : savings.getAccountFlags()) {
        Hibernate.initialize(accountFlagMapping.getFlag());
    }
    Hibernate.initialize(savings.getAccountFlags());
    savings.setUserContext(uc);
    SessionUtils.setAttribute(Constants.BUSINESS_KEY, savings, request);
    SavingsAccountDepositDueDto depositDueDetails = this.savingsServiceFacade.retrieveDepositDueDetails(savingsSystemId);
    return mapping.findForward("depositduedetails_success");
}
Also used : SavingsActionForm(org.mifos.accounts.savings.struts.actionforms.SavingsActionForm) AccountActionDateEntity(org.mifos.accounts.business.AccountActionDateEntity) AccountFlagMapping(org.mifos.accounts.business.AccountFlagMapping) UserContext(org.mifos.security.util.UserContext) SavingsBO(org.mifos.accounts.savings.business.SavingsBO) SavingsAccountDepositDueDto(org.mifos.dto.screen.SavingsAccountDepositDueDto) TransactionDemarcate(org.mifos.framework.util.helpers.TransactionDemarcate)

Example 2 with AccountFlagMapping

use of org.mifos.accounts.business.AccountFlagMapping in project head by mifos.

the class GroupLoanAccountServiceFacadeWebTier method getAccountStateFlagEntityNames.

private Set<String> getAccountStateFlagEntityNames(Set<AccountFlagMapping> accountFlagMappings) {
    Set<String> accountFlagNames = new HashSet<String>();
    if (!accountFlagMappings.isEmpty()) {
        for (AccountFlagMapping accountFlagMapping : accountFlagMappings) {
            String accountFlagName = getAccountStateFlagEntityName(accountFlagMapping.getFlag().getId());
            accountFlagNames.add(accountFlagName);
        }
    }
    return accountFlagNames;
}
Also used : AccountFlagMapping(org.mifos.accounts.business.AccountFlagMapping) HashSet(java.util.HashSet)

Example 3 with AccountFlagMapping

use of org.mifos.accounts.business.AccountFlagMapping in project head by mifos.

the class LoanAccountServiceFacadeWebTier method getAccountStateFlagEntityNames.

private Set<String> getAccountStateFlagEntityNames(Set<AccountFlagMapping> accountFlagMappings) {
    Set<String> accountFlagNames = new HashSet<String>();
    if (!accountFlagMappings.isEmpty()) {
        for (AccountFlagMapping accountFlagMapping : accountFlagMappings) {
            String accountFlagName = getAccountStateFlagEntityName(accountFlagMapping.getFlag().getId());
            accountFlagNames.add(accountFlagName);
        }
    }
    return accountFlagNames;
}
Also used : AccountFlagMapping(org.mifos.accounts.business.AccountFlagMapping) HashSet(java.util.HashSet)

Aggregations

AccountFlagMapping (org.mifos.accounts.business.AccountFlagMapping)3 HashSet (java.util.HashSet)2 AccountActionDateEntity (org.mifos.accounts.business.AccountActionDateEntity)1 SavingsBO (org.mifos.accounts.savings.business.SavingsBO)1 SavingsActionForm (org.mifos.accounts.savings.struts.actionforms.SavingsActionForm)1 SavingsAccountDepositDueDto (org.mifos.dto.screen.SavingsAccountDepositDueDto)1 TransactionDemarcate (org.mifos.framework.util.helpers.TransactionDemarcate)1 UserContext (org.mifos.security.util.UserContext)1