Loading src/main/java/it/inaf/oats/vospace/persistence/LocationDAO.java +2 −3 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ public class LocationDAO { public Optional<Location> getNodeLocation(String vosPath) { String sql = "SELECT l.location_id, location_type, storage_src_id, storage_dest_id,\n" + "storage_id, storage_type, base_path, base_url, hostname\n" + "storage_id, storage_type, base_path, hostname\n" + "FROM location l\n" + "JOIN storage s ON l.storage_src_id = s.storage_id OR l.storage_dest_id = s.storage_id\n" + "JOIN node n ON n.location_id = l.location_id\n" Loading Loading @@ -85,7 +85,6 @@ public class LocationDAO { storage.setType(StorageType.parse(rs.getString("storage_type"))); storage.setBasePath(rs.getString("base_path")); storage.setBaseUrl(rs.getString("base_url")); storage.setHostname(rs.getString("hostname")); Storage storageSrc = storagesMap.get(rs.getInt("storage_src_id")); Loading src/main/java/it/inaf/oats/vospace/persistence/model/Storage.java +0 −9 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ public class Storage { private int id; private StorageType type; private String basePath; private String baseUrl; private String hostname; public int getId() { Loading @@ -37,14 +36,6 @@ public class Storage { this.basePath = basePath; } public String getBaseUrl() { return baseUrl; } public void setBaseUrl(String baseUrl) { this.baseUrl = baseUrl; } public String getHostname() { return hostname; } Loading src/test/resources/test-data.sql +4 −4 Original line number Diff line number Diff line INSERT INTO linked_service(service_base_url) VALUES ('http://archives.ia2.inaf.it/files/aao'); INSERT INTO storage (storage_type, base_path, base_url, hostname) VALUES ('cold', '/ia2_tape/users', NULL, 'tape-server'); INSERT INTO storage (storage_type, base_path, base_url, hostname) VALUES ('hot', '/mnt/hot_storage/users', NULL, 'server'); INSERT INTO storage (storage_type, base_path, base_url, hostname) VALUES ('local', '/home', NULL, 'localhost'); INSERT INTO storage (storage_type, base_path, base_url, hostname) VALUES ('local', '/home/vospace/upload', NULL, 'localhost'); INSERT INTO storage (storage_type, base_path, hostname) VALUES ('cold', '/ia2_tape/users', 'tape-server'); INSERT INTO storage (storage_type, base_path, hostname) VALUES ('hot', '/mnt/hot_storage/users', 'server'); INSERT INTO storage (storage_type, base_path, hostname) VALUES ('local', '/home', 'localhost'); INSERT INTO storage (storage_type, base_path, hostname) VALUES ('local', '/home/vospace/upload', 'localhost'); INSERT INTO location (location_type, storage_src_id, storage_dest_id) VALUES ('async', 1, 3); INSERT INTO location (location_type, storage_src_id, storage_dest_id) VALUES ('async', 2, 3); Loading Loading
src/main/java/it/inaf/oats/vospace/persistence/LocationDAO.java +2 −3 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ public class LocationDAO { public Optional<Location> getNodeLocation(String vosPath) { String sql = "SELECT l.location_id, location_type, storage_src_id, storage_dest_id,\n" + "storage_id, storage_type, base_path, base_url, hostname\n" + "storage_id, storage_type, base_path, hostname\n" + "FROM location l\n" + "JOIN storage s ON l.storage_src_id = s.storage_id OR l.storage_dest_id = s.storage_id\n" + "JOIN node n ON n.location_id = l.location_id\n" Loading Loading @@ -85,7 +85,6 @@ public class LocationDAO { storage.setType(StorageType.parse(rs.getString("storage_type"))); storage.setBasePath(rs.getString("base_path")); storage.setBaseUrl(rs.getString("base_url")); storage.setHostname(rs.getString("hostname")); Storage storageSrc = storagesMap.get(rs.getInt("storage_src_id")); Loading
src/main/java/it/inaf/oats/vospace/persistence/model/Storage.java +0 −9 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ public class Storage { private int id; private StorageType type; private String basePath; private String baseUrl; private String hostname; public int getId() { Loading @@ -37,14 +36,6 @@ public class Storage { this.basePath = basePath; } public String getBaseUrl() { return baseUrl; } public void setBaseUrl(String baseUrl) { this.baseUrl = baseUrl; } public String getHostname() { return hostname; } Loading
src/test/resources/test-data.sql +4 −4 Original line number Diff line number Diff line INSERT INTO linked_service(service_base_url) VALUES ('http://archives.ia2.inaf.it/files/aao'); INSERT INTO storage (storage_type, base_path, base_url, hostname) VALUES ('cold', '/ia2_tape/users', NULL, 'tape-server'); INSERT INTO storage (storage_type, base_path, base_url, hostname) VALUES ('hot', '/mnt/hot_storage/users', NULL, 'server'); INSERT INTO storage (storage_type, base_path, base_url, hostname) VALUES ('local', '/home', NULL, 'localhost'); INSERT INTO storage (storage_type, base_path, base_url, hostname) VALUES ('local', '/home/vospace/upload', NULL, 'localhost'); INSERT INTO storage (storage_type, base_path, hostname) VALUES ('cold', '/ia2_tape/users', 'tape-server'); INSERT INTO storage (storage_type, base_path, hostname) VALUES ('hot', '/mnt/hot_storage/users', 'server'); INSERT INTO storage (storage_type, base_path, hostname) VALUES ('local', '/home', 'localhost'); INSERT INTO storage (storage_type, base_path, hostname) VALUES ('local', '/home/vospace/upload', 'localhost'); INSERT INTO location (location_type, storage_src_id, storage_dest_id) VALUES ('async', 1, 3); INSERT INTO location (location_type, storage_src_id, storage_dest_id) VALUES ('async', 2, 3); Loading