(Claudia Juergen)

SF patch #1556316  for SF bugs #1552807, #1333269 and general deletion of Collection


git-svn-id: http://scm.dspace.org/svn/repo/trunk@1607 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Claudia Juergen
2006-09-12 08:25:55 +00:00
parent 3e9ab3ccbd
commit a32b3027d9
2 changed files with 24 additions and 2 deletions

View File

@@ -44,6 +44,7 @@
- SF patch #1490980 Fix for SF bugs #1456311, #1221954 Communities and Collections without name
- included some missing i18n tags
- SF patch #1490891 Submission Step 1 not authorized note and navigation back
- SF patch #1556316 for SF bugs #1552807, #1333269 and general deletion of Collection
(Richard Jones)
- SF bug #1515075. minor build file fix to copy correct config file

View File

@@ -303,7 +303,7 @@ public class Collection extends DSpaceObject
}
/**
* Get all the items in this collection. The order is indeterminate.
* Get the in_archive items in this collection. The order is indeterminate.
*
* @return an iterator over the items in the collection.
* @throws SQLException
@@ -322,6 +322,24 @@ public class Collection extends DSpaceObject
}
/**
* Get all the items in this collection. The order is indeterminate.
*
* @return an iterator over the items in the collection.
* @throws SQLException
*/
public ItemIterator getAllItems() throws SQLException
{
String myQuery = "SELECT item.* FROM item, collection2item WHERE "
+ "item.item_id=collection2item.item_id AND "
+ "collection2item.collection_id= ? ";
TableRowIterator rows = DatabaseManager.queryTable(ourContext, "item",
myQuery,getID());
return new ItemIterator(ourContext, rows);
}
/**
* Get the internal ID of this collection
*
* @return the internal identifier
@@ -911,8 +929,11 @@ public class Collection extends DSpaceObject
"DELETE FROM subscription WHERE collection_id= ? ",
getID());
// Remove Template Item
removeTemplateItem();
// Remove items
ItemIterator items = getItems();
ItemIterator items = getAllItems();
while (items.hasNext())
{