Extension SDK 9.0.5

oracle.jdeveloper.cm.ds.db
Interface DBObject

All Superinterfaces:
Copyable, Subject
All Known Subinterfaces:
BinaryObject, SchemaObject, SourceObject
All Known Implementing Classes:
AbstractDBObject, AbstractSchemaObject, JavaClass, JavaResource, JavaSource, PlSql

public interface DBObject
extends Subject, Copyable

Base interface for Database Objects. A database object is not assumed to exist in a database; rather, it is just something that could exist in a database.

Since:
9.0.2

Field Summary
static java.lang.String COMMENT
          The comment property.
 
Fields inherited from interface oracle.ide.addin.Subject
OBJECT_MODIFIED
 
Method Summary
 java.lang.Object copyTo(java.lang.Object target)
          Copies the state of this DBObject to another instance.
 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.
 java.lang.String getType()
          Returns the type of this object.
 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.
 
Methods inherited from interface oracle.ide.addin.Subject
attach, detach, notifyObservers
 

Field Detail

COMMENT

public static final java.lang.String COMMENT
The comment property.

See Also:
Constant Field Values
Method Detail

copyTo

public java.lang.Object copyTo(java.lang.Object target)
Copies the state of this DBObject to another instance. If null is specified for the target, a new instance will be created.

The entire state of the object will be copied, with a few exceptions. In particular, any observers registered will NOT be copied. In cases where this instance contains child DBObjects, new instances of those children will be created, and the state copied to them. The copy will thus contain its own unique state; after making the copy, changing one instance will not cause any changes to occur to the copy. The properties will be copied; however, copies will not be made of the values referenced by the properties - thus, the copy will refer to the same instance as the original. Child objects that are copied will still point to the original parent; it is the responsibility of a copied parent to update the parent of copies of its children point to the copy of itself.

The ID associated with this object will not be copied. If the copy is intended to be a temporary copy of this object (to be used in a dialog editing the object for example), then the caller should explicitly set the ID of the copy to be the same as on this object. However, if the new object is intended to exist separately from this object, the caller should ensure that the new object have a different ID from this object.

Specified by:
copyTo in interface Copyable
Parameters:
target - The object to copy to. If target is null, a new instance will be created, and the state will be copied to that object.
Returns:
the copy.
Throws:
ClassCastException - if the target is not null and cannot be downcast to the type represented by this object.

setName

public void setName(java.lang.String name)
Sets the name of this object.

Parameters:
name - a string containing the new name for this object.

getName

public java.lang.String getName()
Retrieves the name of this object.

Returns:
a string containing the name of this object.

getID

public DBObjectID getID()
Retrieves the object ID associated with this object.

Returns:
the DBObjectID associated with this object

setID

public void setID(DBObjectID id)
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.

Parameters:
id - the DBObjectID to be associated with this object
Throws:
java.lang.IllegalStateException - if the ID is already set

getType

public java.lang.String getType()
Returns the type of this object. Valid types include things like tables, views, synonyms, and columns.

Returns:
a string describing the type of object.

getProperty

public java.lang.Object getProperty(java.lang.String name)
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.

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)
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.

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()
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.

Returns:
a map of all the properties and their values

setProperties

public void setProperties(java.util.Map props)
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.

Parameters:
props - a map of all the properties and their values

Extension SDK

 

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