insert elements in the collection based on multiple keys : <p>I Have a query result with many fields, and i have to insert only unique rows in the collection based on the 3 columns of the table using java code.</p>

<p>Suppose query result is like below :</p>

<p>Col A | Col B | Col C | Col D| Col E</p>

<p>1 | 2 | 1 | V1 | A</p>

<p>1 | 2 | 1 | V2 | A</p>

<p>2  | 1 | 1 | V3 | B</p>

<p>3 | 2 | 2 | V4 | C</p>

<p>2 | 1 | 1 | V5 | B</p>

<p>Here for row 1 and 2 are duplicate as per combination of col A + Col B + Col C
and row 3 and row 5 are also duplicate.</p>

<p>So i have to insert only unique values in the collection based on col A,col B and Col C</p>

<p>Result :Row 1,3,4 should be interested in the collection rest shouldn't.
Please suggest me solution. </p>
