@Test public void getUserWithOutAuthorities() { UserAuthoritiesDTO user = repo.getUserWithAuthorities("pippo"); assertTrue(user.getUsername().equals("pippo")); assertTrue(user.isEnabled() == true); assertTrue(user.getId() == 2); assertTrue(user.getAuthorities().size() == 0); assertFalse(user.isNew()); }
public UserAuthoritiesDTO getUserWithAuthorities(String username) { return (UserAuthoritiesDTO) queryForObject("getUserWithAuthorities", username); }
UserRepositoryIbatis extends SqlMapClientTemplate implements UserRepository { public UserAuthoritiesDTO getUserWithAuthorities(String username) { return (UserAuthoritiesDTO) queryForObject("getUserWithAuthorities", username); } }
UserRepositoryIbatis extends SqlMapClientTemplate implements UserRepository { public UserAuthoritiesDTO getUserWithAuthorities(String username) { return (UserAuthoritiesDTO) queryForObject("getUserWithAuthorities", username); }  }
UserRepositoryIbatis extends SqlMapClientTemplate implements UserRepository { public UserAuthoritiesDTO getUserWithAuthorities(String username) { return (UserAuthoritiesDTO) queryForObject("getUserWithAuthorities", username); }  UserDTO getUserCredentials(String id); @Autowired @Override void setSqlMapClient(@Qualifier("sqlMapClient") SqlMapClient sqlMapClient); Long insertUser(UserDTO user); Integer updatePassword(UserDTO user); UserAuthoritiesDTO getUserWithAuthorities(String username); UserAuthoritiesDTO getUserWithAuthoritiesByID(Integer sid); UserView getUser(String id); Integer getUsersNumber(); Boolean disableUser(String id); Object getIdUser(String username); @SuppressWarnings("unchecked") List<UserDTOLight> getDisabledUsers(Pager pager); @SuppressWarnings("unchecked") List<UserDTOLight> getEnabledUsers(Pager pager); Boolean save(UserAuthoritiesDTO user); }
UserRepositoryIbatis extends SqlMapClientTemplate implements UserRepository { public UserAuthoritiesDTO getUserWithAuthorities(String username) { return (UserAuthoritiesDTO) queryForObject("getUserWithAuthorities", username); }  UserDTO getUserCredentials(String id); @Autowired @Override void setSqlMapClient(@Qualifier("sqlMapClient") SqlMapClient sqlMapClient); Long insertUser(UserDTO user); Integer updatePassword(UserDTO user); UserAuthoritiesDTO getUserWithAuthorities(String username); UserAuthoritiesDTO getUserWithAuthoritiesByID(Integer sid); UserView getUser(String id); Integer getUsersNumber(); Boolean disableUser(String id); Object getIdUser(String username); @SuppressWarnings("unchecked") List<UserDTOLight> getDisabledUsers(Pager pager); @SuppressWarnings("unchecked") List<UserDTOLight> getEnabledUsers(Pager pager); Boolean save(UserAuthoritiesDTO user);  }