/** * Creates an instance of BudgetCommonService by looking at the classname. * * @return */ public static BudgetCommonService createInstance(BudgetParentDocument parentBudgetDocument) { if (parentBudgetDocument.getClass().equals(AwardDocument.class)) { return KraServiceLocator.getService(AwardBudgetService.class); } else { return KraServiceLocator.getService(ProposalBudgetService.class); } }