SQLExecutor con = null; SQLStatementObject pstmt = null; NewFundTrackingWrapper…
- User
SQLExecutor con = null; SQLStatementObject pstmt = null; NewFundTrackingWrapper newFundTrackingWrapper = null; List newFundTrackingWrapperList = new ArrayList<>(); NewFundTrackingEntityKey key = (NewFundTrackingEntityKey) argKey; SQLResultObject rs = null;
if (out == null) { out = LogWriter.getInstance(NEW_FUND_HELPER, "getNewFundTrackingDetails"); } out.println("NewFundTrackingHelper - getNewFundTrackingDetails start"); try { con = SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION); if(key.fetchForUpdate) { pstmt = con.getStatementObject(SELECT_SQL, true, false); } else { pstmt=con.getStatementObject(SELECT_SQL, false, false); } pstmt.setString(1,key.relationshipNo); rs = pstmt.executeQuery(); while(rs.next()) { newFundTrackingWrapper = new NewFundTrackingWrapper(); newFundTrackingWrapper.relationshipNo = rs.getString(1); newFundTrackingWrapper.transactionDate = rs.getDate(2); newFundTrackingWrapper.transactionBranch = rs.getString(3); newFundTrackingWrapper.channelID = rs.getString(4); newFundTrackingWrapper.batchNo = rs.getString(5); newFundTrackingWrapper.seqNo = rs.getString(6); newFundTrackingWrapper.currencyCode = rs.getString(7); newFundTrackingWrapper.accountNo = rs.getString(8); newFundTrackingWrapper.creditdebit = Utility.getChar(rs.getString(9)); newFundTrackingWrapper.trnCode = rs.getString(10); newFundTrackingWrapper.newFundIn = rs.getBigDecimal(11); newFundTrackingWrapper.newFundUtilized = rs.getBigDecimal(12); newFundTrackingWrapper.makerDetail = new UserDetail(); newFundTrackingWrapper.makerDetail.setUserDate(rs.getDate(13)); newFundTrackingWrapper.makerDetail.setUserTime(rs.getTime(14)); newFundTrackingWrapper.makerDetail.setUserID(rs.getString(15)); newFundTrackingWrapper.makerDetail.setUserBranch(rs.getString(16)); newFundTrackingWrapper.makerDetail.setUserIPAddress(rs.getString(17)); newFundTrackingWrapper.checkerDetail = new UserDetail(); newFundTrackingWrapper.checkerDetail.setUserDate(rs.getDate(18)); newFundTrackingWrapper.checkerDetail.setUserTime(rs.getTime(19)); newFundTrackingWrapper.checkerDetail.setUserID(rs.getString(20)); newFundTrackingWrapper.checkerDetail.setUserBranch(rs.getString(21)); newFundTrackingWrapper.checkerDetail.setUserIPAddress(rs.getString(22)); //ADO-3594456 - Start newFundTrackingWrapper.newFundDate = rs.getDate(23); newFundTrackingWrapper.processFlag = Utility.getChar(rs.getString(24)); //ADO-3594456 - End newFundTrackingWrapperList.add(newFundTrackingWrapper); } } catch(SQLExecuteException e) { scb.util.LogWriter.getInstance().printErrorMessage(e); throw new javax.ejb.FinderException(e.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + e.getMessage()); } catch(javax.naming.NamingException e) { scb.util.LogWriter.getInstance().printErrorMessage(e); throw new javax.ejb.FinderException(scb.util.EBBSConstants.NAMING_EXCEPTION); - Assistant
- User
- Assistant
- User
Calls getNewFundDetails using profileId to obtain a nested map, newFundInAndDayWiseTotalNewFundsSumMap, holding detailed fund information. how will an example data look
- Assistant
In this context, the method
getNewFundDetailsis expected to return a nested map representing detailed fund information organized in some hierarchical structure. To illustrate what this data structure might look like, let's consider a hypothetical example:Nested Map Structure
The
newFundInAndDayWiseTotalNewFundsSumMapcould potentially follow a structure like this:- Key Level 1 (Outer Map): Currency code (e.g., "USD", "EUR").
- User
newFundInAndDayWiseTotalNewFundsSumMap.put("TOTAL_NEWFUND", newFundInSum); //newFundIN Sum newFundInAndDayWiseTotalNewFundsSumMap.put("TOTAL_AVAILABLE_NEWFUND", total_Available_Newfund_dayWise); what does this do??
- Assistant
In the context of the code you provided, these lines are adding additional entries to the
newFundInAndDayWiseTotalNewFundsSumMapto store aggregate information about new funds. Let's break down what each line is doing: - User
how ill the data look
- Assistant
- User
newFundInAndDayWiseTotalNewFundsSumMap.put("TOTAL_NEWFUND", newFundInSum) just tell me what it will do
- Assistant
The line
newFundInAndDayWiseTotalNewFundsSumMap.put("TOTAL_NEWFUND", newFundInSum);is adding an entry to thenewFundInAndDayWiseTotalNewFundsSumMapwith a specific purpose. Here's a breakdown of what it does:Key Actions
-
Adds a Special Entry:
- The line creates or updates an entry in
newFundInAndDayWiseTotalNewFundsSumMapwhere the key is the string"TOTAL_NEWFUND".
- The line creates or updates an entry in
-
Stores Aggregate Data:
- The
newFundInSumvariable, which is the value associated with this key, is expected to be a .
- The
-
- User
// CurrencyCode not availble in 'NFTRCKG' table,but its under new fund if(!totalAvailableBalanceMap.isEmpty() && !newFundCurrencyCodeIterationSet.isEmpty()) { for(Entry<String, BigDecimal> entry : totalAvailableBalanceMap.entrySet()) { log.println("newFundCurrencyCodeIterationSet//entry.getKey="+newFundCurrencyCodeIterationSet+"//"+entry.getKey()); if(!newFundCurrencyCodeIterationSet.contains(entry.getKey())) { NewFundBalanceDetailWrapper newFundBalanceDetailWrapper = new NewFundBalanceDetailWrapper(); newFundBalanceDetailWrapper.setCasaCurrencyCode(entry.getKey()); newFundBalanceDetailWrapper.setTotalAvailableBalance(entry.getValue()); newFundBalanceDetailWrapper.setTotalAvailableNewFund(BigDecimal.ZERO); //Assigning default value newFundBalanceDetailWrapper.setTotalNewFund(BigDecimal.ZERO); //Assigning default value newFundBalanceDetailWrapperList.add(newFundBalanceDetailWrapper); } } log.println("CurrencyCode not availble in 'NFTRCKG' table,but its under new fund" +"newFundBalanceDetailWrapperList size="+newFundBalanceDetailWrapperList.size()); } } else {
- Assistant