Add a delete() that takes a Key.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2115 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2007-06-15 01:13:28 +00:00
parent c386d66109
commit 74675a7e57
@@ -609,7 +609,18 @@ public class DepotRepository
protected <T extends PersistentRecord> int delete (Class<T> type, Comparable primaryKeyValue)
throws PersistenceException
{
Key<T> primaryKey = _ctx.getMarshaller(type).makePrimaryKey(primaryKeyValue);
return delete(type, _ctx.getMarshaller(type).makePrimaryKey(primaryKeyValue));
}
/**
* Deletes all persistent objects from the database with a primary key matching the supplied
* primary key.
*
* @return the number of rows deleted by this action.
*/
protected <T extends PersistentRecord> int delete (Class<T> type, Key<T> primaryKey)
throws PersistenceException
{
return deleteAll(type, primaryKey, primaryKey);
}