How mapper colum value to another entity colum

i have two table
public class user {
   // maybe need mapper?
    Date lastLoginTime;
public class accessRecord {
   String username;
   Date loginTime;
   String os;
   String ip;

How can I get the all user's last login time ?
i tried to get all users in frontend ,then get last accessRecord by username per user ,but thats not good and failed also

It seems to me (correct me if I am wrong) that you have no idea how to use Hibernate. So before asking a question, you should first start learning how to work with Hibernate and get back if you still have questions once you learned how to do basic queries.