/** @inheritdoc */ @Override public Long getKey(TokensBD entity) { if (entity != null) { return entity.getId(); } else { return null; } }
/** @inheritdoc */ @Override protected void bindValues(SQLiteStatement stmt, TokensBD entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } Long expiresIn = entity.getExpiresIn(); if (expiresIn != null) { stmt.bindLong(2, expiresIn); } Long expiresAt = entity.getExpiresAt(); if (expiresAt != null) { stmt.bindLong(3, expiresAt); } String tokenType = entity.getTokenType(); if (tokenType != null) { stmt.bindString(4, tokenType); } String refreshToken = entity.getRefreshToken(); if (refreshToken != null) { stmt.bindString(5, refreshToken); } String accessToken = entity.getAccessToken(); if (accessToken != null) { stmt.bindString(6, accessToken); } }
/** @inheritdoc */ @Override public void readEntity(Cursor cursor, TokensBD entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); entity.setExpiresIn(cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1)); entity.setExpiresAt(cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2)); entity.setTokenType(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3)); entity.setRefreshToken(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4)); entity.setAccessToken(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5)); }
/** @inheritdoc */ @Override protected Long updateKeyAfterInsert(TokensBD entity, long rowId) { entity.setId(rowId); return rowId; }
@Override protected void attachEntity(TokensBD entity) { super.attachEntity(entity); entity.__setDaoSession(daoSession); }