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

old unused code removed

parent c25b6ea3
No related branches found
No related tags found
1 merge request!899Resolve "MINERVANET - Error Report 105"
Pipeline #13107 passed
......@@ -26,16 +26,6 @@ public class LayoutDao extends BaseDao<Layout> {
return layouts;
}
public long getCountByUser(User user) {
CriteriaBuilder builder = getSession().getCriteriaBuilder();
CriteriaQuery<Long> criteria = builder.createQuery(Long.class);
Root<Layout> root = criteria.from(Layout.class);
criteria.where(builder.equal(root.get("creator"), user));
criteria.select(builder.count(root));
return getSession().createQuery(criteria).getSingleResult();
}
public Layout getLayoutByName(Project project, String name) {
List<Layout> layouts = getElementsByParameter("project_id", project.getId());
for (Layout layout : layouts) {
......
......@@ -94,7 +94,6 @@ public class LayoutDaoTest extends PersistTestFunctions {
projectDao.add(project);
assertEquals(0, layoutDao.getCountByUser(user));
assertEquals(0, layoutDao.getLayoutsByProject(project).size());
assertNull(layoutDao.getLayoutByName(project, tempName));
......@@ -113,7 +112,6 @@ public class LayoutDaoTest extends PersistTestFunctions {
assertEquals(1, layoutDao.getLayoutsByProject(project).size());
assertNotNull(layoutDao.getLayoutByName(project, tempName));
assertEquals(1, layoutDao.getCountByUser(user));
assertNull(layout.getInputData());
......
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