/** @inheritdoc */ @Override protected void bindValues(SQLiteStatement stmt, Trip entity) { stmt.clearBindings(); String id = entity.getId(); if (id != null) { stmt.bindString(1, id); } stmt.bindString(2, entity.getRouteId()); }
/** @inheritdoc */ @Override public String getKey(Trip entity) { if (entity != null) { return entity.getId(); } else { return null; } }
/** @inheritdoc */ @Override protected String updateKeyAfterInsert(Trip entity, long rowId) { return entity.getId(); }
/** @inheritdoc */ @Override public void readEntity(Cursor cursor, Trip entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0)); entity.setRouteId(cursor.getString(offset + 1)); }