Ejemplo n.º 1
0
 @SuppressWarnings("unchecked")
 public static DivisionContainer getDivisionByPeriod(
     DivisionContainer divisionContainer,
     Division division,
     int period,
     int offset,
     int limit,
     WebApplicationContext context) {
   try {
     if (divisionContainer == null) {
       divisionContainer = new DivisionContainer();
     }
     divisionContainer.removeAllItems();
     LoadFilteredFacade loadFilteredFacade = new LoadFilteredFacade(context);
     Object result[] =
         loadFilteredFacade.loadFilteredDivisionByPeriod(division, period, offset, limit);
     Set<Division> divisionSet = null;
     if (result != null && result.length > 0) {
       divisionSet = (Set<Division>) result[1];
       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;
 }
Ejemplo n.º 2
0
 @SuppressWarnings("unchecked")
 public static DivisionContainer getDivision(
     DivisionContainer divisionContainer,
     Division division,
     int offset,
     int limit,
     WebApplicationContext context) {
   try {
     if (divisionContainer == null) {
       divisionContainer = new DivisionContainer();
     }
     divisionContainer.removeAllItems();
     LoadFilteredFacade loadFilteredFacade = new LoadFilteredFacade(context);
     Object result[] = loadFilteredFacade.loadFilteredDivision(division, offset, limit);
     // paging.numberOfPages = ((Integer) result[0]).intValue();
     Set<Division> divisionSet = (Set<Division>) result[1];
     // paging.SIZE = ((Long) result[2]).longValue();
     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;
 }
Ejemplo n.º 3
0
  @SuppressWarnings("unchecked")
  public static DivisionContainer getDivision(
      DivisionContainer divisionContainer, int offset, int limit, WebApplicationContext context) {
    try {
      if (divisionContainer == null) {
        divisionContainer = new DivisionContainer();
      }
      divisionContainer.removeAllItems();
      LoadAllFacade facade = new LoadAllFacade(context);

      Object result[] = facade.loadAllDivision(offset, 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;
  }