henryleacock

Untitled

Dec 12th, 2011
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.60 KB | None | 0 0
  1. public void serveRequest(AbstractBusinessLogicHandler.InputWrapper inWrapper, AbstractBusinessLogicHandler.OutputWrapper outWrapper, AbstractBusinessLogicHandler.ValidateInputResult vir) throws ApplicationException
  2.    {  
  3.       try
  4.       {  
  5.          InputWrapper  inputWrapper  = (InputWrapper)  inWrapper;
  6.          OutputWrapper outputWrapper = (OutputWrapper) outWrapper;
  7.  
  8.          DateTime startDate = (DateTime) date.clone();
  9.          DateTimeUtils.setTimeToStartOfDay(startDate);
  10.  
  11.          DateTime endDate = (DateTime) date.clone();
  12.          DateTimeUtils.setTimeToEndOfDay(endDate);
  13.  
  14.          VoucherDAO voucherDAO = getDAO(VoucherDAO.class);
  15.          VoucherQBEEntity voucherQBE = new VoucherQBEEntity();
  16. //????????????????????????????????????????????????????????????????????????????????????????????????????????????
  17.          Voucher voucher = voucherQBE.fieldCreateDate().setBetween(startDate, endDate);
  18.  
  19.          LinkedList<Voucher> voucherList = voucherDAO.queryByExample(voucher);  
  20. //????????????????????????????????????????????????????????????????????????????????????????????????????????????
  21.          ///////////////////////////////////////////////////
  22.          // extract unique deal ids from list of vouchers //
  23.          ///////////////////////////////////////////////////
  24.          Set<Integer> uniqueDealIds = new Set<Integer>();
  25.          for(Voucher voucher : voucherList)
  26.          {  
  27.             uniqueDealIds.add(voucher.getDealId());
  28.          }  
  29.  
  30.       }  
  31.       catch(Exception e)
  32.       {  
  33.          throw(new ApplicationException("Error in BLH.", e));
  34.       }  
  35.    }
Add Comment
Please, Sign In to add comment