title: Creating managed RealmList outside RealmObject
body: <p>In my app, I have a method that accepts an <code>ArrayList</code> of ID's and returns a <code>RealmList</code> of Machines belonging to these IDs.</p>
  
  <pre><code>public RealmList&lt;Machine&gt; getMachinesById(ArrayList&lt;Long&gt; machineIds) {
      RealmList&lt;Machine&gt; machines = new RealmList&lt;Machine&gt;();
      for (int i = 0; i &lt; machineIds.size(); i++){
          Machine m = getMachineById(machineIds.get(i));
          if (m != null) {
              machines.add(m);
          }
      }
      return machines;
  }
  </code></pre>
  
  <p><em>The <code>getMachineById()</code> function just finds the correct machine for a specific id.</em></p>
  
  <p>I want to filter this output some more, however, when I try to get the <code>RealmQuery</code> by doing <code>.where()</code>, I get an Exception telling me I should put this <code>RealmList</code> in 'managed mode'. </p>
  
  <pre><code>Caused by: io.realm.exceptions.RealmException: This method is only available in managed mode
                                                   at io.realm.RealmList.where(RealmList.java:425)
  </code></pre>
  
  <p>I'm aware that I get this error because this list is standalone, and not managed by Realm.</p>
  
  <p>It is probably important to add that this function will be called quite a lot, since it is triggered every time some list in my app refreshes. This would mean that (if possible) every time I'm creating a new managed RealmList.</p>
  
  <p>My questions:</p>
  
  <ul>
  <li>Is there any way to let this RealmList be managed by Realm?</li>
  <li>If this is possible, is it a problem that this function is being called pretty often</li>
  <li>Is there any other (preferred) way to achieve this (List of IDs > RealmResults/RealmQuery)</li>
  </ul>