@NonNull public static <T>Set<PersistentResource<T>> loadRecords(Class<T> loadClass,RequestScope requestScope){
  DataStoreTransaction tx=requestScope.getTransaction();
  if (shouldSkipCollection(loadClass,ReadPermission.class,requestScope)) {
    return Collections.emptySet();
  }
  Iterable<T> list;
  FilterScope filterScope=new FilterScope(requestScope,loadClass);
  list=tx.loadObjects(loadClass,filterScope);
  Set<PersistentResource<T>> resources=new PersistentResourceSet(list,requestScope);
  resources=filter(ReadPermission.class,resources);
  for (  PersistentResource<T> resource : resources) {
    requestScope.queueCommitTrigger(resource);
  }
  return resources;
}

@ NonNull public static < T > Set < PersistentResource < T > > loadRecords ( Class < T > loadClass , RequestScope requestScope ) { DataStoreTransaction tx = requestScope . getTransaction ( ) ; if ( shouldSkipCollection ( loadClass , ReadPermission . class , requestScope ) ) { return Collections . emptySet ( ) ; } Iterable < T > list ; FilterScope filterScope = new FilterScope ( requestScope , loadClass ) ; list = tx . loadObjects ( loadClass , filterScope ) ; Set < PersistentResource < T > > resources = new PersistentResourceSet ( list , requestScope ) ; resources = filter ( ReadPermission . class , resources ) ; for ( PersistentResource < T > resource : resources ) { requestScope . queueCommitTrigger ( resource ) ; } return resources ; }
load a collection from the datastore .
