@Override
    public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
        // Get the Activity from the given row
        Time time = times.get(rowIndex);
        
        // Change the field of Activity given by rowIndex, setting aValue.
        if (columnIndex == columnNames.indexOf(ACTIVITY_COLUMN)) {
            time.setIdActivity((Integer) aValue);
        } else if (columnIndex == columnNames.indexOf(START_TIME_COLUMN)) {
            time.setStartTime((Timestamp) aValue);
        } else if (columnIndex == columnNames.indexOf(END_TIME_COLUMN)) {
            time.setEndTime((Timestamp) aValue);
        } else if (columnIndex == columnNames.indexOf(DURATION_COLUMN)) {
            time.setDuration((Long) aValue);
        } else if (columnIndex == columnNames.indexOf(DESCRIPTION_COLUMN)) {
            time.setDescription((String) aValue);
        } 
        
        // Notify observers
        TableModelEvent event = new TableModelEvent (this, rowIndex, rowIndex, 
            columnIndex);
        
        // And send to the observers
        notifyObservers(event);
    }