ca.sqlpower.architect.profile.event
Class ProfileChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by ca.sqlpower.architect.profile.event.ProfileChangeEvent
All Implemented Interfaces:
java.io.Serializable

public class ProfileChangeEvent
extends java.util.EventObject

The ProfileChangeEvent represents a change in the contents of a particular ProfileManager. The profile manager that underwent the change is the source of this event.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ProfileChangeEvent(ProfileManager source, java.util.List<? extends ProfileResult> prList)
          Creates a profile change event for the given list of profile objects.
ProfileChangeEvent(ProfileManager source, ProfileResult pr)
          Creates a profile change event for the given single profile object.
 
Method Summary
 java.util.List<ProfileResult> getProfileResults()
          Returns the list of profile results that were either added or removed.
 ProfileManager getSource()
          Returns the ProfileManager that this event was generated by.
 java.lang.String toString()
          Returns a string representation of each profile result in this event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProfileChangeEvent

public ProfileChangeEvent(ProfileManager source,
                          ProfileResult pr)
Creates a profile change event for the given single profile object.

Parameters:
source - The profile manager that gained or lost a profile.
pr - The profile gained or lost.

ProfileChangeEvent

public ProfileChangeEvent(ProfileManager source,
                          java.util.List<? extends ProfileResult> prList)
Creates a profile change event for the given list of profile objects. The given list is copied, so it is safe to modify the list you pass in after creating this event.

Parameters:
source - The profile manager that gained or lost a profile.
prList - The list of profiles gained or lost. This list will be copied, not referenced directly.
Method Detail

getProfileResults

public java.util.List<ProfileResult> getProfileResults()
Returns the list of profile results that were either added or removed. The list is not modifiable.


getSource

public ProfileManager getSource()
Returns the ProfileManager that this event was generated by.

Overrides:
getSource in class java.util.EventObject

toString

public java.lang.String toString()
Returns a string representation of each profile result in this event.

Overrides:
toString in class java.util.EventObject


Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca