class CashFlowValidator {

    public void validateCaptureCashFlow(CashFlowForm cashFlow, ValidationContext context) {
        MessageContext messageContext = context.getMessageContext();
        for (MonthlyCashFlowForm monthlyCashFlowForm : cashFlow.getMonthlyCashFlows()) {
            validateExpense(messageContext, monthlyCashFlowForm);
            validateRevenue(messageContext, monthlyCashFlowForm);
            validateNotes(messageContext, monthlyCashFlowForm);
        }
        validateCumulativeCashFlow(cashFlow, messageContext);
        validateTotalCapitalAndLiability(cashFlow, messageContext);
        validateIndebtednessRatio(cashFlow, messageContext);
        setTotalsOnCashFlowForm(cashFlow, messageContext);
    }

}