Java collection and MapKey
<p>I am new to java.
I have a database table which have following composite key:</p>

<pre><code>Code
Reference_Number_1 (decimal)
Reference_Number_2 (decimal)
Time
</code></pre>

<p>Above keys make each row a unique row  - no dupliactes. 
I need to create a class to load this table to a java collection and create a static method which will take above four arguments as key and return the entity from java collection.</p>

<p>I am thinking of loading the table into a HashMap but I am not sure how to define the MapKey. Should I convert Reference_Number_1, Reference_Number_2 and Time in to a string and then concatenate these four fields?
Or there is another way/collection to load this table.
Thanks,
Pete</p>
