```
public class Dashboard {
int REQUEST_ID, PRICE, Status;           
String LOGIN_USER;

public int getREQUEST_ID() {
 return REQUEST_ID;
 }

 public void setREQUEST_ID(int rEQUEST_ID) {
  REQUEST_ID = rEQUEST_ID;
 }

  //all getters and setters
  public class MapKey {
  private Integer id;
  private String name;

   public MapKey(Integer id, String name) {
    this.id = id;
    this.name = name;
  }

  @Override Hashcode and equals
public class DBConnection {
 public ArrayList<Dashboard>  getStoreResult() {
   ArrayList<Dashboard> dashRec;

 try{
  Class.forName("");
  Connection con=DriverManager.getConnection("");
  Statement st=con.createStatement();
  ResultSet rs=st.executeQuery("");

  HashMap<Object, List<Dashboard>> map = new HashMap<>();
  HashMap<Integer, Integer> mapStatus = new HashMap<>();
  while (rs.next()) {
    Integer id = rs.getInt(1);
    MapKey key = new MapKey(rs.getInt(1), rs.getString(2));
    if (!map.containsKey(key)) {
        dashRec= new ArrayList<Dashboard>();
        map.put(key, dashRec);
    }
    Dashboard dash = new Dashboard();
    dash.setREQUEST_ID(id);
    dash.setLOGIN_USER(rs.getString(2));
    dash.setPRICE(rs.getInt(3));
    dash.setStatus(rs.getInt(4));/////STATUS
    map.get(id).add(dash);
    if (!mapStatus.containsKey(id) || mapStatus.get(id)>dash.getPROCESSED()){
                mapStatus.put(id, dash.getPROCESSED());
            } 
    }
   }
  }
 }

```

I want to create a new Hashmap with key as req\_id+name+lowest status no of a specific set.Here set refers to number of rows of a particular ReqId. For e.g.:For reqid 123,we have 7rows constituting as a set. The lowest status no is 1.So value key would be 123 A 1.Similarly, for key 456,I need value 456 B 2.So for sample data hashmap must contain 3 keys with 3 values. I want this for n number of Reqid.The value for each key is arraylist which consists of rows of a specific id as objects.The value is defined in the code.

I just want change in the key of the map.

[![SQL DB](https://i.stack.imgur.com/UhgO1.png)](https://i.stack.imgur.com/UhgO1.png)