Skip to content
Snippets Groups Projects
Commit 8eee25d6 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

unused methods removed

parent 76067dc4
No related branches found
No related tags found
1 merge request!346Resolve "LDAP authentication"
......@@ -69,24 +69,4 @@ public class UserDao extends BaseDao<User> {
object.setLogin("[REMOVED]_" + object.getId() + "_" + object.getLogin());
update(object);
}
/**
* Returns {@link User} for given "name surname" string.
*
* @param nameSurnameString
* string identifing user with name and surname separated by single
* space
* @return {@link User} for given "name surname" string
*/
public User getUserByNameSurname(String nameSurnameString) {
List<?> list = getSession().createQuery(" from " + this.getClazz().getSimpleName()
+ " where concat(name, ' ', surname) " + " = :param_val " + removableAndStatemant())
.setParameter("param_val", nameSurnameString).list();
if (list.size() == 0) {
return null;
} else {
return (User) list.get(0);
}
}
}
......@@ -165,27 +165,6 @@ public class UserDaoTest extends PersistTestFunctions {
}
}
@Test
public void testGetUserByNameSurname() throws Exception {
try {
User user = new User();
user.setCryptedPassword(passwordEncoder.encode(testPasswd));
user.setLogin(testLogin);
user.setEmail(testEmail);
user.setName(testName);
user.setSurname(testSurname);
userDao.add(user);
User user2 = userDao.getUserByNameSurname(testName + " " + testSurname);
assertNotNull(user2);
user2 = userDao.getUserByNameSurname(testName + " " + testSurname);
assertNull(user2);
userDao.delete(user);
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
@Test
public void testGetAll() throws Exception {
try {
......
......@@ -330,11 +330,6 @@ public class UserService implements IUserService {
return passwordEncoder.encode(password);
}
@Override
public User getUserByNameSurname(String nameSurnameString) {
return userDao.getUserByNameSurname(nameSurnameString);
}
@Override
public ColorExtractor getColorExtractorForUser(User loggedUser) {
Color colorMin = null;
......
......@@ -156,16 +156,6 @@ public interface IUserService {
*/
String encodePassword(String password);
/**
* Returns {@link User} for given "name surname" string.
*
* @param nameSurnameString
* string identifying user with name and surname separated by single
* space
* @return {@link User} for given "name surname" string
*/
User getUserByNameSurname(String nameSurnameString);
/**
* Returns {@link ColorExtractor} that transform overlay values into colors for
* given user.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment