/** Fires vetoable change event. This method overrides that of * MappingElementImpl to give listeners a chance to block * changes on the mapping class element modified status. * @param name property name * @param o old value * @param n new value * @exception PropertyVetoException when the change is vetoed by a listener */ protected final void fireVetoableChange (String name, Object o, Object n) throws PropertyVetoException { // 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.fireVetoableChange(name, o, n); if (!(PROP_MODIFIED.equals(name)) && !noChange) fireVetoableChange(PROP_MODIFIED, Boolean.FALSE, Boolean.TRUE); }
/** Fires vetoable change event. This method overrides that of * MappingElementImpl to give listeners a chance to block * changes on the mapping class element modified status. * @param name property name * @param o old value * @param n new value * @exception PropertyVetoException when the change is vetoed by a listener */ protected final void fireVetoableChange (String name, Object o, Object n) throws PropertyVetoException { // 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.fireVetoableChange(name, o, n); if (!(PROP_MODIFIED.equals(name)) && !noChange) fireVetoableChange(PROP_MODIFIED, Boolean.FALSE, Boolean.TRUE); }
/** Fires vetoable change event. This method overrides that of * MappingElementImpl to give listeners a chance to block * changes on the mapping class element modified status. * @param name property name * @param o old value * @param n new value * @exception PropertyVetoException when the change is vetoed by a listener */ protected final void fireVetoableChange (String name, Object o, Object n) throws PropertyVetoException { // 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.fireVetoableChange(name, o, n); if ((classElement != null) && !noChange) { ((MappingClassElementImpl)classElement).fireVetoableChange( PROP_MODIFIED, Boolean.FALSE, Boolean.TRUE); } }
/** Fires vetoable change event. This method overrides that of * MappingElementImpl to give listeners a chance to block * changes on the mapping class element modified status. * @param name property name * @param o old value * @param n new value * @exception PropertyVetoException when the change is vetoed by a listener */ protected final void fireVetoableChange (String name, Object o, Object n) throws PropertyVetoException { // 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.fireVetoableChange(name, o, n); if ((classElement != null) && !noChange) { ((MappingClassElementImpl)classElement).fireVetoableChange( PROP_MODIFIED, Boolean.FALSE, Boolean.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); } }