title: How to get the Object Reference having the hashcode or other Unique String in Java
body: <p>this is my issue. Im storing Data into a database table which has a column where i store the hashcode (or can be some other Unique String such as an ID because the JVM can re-locate the objects, changing the hashcode). But once i get that String i want to access to the object mapped to that String. I can do it with HashMap like:</p>
  
  <p><code>ConcurrentHashMap&lt;String, MyClass&gt; MyClassDictionary;</code></p>
  
  <p>The average of objects to store would be like +800. I can take other options to avoid this kind of things but i really want to know if some of you know a better way than using HashMap.</p>
  
  <p>I found something about a Referenceable Interface that i could implement, you can check it out in the next link:
  <a href="http://docs.oracle.com/javase/jndi/tutorial/objects/storing/reference.html" rel="nofollow">http://docs.oracle.com/javase/jndi/tutorial/objects/storing/reference.html</a></p>
  
  <p>Thanks for reading.</p>