/** @inheritdoc */ @Override public Long getKey(p7p5 entity) { if (entity != null) { return entity.getId(); } else { return null; } }
/** @inheritdoc */ @Override public void readEntity(Cursor cursor, p7p5 entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); entity.setLfdc(cursor.isNull(offset + 1) ? null : cursor.getInt(offset + 1)); entity.setLfce(cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2)); entity.setLfac(cursor.isNull(offset + 3) ? null : cursor.getInt(offset + 3)); entity.setOrigen(cursor.isNull(offset + 4) ? null : cursor.getInt(offset + 4)); entity.setObser(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5)); entity.setId_formulario(cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6)); }
/** @inheritdoc */ @Override protected void bindValues(SQLiteStatement stmt, p7p5 entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } Integer lfdc = entity.getLfdc(); if (lfdc != null) { stmt.bindLong(2, lfdc); } Integer lfce = entity.getLfce(); if (lfce != null) { stmt.bindLong(3, lfce); } Integer lfac = entity.getLfac(); if (lfac != null) { stmt.bindLong(4, lfac); } Integer origen = entity.getOrigen(); if (origen != null) { stmt.bindLong(5, origen); } String obser = entity.getObser(); if (obser != null) { stmt.bindString(6, obser); } Integer id_formulario = entity.getId_formulario(); if (id_formulario != null) { stmt.bindLong(7, id_formulario); } }
/** @inheritdoc */ @Override protected Long updateKeyAfterInsert(p7p5 entity, long rowId) { entity.setId(rowId); return rowId; }