/** @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)); }
/** @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()); }
/** @inheritdoc */ @Override public Long getKey(Category entity) { if (entity != null) { return entity.getId(); } else { return null; } }
@Override protected void attachEntity(Category entity) { super.attachEntity(entity); entity.__setDaoSession(daoSession); }
/** @inheritdoc */ @Override protected Long updateKeyAfterInsert(Category entity, long rowId) { entity.setId(rowId); return rowId; }