/** @inheritdoc */ @Override public void readEntity(Cursor cursor, Bank entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); entity.setName(cursor.getString(offset + 1)); entity.setUpdatedDate( cursor.isNull(offset + 2) ? null : new java.util.Date(cursor.getLong(offset + 2))); }
/** @inheritdoc */ @Override protected void bindValues(SQLiteStatement stmt, Bank entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } stmt.bindString(2, entity.getName()); java.util.Date updatedDate = entity.getUpdatedDate(); if (updatedDate != null) { stmt.bindLong(3, updatedDate.getTime()); } }
/** @inheritdoc */ @Override public Long getKey(Bank entity) { if (entity != null) { return entity.getId(); } else { return null; } }
@Override protected void attachEntity(Bank entity) { super.attachEntity(entity); entity.__setDaoSession(daoSession); }
/** @inheritdoc */ @Override protected Long updateKeyAfterInsert(Bank entity, long rowId) { entity.setId(rowId); return rowId; }