Commit 958e9a3e authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Removed unused code

parent 2b002860
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -140,25 +140,6 @@ public class NodeDAO {
        return Optional.of(node);
    }

    public List<String> listNodeChildren(String path) {

        String sql = "SELECT n.name\n"
                + "FROM node n\n"
                + "WHERE n.path ~ ('*.' || id_from_vos_path(?) || '.*{1}')::lquery\n"
                + "ORDER BY n.path";

        List<String> childrenNames = jdbcTemplate.query(conn -> {
            PreparedStatement ps = conn.prepareStatement(sql);
            int i = 0;
            ps.setString(++i, path);
            return ps;
        }, (row, index) -> {
            return row.getString("name");
        });

        return childrenNames;
    }

    public Node setNode(Node newNode) {
        return setNode(newNode, false);
    }
+16 −26
Original line number Diff line number Diff line
@@ -100,16 +100,6 @@ public class NodeDAOTest {
        assertEquals(bTime, NodeProperties.getNodePropertyByURI(root.getNodes().get(0), NodeProperties.DATE_URI));
    }

    @Test
    public void testListNodeChildren() {
        assertTrue(dao.listNodeChildren("/test4").isEmpty());
        List<String> children = dao.listNodeChildren("/test2");
        assertFalse(children.isEmpty());
        assertTrue(children.size() == 2);
        assertTrue(children.containsAll(List.of("f4", "f5")));

    }

    @Test
    public void testGetQuotaAndMD5() {