title: Backendless: I can not access retrieved data
body: <p>Using the Android project <a href="https://github.com/Backendless/RestaurantToGo" rel="nofollow">here</a>, <code>RestaurantListActivity</code> shows a list of retrieved <code>Restaurants</code> from <code>Restaurant</code> table in Backendless and there is no problem so far.</p>
  
  <p><strong>The problem:</strong>
  I have been trying these two days to retrieve the list of restaurants somewhere else in the code, or use the <code>totalRestaurants</code> list.</p>
  
  <p><strong>I tried:</strong></p>
  
  <p>1- This code causes NullPointerException:</p>
  
  <pre><code>Backendless.Data.of( Restaurant.class ).findFirst();
  </code></pre>
  
  <p>2- using the same code in Github: I can access <code>totalRestaurants</code> list inside brackets, but after this block of code it shows me that <code>totalRestaurants</code> list is empty.</p>
  
  <pre><code>Backendless.Data.of( Restaurant.class ).find( query, new LoadingCallback&lt;BackendlessCollection&lt;Restaurant&gt;&gt;( this, getString( R.string.loading_restaurants ), true )
      {
        @Override
        public void handleResponse( BackendlessCollection&lt;Restaurant&gt; restaurantsBackendlessCollection )
        {
          restaurants = restaurantsBackendlessCollection;
  
          addMoreItems( restaurantsBackendlessCollection );
  
          super.handleResponse( restaurantsBackendlessCollection );
        }
      } );
  </code></pre>
  
  <p>3- Using auto load approach in the Backendless site with slight edits: the same thing happens again. Inside the callback I can print the name of <code>Restaurant</code>'s object and I add each object to <code>copylist</code>, but at the end of the code <code>copylist</code>is empty!</p>
  
  <pre><code>LoadingCallback&lt;BackendlessCollection&lt;Restaurant&gt;&gt; callback=new LoadingCallback&lt;BackendlessCollection&lt;Restaurant&gt;&gt;(this, getString( R.string.loading_restaurants ), true)
        {
            @Override
            public void handleResponse( BackendlessCollection&lt;Restaurant&gt; restaurants )
            {
                System.out.println( "Loaded " + restaurants.getCurrentPage().size() + " restaurant objects" );
                System.out.println( "Total restaurants in the Backendless storage - " + restaurants.getTotalObjects() );
  
                Iterator&lt;Restaurant&gt; iterator=restaurants.getCurrentPage().iterator();
  
                while( iterator.hasNext() )
                {
                    Restaurant restaurant=iterator.next();
                    copylist.add(restaurant);
                    System.out.println( "\nRestaurant name = " + restaurant.getName() );
                }
            }
        };
        Backendless.Data.of( Restaurant.class ).find( callback );
  </code></pre>
  
  <p>Your help is much appreciated!</p>