title: How would I order an array in a specific order? Java
body: <p>I have input that is sent to my db query:</p>
  
  <pre><code>[25,1381,34, ...]
  </code></pre>
  
  <p>My data is then returned from the query, but the db has changed the order of what is returned.</p>
  
  <pre><code>[{
      id: 1381,
      name: 'Test'
  }, {
      id: 25,
      name: 'Another test'
  }, {
      id: 34,
      name: 'One last test'
  }, 
  ...]
  </code></pre>
  
  <p>I want to reorder the data and return to the caller in the order that the id's were sent in.  ie:</p>
  
  <pre><code>[{
      id: 25,
      name: 'Another test'
  }, {
      id: 1381,
      name: 'Test'
  }, {
      id: 34,
      name: 'One last test'
  }, 
  ...]
  </code></pre>
  
  <p>What would be a performant way to reorder the data into the original order?  </p>