code: private void fireFieldChangeEvent(ResourceField field, Object oldValue, Object newValue)
     {
        //
        // Internal event handling
        //
        switch (field)
        {
           case UNIQUE_ID:
           {
              ProjectFile parent = getParentFile();
              if (oldValue != null)
              {
                 parent.getResources().unmapUniqueID((Integer) oldValue);
              }
              parent.getResources().mapUniqueID((Integer) newValue, this);
  
              if (m_assignments.isEmpty() == false)
              {
                 for (ResourceAssignment assignment : m_assignments)
                 {
                    assignment.setResourceUniqueID((Integer) newValue);
                 }
              }
              break;
           }
  
           case COST:
           case BASELINE_COST:
           {
              m_array[ResourceField.COST_VARIANCE.getValue()] = null;
              break;
           }
  
           case WORK:
           case BASELINE_WORK:
           {
              m_array[ResourceField.WORK_VARIANCE.getValue()] = null;
              break;
           }
  
           case BCWP:
           case ACWP:
           {
              m_array[ResourceField.CV.getValue()] = null;
              m_array[ResourceField.SV.getValue()] = null;
              break;
           }
  
           case BCWS:
           {
              m_array[ResourceField.SV.getValue()] = null;
              break;
           }
  
           case PEAK:
           case MAX_UNITS:
           {
              m_array[ResourceField.OVERALLOCATED.getValue()] = null;
              break;
           }
  
           default:
           {
              break;
           }
        }
  
        //
        // External event handling
        //
        if (m_listeners != null)
        {
           for (FieldListener listener : m_listeners)
           {
              listener.fieldChange(this, field, oldValue, newValue);
           }
        }
     }
docs: Handle the change in a field value. Reset any cached calculated
  values affected by this change, pass on the event to any external
  listeners.
  
  @param field field changed
  @param oldValue old field value
  @param newValue new field value