Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


oracle.javatools.db.event
Class DBObjectChange

java.lang.Object
  extended by oracle.javatools.db.event.DBObjectChange

Direct Known Subclasses:
DBObjectChange

public class DBObjectChange
extends java.lang.Object

A DBObjectChange is used to notify of changes to a DBObject. It is passed to any appropriate listeners when the provider creates, updates or removes objects. A DBObjectChange is not limited to one type of change, it can contain multiple changes (e.g. children removed as well as children added). A DBObjectChange can include changes to child objects as well through the getOwnedObjectsChanged() method.

Since:
10.1.3

Field Summary
static java.lang.String NAME_PROPERTY
          Key for the property map to see if an object's name has been changed.

 

Constructor Summary
protected DBObjectChange(DBObject obj, DBObjectProvider pro)
           

 

Method Summary
static void fireChildrenAdded(SystemObject obj, java.util.List added)
           
static void fireChildrenRemoved(SystemObject obj, java.util.List removed)
           
static void fireChildUpdated(SystemObject obj, DBObject child)
           
static void fireObjectUpdated(SystemObject obj)
          Fires an empty change message on the given object.
static void fireObjectUpdated(SystemObject obj, java.util.List<DBObject> added, java.util.List<DBObject> removed, java.util.Map<java.lang.String,java.beans.PropertyChangeEvent> props)
           
static void firePropertiesChanged(SystemObject obj, java.util.Map<java.lang.String,java.beans.PropertyChangeEvent> props)
           
static void firePropertyChanged(SystemObject obj, java.beans.PropertyChangeEvent... pces)
           
 DBObject getDBObject()
          Gets the object this change has been on.
 java.util.List<DBObject> getOwnedObjectsAdded()
          Returns any owned objects added to the ListenableObject as a result of the change.
 java.util.List<DBObject> getOwnedObjectsRemoved()
          Returns any owned objects removed from the ListenableObject as a result of the change.
 java.util.Map<DBObject,DBObjectChange> getOwnedObjectsUpdated()
          Returns any changes that have happened to any owned objects.
 java.util.Map<java.lang.String,java.beans.PropertyChangeEvent> getPropertiesChanged()
          Returns any properties changed on the ListenableObject as a result of the change.
 java.beans.PropertyChangeEvent getPropertyChange(java.lang.String propertyName)
          Gets the PropertyChangeEvent for the given property name.
 DBObjectProvider getProvider()
          Gets the DBObjectProvider that the changed object is from.
 boolean hasNameChanged()
          Convinience method to identify whether the "name" property has been changed - looks in the properties changed map for the property as a key.
 void log()
          Internal - prints a copy of the event to the oracle.javatools.db Logger.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

NAME_PROPERTY

public static final java.lang.String NAME_PROPERTY
Key for the property map to see if an object's name has been changed. This is a convinience member that simple equates to Property.name.
See Also:
hasNameChanged(), Property.name, Constant Field Values

Constructor Detail

DBObjectChange

protected DBObjectChange(DBObject obj,
                         DBObjectProvider pro)

Method Detail

getProvider

public DBObjectProvider getProvider()
Gets the DBObjectProvider that the changed object is from. This can be null as DBObjectChange events can be fired on isolated objects. This method is only guarenteed to return a DBObjectProvider if the DBObjectChange is being passed to a listener registered with that DBObjectProvider.
Returns:
the DBObjectProvider containing the changed object.

getDBObject

public DBObject getDBObject()
Gets the object this change has been on.

getOwnedObjectsAdded

public java.util.List<DBObject> getOwnedObjectsAdded()
Returns any owned objects added to the ListenableObject as a result of the change.

getOwnedObjectsRemoved

public java.util.List<DBObject> getOwnedObjectsRemoved()
Returns any owned objects removed from the ListenableObject as a result of the change.

getPropertiesChanged

public java.util.Map<java.lang.String,java.beans.PropertyChangeEvent> getPropertiesChanged()
Returns any properties changed on the ListenableObject as a result of the change. The key is the property name and the value a PropertyChangeEvent.
See Also:
getPropertyChange(String)

getPropertyChange

public java.beans.PropertyChangeEvent getPropertyChange(java.lang.String propertyName)
Gets the PropertyChangeEvent for the given property name. If the property hasn't been changed, null is returned.
See Also:
getPropertiesChanged()

getOwnedObjectsUpdated

public java.util.Map<DBObject,DBObjectChange> getOwnedObjectsUpdated()
Returns any changes that have happened to any owned objects. The key is the owned object and the value a DBObjectChange.

hasNameChanged

public boolean hasNameChanged()
Convinience method to identify whether the "name" property has been changed - looks in the properties changed map for the property as a key.
See Also:
NAME_PROPERTY

log

public void log()
Internal - prints a copy of the event to the oracle.javatools.db Logger.
For internal use only. Application developers should not use this

fireObjectUpdated

public static void fireObjectUpdated(SystemObject obj)
Fires an empty change message on the given object. Where possible use a more specific message
See Also:
fireChildrenAdded(oracle.javatools.db.SystemObject, java.util.List), fireChildrenRemoved(oracle.javatools.db.SystemObject, java.util.List), firePropertiesChanged(oracle.javatools.db.SystemObject, java.util.Map<java.lang.String, java.beans.PropertyChangeEvent>)

fireChildrenAdded

public static void fireChildrenAdded(SystemObject obj,
                                     java.util.List added)

fireChildrenRemoved

public static void fireChildrenRemoved(SystemObject obj,
                                       java.util.List removed)

firePropertyChanged

public static void firePropertyChanged(SystemObject obj,
                                       java.beans.PropertyChangeEvent... pces)

firePropertiesChanged

public static void firePropertiesChanged(SystemObject obj,
                                         java.util.Map<java.lang.String,java.beans.PropertyChangeEvent> props)

fireObjectUpdated

public static void fireObjectUpdated(SystemObject obj,
                                     java.util.List<DBObject> added,
                                     java.util.List<DBObject> removed,
                                     java.util.Map<java.lang.String,java.beans.PropertyChangeEvent> props)

fireChildUpdated

public static void fireChildUpdated(SystemObject obj,
                                    DBObject child)

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


Copyright © 1997, 2012, Oracle. All rights reserved.