Ejemplo n.º 1
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, Category entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setTitle(cursor.getString(offset + 1));
   entity.setDescription(cursor.getString(offset + 2));
   entity.setImage(cursor.getString(offset + 3));
 }
Ejemplo n.º 2
0
  /** @inheritdoc */
  @Override
  protected void bindValues(SQLiteStatement stmt, Category entity) {
    stmt.clearBindings();

    Long id = entity.getId();
    if (id != null) {
      stmt.bindLong(1, id);
    }
    stmt.bindString(2, entity.getTitle());
    stmt.bindString(3, entity.getDescription());
    stmt.bindString(4, entity.getImage());
  }
Ejemplo n.º 3
0
 /** @inheritdoc */
 @Override
 public Long getKey(Category entity) {
   if (entity != null) {
     return entity.getId();
   } else {
     return null;
   }
 }
Ejemplo n.º 4
0
 @Override
 protected void attachEntity(Category entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }
Ejemplo n.º 5
0
 /** @inheritdoc */
 @Override
 protected Long updateKeyAfterInsert(Category entity, long rowId) {
   entity.setId(rowId);
   return rowId;
 }