Пример #1
0
  private static ContentValues toContentValues(Ganga ganga) {
    ContentValues values = new ContentValues();
    values.put(GangaTable.Column.UUID, ganga.getId().toString());
    values.put(GangaTable.Column.TITLE, ganga.getTitle());
    values.put(GangaTable.Column.PRICE, ganga.getPrice());
    values.put(GangaTable.Column.PLACE, ganga.getPlace());
    values.put(GangaTable.Column.DUE_DATE, ganga.getDueDate().getTime());

    return values;
  }
Пример #2
0
  public void updateGanga(Ganga ganga) {
    String id = ganga.getId().toString();
    ContentValues values = toContentValues(ganga);

    mDatabase.update(GangaTable.NAME, values, GangaTable.Column.UUID + " = ?", new String[] {id});
  }