FileDocCategorySizeDatePackage
PersistenceMemberElementImpl.javaAPI DocGlassfish v2 API4633Fri May 04 22:34:44 BST 2007com.sun.jdo.api.persistence.model.jdo.impl

PersistenceMemberElementImpl

public abstract class PersistenceMemberElementImpl extends PersistenceElementImpl implements PersistenceMemberElement.Impl
author
raccah
version
%I%

Fields Summary
Constructors Summary
public PersistenceMemberElementImpl()
Create new PersistenceMemberElementImpl with no corresponding name. This constructor should only be used for cloning and archiving.

		this(null);
	
public PersistenceMemberElementImpl(String name)
Creates new PersistenceMemberElementImpl with the corresponding name

param
name the name of the element

		super(name);
	
Methods Summary
protected final voidfirePropertyChange(java.lang.String name, java.lang.Object o, java.lang.Object n)
Fires property change event. This method overrides that of PersistenceElementImpl to update the PersistenceClassElementImpl's modified status.

param
name property name
param
o old value
param
n new value

		// 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));
		PersistenceClassElement classElement = 
			((PersistenceMemberElement)_element).getDeclaringClass();

		super.firePropertyChange(name, o, n);

		if ((classElement != null) && !noChange)
			classElement.setModified(true);
	
protected final voidfireVetoableChange(java.lang.String name, java.lang.Object o, java.lang.Object n)
Fires vetoable change event. This method overrides that of PersistenceElementImpl to give listeners a chance to block changes on the persistence 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

		// 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));
		PersistenceClassElement classElement = 
			((PersistenceMemberElement)_element).getDeclaringClass();

		super.fireVetoableChange(name, o, n);

		if ((classElement != null) && !noChange)
		{
			((PersistenceElementImpl)classElement.getImpl()).
				fireVetoableChange(PROP_MODIFIED, Boolean.FALSE, Boolean.TRUE);
		}