ca.sqlpower.architect
Class SQLObjectEvent

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

public class SQLObjectEvent
extends java.util.EventObject
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  int[] changedIndices
           
protected  SQLObject[] children
           
protected  java.lang.Object newValue
           
protected  java.lang.Object oldValue
           
protected  java.lang.String propertyName
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
SQLObjectEvent(SQLObject source, int[] changedIndices, SQLObject[] children)
          Use this constructor for DBChildrenInserted and DBChildrenRemoved type events.
SQLObjectEvent(SQLObject source, java.lang.String propertyName)
          Use this constructor for DBObjectChanged type events.
SQLObjectEvent(SQLObject source, java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
          Use this constructor for DBObjectChanged type events.
 
Method Summary
 int[] getChangedIndices()
          Gets the value of changedIndices
 SQLObject[] getChildren()
          Gets the value of children
 java.lang.Object getNewValue()
           
 java.lang.Object getOldValue()
           
 java.lang.String getPropertyName()
          Gets the value of propertyName
 SQLObject getSQLSource()
           
 void setChangedIndices(int[] argChangedIndices)
          Sets the value of changedIndices
 void setChildren(SQLObject[] argChildren)
          Sets the value of children
 void setNewValue(java.lang.Object newValue)
           
 void setOldValue(java.lang.Object oldValue)
           
 void setPropertyName(java.lang.String argPropertyName)
          Sets the value of propertyName
 java.lang.String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

changedIndices

protected int[] changedIndices

children

protected SQLObject[] children

propertyName

protected java.lang.String propertyName

oldValue

protected java.lang.Object oldValue

newValue

protected java.lang.Object newValue
Constructor Detail

SQLObjectEvent

public SQLObjectEvent(SQLObject source,
                      int[] changedIndices,
                      SQLObject[] children)
Use this constructor for DBChildrenInserted and DBChildrenRemoved type events. propertyName will be set to the string "children".

Parameters:
source - The SQLObject that changed.
changedIndices - The indices of the children that were added or removed. The indices must be in ascending order.
children - The actual SQLObject instances that were added or removed to/from source.

SQLObjectEvent

public SQLObjectEvent(SQLObject source,
                      java.lang.String propertyName,
                      java.lang.Object oldValue,
                      java.lang.Object newValue)
Use this constructor for DBObjectChanged type events. changedIndices and children will be null.

Parameters:
source - The SQLObject that changed
propertyName - The name of the property on source that changed.

SQLObjectEvent

public SQLObjectEvent(SQLObject source,
                      java.lang.String propertyName)
Use this constructor for DBObjectChanged type events. changedIndices and children will be null.

Parameters:
source - The SQLObject that changed
propertyName - The name of the property on source that changed.
Method Detail

getSQLSource

public SQLObject getSQLSource()

getChangedIndices

public int[] getChangedIndices()
Gets the value of changedIndices

Returns:
the value of changedIndices

setChangedIndices

public void setChangedIndices(int[] argChangedIndices)
Sets the value of changedIndices

Parameters:
argChangedIndices - Value to assign to this.changedIndices

getChildren

public SQLObject[] getChildren()
Gets the value of children

Returns:
the value of children

setChildren

public void setChildren(SQLObject[] argChildren)
Sets the value of children

Parameters:
argChildren - Value to assign to this.children

getPropertyName

public java.lang.String getPropertyName()
Gets the value of propertyName

Returns:
the value of propertyName

setPropertyName

public void setPropertyName(java.lang.String argPropertyName)
Sets the value of propertyName

Parameters:
argPropertyName - Value to assign to this.propertyName

getNewValue

public java.lang.Object getNewValue()

setNewValue

public void setNewValue(java.lang.Object newValue)

getOldValue

public java.lang.Object getOldValue()

setOldValue

public void setOldValue(java.lang.Object oldValue)

toString

public java.lang.String toString()
Overrides:
toString in class java.util.EventObject


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