Extension SDK 9.0.5

oracle.jdeveloper.cm.ds.db
Class AbstractDBObject

java.lang.Object
  extended byoracle.jdeveloper.cm.ds.db.AbstractDBObject
All Implemented Interfaces:
Copyable, DBObject, Subject
Direct Known Subclasses:
AbstractSchemaObject, Column, Constraint, Schema

public abstract class AbstractDBObject
extends java.lang.Object
implements DBObject

Provides an abstract implementation of the DBObject interface.

Since:
9.0.5

Field Summary
 
Fields inherited from interface oracle.jdeveloper.cm.ds.db.DBObject
COMMENT
 
Fields inherited from interface oracle.ide.addin.Subject
OBJECT_MODIFIED
 
Constructor Summary
protected AbstractDBObject()
          Constructs a new instance.
protected AbstractDBObject(java.lang.String name)
          Constructs a new instance with the specified name.
protected AbstractDBObject(java.lang.String name, DBObjectID id)
           
 
Method Summary
 void attach(Observer observer)
          Registers an observer interested in being notified when the internal state of the class implementing the Subject interface changes.
protected  int compareToImpl(AbstractDBObject target)
           
protected  void copyToImpl(AbstractDBObject copy)
           
 void detach(Observer observer)
          Unregisters an observer that is not interested anymore in being notified when the internal state of the class implementing the Subject interface changes.
 boolean equals(java.lang.Object obj)
           
protected  boolean equalsImpl(AbstractDBObject other)
           
 DBObjectID getID()
          Retrieves the object ID associated with this object.
 java.lang.String getName()
          Retrieves the name of this object.
 java.util.Map getProperties()
          Retrieves the properties set on this object.
 java.lang.Object getProperty(java.lang.String name)
          Retrieves the value of a property set on this object.
 int hashCode()
           
 void notifyObservers(java.lang.Object subject, UpdateMessage change)
          Notifies all observers that the state of the subject has changed.
 void setID(DBObjectID id)
          Sets the object ID associated with this object.
 void setName(java.lang.String name)
          Sets the name of this object.
 void setProperties(java.util.Map props)
          Sets the properties on this object.
 void setProperty(java.lang.String name, java.lang.Object value)
          Sets a value for a specific property.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.jdeveloper.cm.ds.db.DBObject
copyTo, getType
 

Constructor Detail

AbstractDBObject

protected AbstractDBObject()
Constructs a new instance.


AbstractDBObject

protected AbstractDBObject(java.lang.String name)
Constructs a new instance with the specified name.

Parameters:
name - a string representing the name of this object.

AbstractDBObject

protected AbstractDBObject(java.lang.String name,
                           DBObjectID id)
Method Detail

copyToImpl

protected void copyToImpl(AbstractDBObject copy)

equals

public boolean equals(java.lang.Object obj)

equalsImpl

protected boolean equalsImpl(AbstractDBObject other)

compareToImpl

protected int compareToImpl(AbstractDBObject target)

toString

public java.lang.String toString()

hashCode

public int hashCode()

setName

public void setName(java.lang.String name)
Description copied from interface: DBObject
Sets the name of this object.

Specified by:
setName in interface DBObject
Parameters:
name - a string containing the new name for this object.

getName

public java.lang.String getName()
Description copied from interface: DBObject
Retrieves the name of this object.

Specified by:
getName in interface DBObject
Returns:
a string containing the name of this object.

setID

public void setID(DBObjectID id)
Description copied from interface: DBObject
Sets the object ID associated with this object. Note that the ID should only be set at most once. Implementations should ensure that the id is not reset.

Specified by:
setID in interface DBObject
Parameters:
id - the DBObjectID to be associated with this object

getID

public DBObjectID getID()
Description copied from interface: DBObject
Retrieves the object ID associated with this object.

Specified by:
getID in interface DBObject
Returns:
the DBObjectID associated with this object

getProperty

public java.lang.Object getProperty(java.lang.String name)
Description copied from interface: DBObject
Retrieves the value of a property set on this object.

Note:The properties set on an object are guaranteed to exist during the lifetime of the object; however, the persistence of the properties within the object is determined by the persistence implementation for the object and is not guaranteed.

Specified by:
getProperty in interface DBObject
Parameters:
name - a string containing the name of the property
Returns:
the value of the property stored within this object, or null if a property of the specified name has not been set

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
Description copied from interface: DBObject
Sets a value for a specific property.

Note:The properties set on an object are guaranteed to exist during the lifetime of the object; however, the persistence of the properties within the object is determined by the persistence implementation for the object and is not guaranteed.

Specified by:
setProperty in interface DBObject
Parameters:
name - a string containing the name of the property
value - the value of the property store with this object. null will clear the property.

getProperties

public java.util.Map getProperties()
Description copied from interface: DBObject
Retrieves the properties set on this object.

Note:The properties set on an object are guaranteed to exist during the lifetime of the object; however, the persistence of the properties within the object is determined by the persistence implementation for the object and is not guaranteed.

Specified by:
getProperties in interface DBObject
Returns:
a map of all the properties and their values

setProperties

public void setProperties(java.util.Map props)
Description copied from interface: DBObject
Sets the properties on this object.

Note:The properties set on an object are guaranteed to exist during the lifetime of the object; however, the persistence of the properties within the object is determined by the persistence implementation for the object and is not guaranteed.

Specified by:
setProperties in interface DBObject
Parameters:
props - a map of all the properties and their values

attach

public void attach(Observer observer)
Description copied from interface: Subject
Registers an observer interested in being notified when the internal state of the class implementing the Subject interface changes. Implementors should do nothing when the same observer is added more than once.

Specified by:
attach in interface Subject
Parameters:
observer - the Observer interested in change notification messages.

detach

public void detach(Observer observer)
Description copied from interface: Subject
Unregisters an observer that is not interested anymore in being notified when the internal state of the class implementing the Subject interface changes. Implementors should do nothing when the same observer is removed more than once.

Specified by:
detach in interface Subject
Parameters:
observer - the Observer disinterested in change notification messages.

notifyObservers

public void notifyObservers(java.lang.Object subject,
                            UpdateMessage change)
Description copied from interface: Subject
Notifies all observers that the state of the subject has changed.

Specified by:
notifyObservers in interface Subject
Parameters:
subject - the subject whose state has changed.
change - what changed.

Extension SDK

 

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