Add ability to store a note with loyalty card

This commit is contained in:
Branden Archer
2016-03-20 17:56:11 -04:00
parent 62e4fa402c
commit 9306e1a3d9
8 changed files with 150 additions and 39 deletions

View File

@@ -6,13 +6,15 @@ public class LoyaltyCard
{
public final int id;
public final String store;
public final String note;
public final String cardId;
public final String barcodeType;
public LoyaltyCard(final int id, final String store, final String cardId, final String barcodeType)
public LoyaltyCard(final int id, final String store, final String note, final String cardId, final String barcodeType)
{
this.id = id;
this.store = store;
this.note = note;
this.cardId = cardId;
this.barcodeType = barcodeType;
}
@@ -21,9 +23,10 @@ public class LoyaltyCard
{
int id = cursor.getInt(cursor.getColumnIndexOrThrow(DBHelper.LoyaltyCardDbIds.ID));
String store = cursor.getString(cursor.getColumnIndexOrThrow(DBHelper.LoyaltyCardDbIds.STORE));
String note = cursor.getString(cursor.getColumnIndexOrThrow(DBHelper.LoyaltyCardDbIds.NOTE));
String cardId = cursor.getString(cursor.getColumnIndexOrThrow(DBHelper.LoyaltyCardDbIds.CARD_ID));
String barcodeType = cursor.getString(cursor.getColumnIndexOrThrow(DBHelper.LoyaltyCardDbIds.BARCODE_TYPE));
return new LoyaltyCard(id, store, cardId, barcodeType);
return new LoyaltyCard(id, store, note, cardId, barcodeType);
}
}