Exemplo n.º 1
0
 public Long getKey(FoodLocale foodlocale) {
   if (foodlocale != null) {
     return foodlocale.getId();
   } else {
     return null;
   }
 }
Exemplo n.º 2
0
 public void readEntity(Cursor cursor, FoodLocale foodlocale, int i) {
   boolean flag2 = true;
   Object obj1 = null;
   Object obj;
   if (cursor.isNull(i + 0)) {
     obj = null;
   } else {
     obj = Long.valueOf(cursor.getLong(i + 0));
   }
   foodlocale.setId(((Long) (obj)));
   if (cursor.isNull(i + 1)) {
     obj = null;
   } else {
     obj = cursor.getString(i + 1);
   }
   foodlocale.setValue(((String) (obj)));
   if (cursor.isNull(i + 2)) {
     obj = null;
   } else {
     obj = cursor.getString(i + 2);
   }
   foodlocale.setLabel(((String) (obj)));
   if (cursor.isNull(i + 3)) {
     obj = null;
   } else {
     boolean flag;
     if (cursor.getShort(i + 3) != 0) {
       flag = true;
     } else {
       flag = false;
     }
     obj = Boolean.valueOf(flag);
   }
   foodlocale.setSupportsLookupByBarCode(((Boolean) (obj)));
   if (cursor.isNull(i + 4)) {
     cursor = obj1;
   } else {
     boolean flag1;
     if (cursor.getShort(i + 4) != 0) {
       flag1 = flag2;
     } else {
       flag1 = false;
     }
     cursor = Boolean.valueOf(flag1);
   }
   foodlocale.setImageUpload(cursor);
 }
Exemplo n.º 3
0
 protected void bindValues(SQLiteStatement sqlitestatement, FoodLocale foodlocale) {
   long l1 = 1L;
   sqlitestatement.clearBindings();
   Object obj = foodlocale.getId();
   if (obj != null) {
     sqlitestatement.bindLong(1, ((Long) (obj)).longValue());
   }
   obj = foodlocale.getValue();
   if (obj != null) {
     sqlitestatement.bindString(2, ((String) (obj)));
   }
   obj = foodlocale.getLabel();
   if (obj != null) {
     sqlitestatement.bindString(3, ((String) (obj)));
   }
   obj = foodlocale.getSupportsLookupByBarCode();
   long l;
   if (obj != null) {
     if (((Boolean) (obj)).booleanValue()) {
       l = 1L;
     } else {
       l = 0L;
     }
     sqlitestatement.bindLong(4, l);
   }
   foodlocale = foodlocale.getImageUpload();
   if (foodlocale != null) {
     if (foodlocale.booleanValue()) {
       l = l1;
     } else {
       l = 0L;
     }
     sqlitestatement.bindLong(5, l);
   }
 }
Exemplo n.º 4
0
 protected Long updateKeyAfterInsert(FoodLocale foodlocale, long l) {
   foodlocale.setId(Long.valueOf(l));
   return Long.valueOf(l);
 }