コード例 #1
0
  @Override
  protected Collection<Region> retrieveJDOObjects(
      Set<RegionID> objectIDs, String[] fetchGroups, int maxFetchDepth, ProgressMonitor monitor)
      throws Exception {
    monitor.beginTask("Loading Regions", 100);
    try {
      GeographyManagerRemote gm = geographyManager;
      if (gm == null) gm = getEjbProvider().getRemoteBean(GeographyManagerRemote.class);

      monitor.worked(50);
      Collection<Region> regions = gm.getRegions(objectIDs, fetchGroups, maxFetchDepth);
      monitor.worked(50);
      return regions;
    } catch (Exception x) {
      throw new RuntimeException(x);
    } finally {
      monitor.done();
    }
  }