/** @inheritdoc */ @Override public void readEntity(Cursor cursor, DolphinContext entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); entity.setActivity_name(cursor.getString(offset + 1)); entity.setDevice_state(cursor.getString(offset + 2)); entity.setModel_config_id(cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3)); entity.setPlugin_id(cursor.getLong(offset + 4)); }
protected DolphinContext loadCurrentDeep(Cursor cursor, boolean lock) { DolphinContext entity = loadCurrent(cursor, 0, lock); int offset = getAllColumns().length; ModelConfig modelConfig = loadCurrentOther(daoSession.getModelConfigDao(), cursor, offset); entity.setModelConfig(modelConfig); offset += daoSession.getModelConfigDao().getAllColumns().length; Plugin plugin = loadCurrentOther(daoSession.getPluginDao(), cursor, offset); if (plugin != null) { entity.setPlugin(plugin); } return entity; }
/** @inheritdoc */ @Override protected void bindValues(SQLiteStatement stmt, DolphinContext entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } stmt.bindString(2, entity.getActivity_name()); stmt.bindString(3, entity.getDevice_state()); Long model_config_id = entity.getModel_config_id(); if (model_config_id != null) { stmt.bindLong(4, model_config_id); } stmt.bindLong(5, entity.getPlugin_id()); }
/** @inheritdoc */ @Override public Long getKey(DolphinContext entity) { if (entity != null) { return entity.getId(); } else { return null; } }
@Override protected void attachEntity(DolphinContext entity) { super.attachEntity(entity); entity.__setDaoSession(daoSession); }
/** @inheritdoc */ @Override protected Long updateKeyAfterInsert(DolphinContext entity, long rowId) { entity.setId(rowId); return rowId; }