Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class UserManager implements IUser {
- private IUserDao userDao;
- @Transactional(propagation = Propagation.REQUIRED, readOnly = true, rollbackFor = Exception.class)
- public UserDTO retrieveUserById(Long userId) {
- return userDao.retrieveUserById(userId);
- }
- @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = Exception.class)
- public UserDTO register(final UserDTO user) throws AVValidationException {
- if (user == null) {
- throw new IllegalArgumentException("Wrong params. user cannot be NULL");
- }
- return userDao.register(user);
- }
- public IUserDao getUserDao() {
- return userDao;
- }
- public void setUserDao(final IUserDao userDao) {
- this.userDao = userDao;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement