/** Fires property change event. This method overrides that of * MappingElementImpl to update the mapping class element's modified * status. * @param name property name * @param o old value * @param n new value */ protected final void firePropertyChange (String name, Object o, Object n) { // even though o == null and n == null will signify a change, that // is consistent with PropertyChangeSupport's behavior and is // necessary for this to work boolean noChange = ((o != null) && (n != null) && o.equals(n)); super.firePropertyChange(name, o, n); if (!(PROP_MODIFIED.equals(name)) && !noChange) setModified(true); }
/** Fires property change event. This method overrides that of * MappingElementImpl to update the mapping class element's modified * status. * @param name property name * @param o old value * @param n new value */ protected final void firePropertyChange (String name, Object o, Object n) { // even though o == null and n == null will signify a change, that // is consistent with PropertyChangeSupport's behavior and is // necessary for this to work boolean noChange = ((o != null) && (n != null) && o.equals(n)); super.firePropertyChange(name, o, n); if (!(PROP_MODIFIED.equals(name)) && !noChange) setModified(true); }
/** Fires property change event. This method overrides that of * MappingElementImpl to update the MappingClassElementImpl's modified * status. * @param name property name * @param o old value * @param n new value */ protected final void firePropertyChange (String name, Object o, Object n) { // even though o == null and n == null will signify a change, that // is consistent with PropertyChangeSupport's behavior and is // necessary for this to work boolean noChange = ((o != null) && (n != null) && o.equals(n)); MappingClassElement classElement = getDeclaringClass(); super.firePropertyChange(name, o, n); if ((classElement != null) && !noChange) classElement.setModified(true); }
/** Fires property change event. This method overrides that of * MappingElementImpl to update the MappingClassElementImpl's modified * status. * @param name property name * @param o old value * @param n new value */ protected final void firePropertyChange (String name, Object o, Object n) { // even though o == null and n == null will signify a change, that // is consistent with PropertyChangeSupport's behavior and is // necessary for this to work boolean noChange = ((o != null) && (n != null) && o.equals(n)); MappingClassElement classElement = getDeclaringClass(); super.firePropertyChange(name, o, n); if ((classElement != null) && !noChange) classElement.setModified(true); }
/** Set the name of this mapping element. * @param name the name * @exception ModelException if impossible */ public void setName (String name) throws ModelException { String old = getName(); try { fireVetoableChange(PROP_NAME, old, name); _name = name; firePropertyChange(PROP_NAME, old, name); } catch (PropertyVetoException e) { throw new ModelVetoException(e); } }
/** Set the name of this mapping element. * @param name the name * @exception ModelException if impossible */ public void setName (String name) throws ModelException { String old = getName(); try { fireVetoableChange(PROP_NAME, old, name); _name = name; firePropertyChange(PROP_NAME, old, name); } catch (PropertyVetoException e) { throw new ModelVetoException(e); } }