예제 #1
0
 @SuppressWarnings("unchecked")
 public static DivisionContainer getDivisionSearch(
     DivisionContainer divisionContainer,
     Division division,
     int offset,
     DivisionPagingButtonBar paging) {
   try {
     if (divisionContainer == null) {
       divisionContainer = new DivisionContainer();
     }
     divisionContainer.removeAllItems();
     LoadFilteredFacade loadFilteredFacade = new LoadFilteredFacade(paging.context);
     Object result[] =
         loadFilteredFacade.loadFilteredDivisionSearch(division, offset, paging.LIMIT);
     paging.numberOfPages = ((Integer) result[0]).intValue();
     Set<Division> divisionSet = (Set<Division>) result[1];
     paging.SIZE = ((Long) result[2]).longValue();
     if (divisionSet != null) divisionContainer.addAll(divisionSet);
   } catch (InstantiationException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   } catch (IllegalAccessException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   } catch (Exception e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
   return divisionContainer;
 }
예제 #2
0
  @SuppressWarnings("unchecked")
  public static DivisionContainer getDivision(
      DivisionContainer divisionContainer, int offset, DivisionPagingButtonBar paging) {
    try {
      if (divisionContainer == null) {
        divisionContainer = new DivisionContainer();
      }
      divisionContainer.removeAllItems();
      LoadAllFacade facade = new LoadAllFacade(paging.context);

      Object result[] = facade.loadAllDivision(offset, paging.LIMIT);
      paging.numberOfPages = ((Integer) result[0]).intValue();
      Set<Division> divisionSet = (Set<Division>) result[1];
      paging.SIZE = ((Long) result[2]).longValue();
      divisionContainer.addAll(divisionSet);
    } catch (Exception e) {
      e.printStackTrace();
    }
    return divisionContainer;
  }