How to retrieve class instance using one attribute
<p>I have a class Item, with each item there is a unique identifier which is associated with it. Is it feasible to retrieve the entire Item instance based on the unique identifier. That is, I want to use the unique identifier as the key.</p>

<pre><code> class Item{
     int id;
     String name;
     Date d;
 }
</code></pre>

<p>Now based on id, I want to retrieve its name and date. Is there some way to do so?</p>

<p>First I store the class instance..using a constructor, now based on some previously stored instance, given id. I want to retrieve the entire instance</p>
