comparison artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java @ 186:15c7638511dc

Added an interface for CollectionItems and renamed the CollectionItem class from the artifact-database package to DefaultCollectionItem - because this is the default implementation of the interface. artifacts/trunk@1416 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 07 Mar 2011 15:13:36 +0000
parents a22b7e367b25
children a85d889a1b0d
comparison
equal deleted inserted replaced
185:afd5945ff8d1 186:15c7638511dc
10 import de.intevation.artifacts.Artifact; 10 import de.intevation.artifacts.Artifact;
11 import de.intevation.artifacts.ArtifactCollection; 11 import de.intevation.artifacts.ArtifactCollection;
12 import de.intevation.artifacts.ArtifactCollectionFactory; 12 import de.intevation.artifacts.ArtifactCollectionFactory;
13 import de.intevation.artifacts.ArtifactFactory; 13 import de.intevation.artifacts.ArtifactFactory;
14 import de.intevation.artifacts.ArtifactSerializer; 14 import de.intevation.artifacts.ArtifactSerializer;
15 import de.intevation.artifacts.CollectionItem;
15 import de.intevation.artifacts.User; 16 import de.intevation.artifacts.User;
16 import de.intevation.artifacts.UserFactory; 17 import de.intevation.artifacts.UserFactory;
17 18
18 import de.intevation.artifacts.common.utils.XMLUtils; 19 import de.intevation.artifacts.common.utils.XMLUtils;
19 20
1355 public boolean doIt() throws SQLException { 1356 public boolean doIt() throws SQLException {
1356 prepareStatement(SQL_COLLECTION_ITEMS_LIST_GID); 1357 prepareStatement(SQL_COLLECTION_ITEMS_LIST_GID);
1357 stmnt.setString(1, collectionId); 1358 stmnt.setString(1, collectionId);
1358 result = stmnt.executeQuery(); 1359 result = stmnt.executeQuery();
1359 while (result.next()) { 1360 while (result.next()) {
1360 CollectionItem item = new CollectionItem( 1361 CollectionItem item = new DefaultCollectionItem(
1361 result.getString(1), 1362 result.getString(1),
1362 result.getBytes(2)); 1363 result.getBytes(2));
1363 collectionItems.add(item); 1364 collectionItems.add(item);
1364 } 1365 }
1365 return true; 1366 return true;

http://dive4elements.wald.intevation.org