code: public final synchronized List<TrialBalanceLine> retrieveBalanceLinesForStore(
        final String pQuery) throws Exception {
      List<TrialBalanceLine> result = new ArrayList<TrialBalanceLine>();
      IRecordSet<RS> recordSet = null;
      try {
        recordSet = getSrvDatabase().retrieveRecords(pQuery);
        if (recordSet.moveToFirst()) {
          do {
            String accName = recordSet.getString("ITSNAME");
            String accId = recordSet.getString("ACCID");
            Long subaccId = recordSet.getLong("SUBACCID");
            Integer subaccType = recordSet.getInteger("SUBACCTYPE");
            String accNumber = recordSet.getString("ITSNUMBER");
            String subaccName = recordSet.getString("SUBACC");
            Double debit = recordSet.getDouble("DEBIT");
            Double credit = recordSet.getDouble("CREDIT");
            TrialBalanceLine tbl = new TrialBalanceLine();
            tbl.setAccId(accId);
            tbl.setSubaccId(subaccId);
            tbl.setSubaccType(subaccType);
            tbl.setAccName(accName);
            tbl.setAccNumber(accNumber);
            tbl.setSubaccName(subaccName);
            tbl.setDebit(BigDecimal.valueOf(debit));
            tbl.setCredit(BigDecimal.valueOf(credit));
            result.add(tbl);
          } while (recordSet.moveToNext());
        }
      } finally {
        if (recordSet != null) {
          recordSet.close();
        }
      }
      return result;
    }
docs: <p>Retrieve Trial Balance lines with given query for store.</p>
  @param pQuery date
  @return balance lines
  @throws Exception - an exception