Last active
August 14, 2018 07:25
-
-
Save jeetprksh/05f1e72c96b9fcd521cc4b32b1a00973 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Repository | |
public class UserDaoImpl implements UserDao { | |
@Autowired | |
private SessionFactory sessionFactory; | |
@Override | |
public UserDTO getUser(Long userId) { | |
TypedQuery<UserDTO> typedQuery = sessionFactory.getCurrentSession().createQuery("from UserDTO where id=" + userId.toString()); | |
return typedQuery.getSingleResult(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment