question: public EgDemandDetails insertAdvanceCollection ( final String demandReason , final BigDecimal advanceCollectionAmount , final Installment installment ) { EgDemandDetails demandDetail = null ; if ( advanceCollectionAmount != null && advanceCollectionAmount . compareTo ( BigDecimal . ZERO ) > 0 ) { final EgDemandReasonMaster egDemandReasonMaster = demandGenericDAO . getDemandReasonMasterByCode ( demandReason , module ( ) ) ; if ( egDemandReasonMaster == null ) throw new ApplicationRuntimeException ( " Advance Demand reason Master is null in method  insertAdvanceCollection" ) ; final EgDemandReason egDemandReason = demandGenericDAO . getDmdReasonByDmdReasonMsterInstallAndMod ( egDemandReasonMaster , installment , module ( ) ) ; if ( egDemandReason == null ) throw new ApplicationRuntimeException ( " Advance Demand reason is null in method  insertAdvanceCollection " ) ; demandDetail = createDemandDetails ( egDemandReason , advanceCollectionAmount , BigDecimal . ZERO ) ; } return demandDetail ; }
target:  Method used to insert advance collection in EgDemandDetail table.