public ResourceIdFactory createResourceIdFactory() throws HyracksDataException {
   List<LocalResource> localResources = localResourceRepository.getAllResources();
   long largestResourceId = 0;
   for (LocalResource localResource : localResources) {
     if (largestResourceId < localResource.getResourceId()) {
       largestResourceId = localResource.getResourceId();
     }
   }
   return new ResourceIdFactory(largestResourceId);
 }
 public ResourceIdFactory createResourceIdFactory() throws HyracksDataException {
   long largestResourceId = localResourceRepository.getMaxResourceID();
   return new ResourceIdFactory(largestResourceId);
 }