/* * (non-Javadoc) * * @see org.cuny.sensors.dao.IDao#update(java.lang.Object) */ @Override public RawFile update(RawFile obj) throws Exception { RawFile old = get(obj.getId()); this.jdbcTemplate.update( "update " + TABLE_NAME + " set " + FILE_NAME + " = ?, " + FILE_SIZE + " = ?, " + DATASET_COUNT + " = ?, " + SENSOR_COUNT + " = ?, " + RECORD_COUNT + " = ?, " + BUILDING + " = ?," + CAMPUS + " = ?," + STATUS + " = ?," + NOTES + " = ? where " + ID + " = ?", obj.getFilename(), obj.getFileSize(), obj.getDatasetCount(), obj.getSensorCount(), obj.getRecordCount(), obj.getBuilding(), obj.getCampus(), obj.getStatus().toString(), obj.getNotes(), obj.getId()); return old; }
/* * (non-Javadoc) * * @see org.cuny.sensors.dao.IDao#remove(java.lang.Object) */ @Override public RawFile remove(RawFile obj) throws Exception { RawFile old = get(obj.getId()); this.jdbcTemplate.update("delete from " + TABLE_NAME + " where " + ID + " = ?", obj.getId()); return old; }