public void revert() {
   boolean delSuccess = adapter.deleteTargets(id.value);
   for (Target orig : original) {
     // FIX 24/01/12 Probably make the order of these arguments consistent.
     adapter.create(id.value, orig.number, orig.name);
   }
 }
 public void refresh() {
   final SimpleCursorAdapter.ViewBinder view = new DefaultTargetViewBinder(adapter);
   final Cursor cursor = adapter.fetchByRiposteId(id.value);
   final ListView listView = activity.getListView();
   final ComponentIndex rowIndex = new ComponentIndex(R.layout.target_row);
   final TargetListMapping mapping = new TargetListMapping();
   lists.refresh(activity, cursor, listView, rowIndex, mapping, view);
 }
 public void delete(final TargetId tid) {
   adapter.deleteById(tid.value);
   refresh();
 }
 public void update(final BasicContact contact) {
   boolean isDuplicate = adapter.contains(id.value, contact.number);
   if (!isDuplicate) {
     adapter.create(id.value, contact.number, contact.name);
   }
 }
 public DefaultTargets(final ListActivity activity, final SQLiteDatabase db, final RiposteId id) {
   this.activity = activity;
   adapter = new DefaultTargetDbAdapter(db);
   this.id = id;
   original = adapter.getTargets(id.value);
 }