You should use Object Oriented approach to create entities. Create a class representing your excel data row, lets say called Records and then put the objects of this class in a Hashmap against username as key. Here is sample class :
public class Record {
private String methodName;
private String statusCode;
private String user;
private String password;
public String getMethodName() {
return methodName;
}
public void setMethodName(String methodName) {
this.methodName = methodName;
}
public String getStatusCode() {
return statusCode;
}
public void setStatusCode(String statusCode) {
this.statusCode = statusCode;
}
public String getUser() {
return user;
}
public void setUser(String user) {
this.user = user;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
Define a collection to store the records as
Map<String, Record> recordsMap = new <String, Record>HashMap();
Read the excel file, create a record for each row and save in this collection. It should be easy and quick to retrieve the records from the map.