Mercurial > dive4elements > framework
diff artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java @ 317:824051dff018
When loading all artifacts fetch the name of the collections, too.
artifacts/trunk@2453 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 02 Aug 2011 14:05:34 +0000 |
parents | 0ca9b1073ccf |
children | 2ed77f7e1bab |
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java Tue Aug 02 13:10:56 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java Tue Aug 02 14:05:34 2011 +0000 @@ -1760,16 +1760,19 @@ prepareStatement(SQL_ALL_ARTIFACTS); result = stmnt.executeQuery(); while (result.next()) { - String userId = result.getString(1); - String collectionId = result.getString(2); - String artifactId = result.getString(3); - String factoryName = result.getString(4); + String userId = result.getString(1); + String collectionId = result.getString(2); + String artifactId = result.getString(3); + String collectionName = result.getString(4); + String factoryName = result.getString(5); Artifact artifact = alreadyLoaded.get(artifactId); if (artifact != null) { alc.artifactLoaded( - userId, collectionId, artifactId, artifact); + userId, + collectionId, collectionName, + artifactId, artifact); continue; } @@ -1781,13 +1784,15 @@ continue; } - byte [] bytes = result.getBytes(5); + byte [] bytes = result.getBytes(6); artifact = factory.getSerializer().fromBytes(bytes); if (artifact != null) { alc.artifactLoaded( - userId, collectionId, artifactId, artifact); + userId, + collectionId, collectionName, + artifactId, artifact); } alreadyLoaded.put(artifactId, artifact);