예제 #1
0
 /**
  * Delete all matching a clause
  *
  * @param where predicate for deletion
  * @return # of deleted items
  */
 public int deleteWhere(Criterion where) {
   return database.delete(table.name, where.toString(), null);
 }
예제 #2
0
 /**
  * Delete the given id
  *
  * @param database
  * @param id
  * @return true if delete was successful
  */
 public boolean delete(long id) {
   return database.delete(table.name, AbstractModel.ID_PROPERTY.eq(id).toString(), null) > 0;
 }