Oracle Data-aware Controls Reference

oracle.dacf.dataset
Class DacObject

java.lang.Object
  extended byoracle.dacf.dataset.DacObject
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
DataItemImpl, ProducerObject

public abstract class DacObject
extends java.lang.Object
implements java.lang.Cloneable

A DacObject is the root object for the containment heirarchy. This class defines methods purely for containership such as getters and setters to manipulate child and parent objects. DacObject is the class from which the ProducerObject and DataItemImpl classes are derived.

The parent-child relationship establishes a namespace where a string such as

a/b/c
will uniquely identify the object named c in terms of its ancestor objects a and b. Applications should not instantiate this class directly.

Version:
SDK: since JDeveloper 2.0
See Also:
DataItemImpl, InfoObject

Field Summary
protected static java.lang.String EMPTY_PREFIX
           
protected static int INITIAL_CAPACITY
          Sets the initial size of new vectors and hash tables to 3.
static java.lang.String ITEMNAME_DELIMITER
          The symbol used to separate names in the Infobus naming scheme.
 
Constructor Summary
protected DacObject()
          Default constructor.
protected DacObject(java.lang.String name)
          Constructor requiring a name for the DacObject.
protected DacObject(java.lang.String n, DacObject p, DacObject[] c)
          Constructor requiring a name for the DacObject, a parent object, and one or more child objects.
 
Method Summary
protected  void addChild(DacObject child)
          Adds a child to this DacObject.
 java.lang.Object clone()
          Produces a field-for-field copy of instances of the class.
protected  DacObject findDescendant(java.lang.String name)
          Finds the named descendant in the containment hierarchy.
protected  java.lang.String genCloneName()
          Used by the clone method to generate a name for the clone.
protected  DacObject getChild(java.lang.String name)
          Returns the specified child of the DacObject if that DacObject is a child.
protected  int getChildIndex(java.lang.String childName)
          Returns the index of this DacObject's specified child.
protected  DacObject[] getChildren()
          Returns an array of the child objects for this DacObject.
 java.lang.String getName()
          Returns the name of the DacObject.
protected  int getNumOfChildren()
          Returns the number of child objects for this DacObject.
protected  DacObject getParent()
          Returns the parent of this DacObject in the containment heirarchy.
protected  java.lang.String getPrefix()
          Returns the prefix of this DacObject's fully qualified name.
protected  void insertChildAt(DacObject child, int index)
          Adds a child to this DacObject at a specific index position.
protected  void removeChild(DacObject child)
          Removes a child from this DacObject.
protected  void removeChildren()
          Removes all children from this DacObject.
protected  void setChildren(DacObject[] kids)
          Sets a set of DacObjects as child objects for this DacObject.
 void setName(java.lang.String name)
          Sets the name of the DacObject.
protected  void setParent(DacObject parent)
          Sets the parent of this DacObject in the containment heirarchy.
protected  void setPrefix(java.lang.String prefix)
          Sets the prefix of this DacObject's fully qualified name.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ITEMNAME_DELIMITER

public static final java.lang.String ITEMNAME_DELIMITER
The symbol used to separate names in the Infobus naming scheme. The symbol is the character "/". This symbol is not changable.

See Also:
Constant Field Values

INITIAL_CAPACITY

protected static final int INITIAL_CAPACITY
Sets the initial size of new vectors and hash tables to 3. Otherwise, use the defaults defined by the JDK.

See Also:
Constant Field Values

EMPTY_PREFIX

protected static final java.lang.String EMPTY_PREFIX
See Also:
Constant Field Values
Constructor Detail

DacObject

protected DacObject()
Default constructor.


DacObject

protected DacObject(java.lang.String name)
Constructor requiring a name for the DacObject.

Parameters:
name - the name of the DacObject.

DacObject

protected DacObject(java.lang.String n,
                    DacObject p,
                    DacObject[] c)
Constructor requiring a name for the DacObject, a parent object, and one or more child objects.

Parameters:
n - name of the DacObject.
p - name of a parent object.
c - an array specifying one or more child objects.
Method Detail

clone

public java.lang.Object clone()
Produces a field-for-field copy of instances of the class.


genCloneName

protected java.lang.String genCloneName()
Used by the clone method to generate a name for the clone.


getName

public java.lang.String getName()
Returns the name of the DacObject.

Returns:
the name of the DacObject.

setName

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

Parameters:
name - the name of the DacObject.

findDescendant

protected DacObject findDescendant(java.lang.String name)
Finds the named descendant in the containment hierarchy.

This method can descend multiple "generations" to find the specified descendant. This method expects the desired descendant to be specified relative to the current object in the following naming format:

n1/n2/n2/n4/n5/.../nN

where nN is the desired descendent.

In contrast, getChildren returns only the immediate child objects of the DacObject.

Parameters:
name - the name of the desired descendant, specified in the format described above.
Returns:
the descendant object.
See Also:
getChildren()

getPrefix

protected java.lang.String getPrefix()
Returns the prefix of this DacObject's fully qualified name.

Returns:
the prefix of this DacObject's fully qualified name.

setPrefix

protected void setPrefix(java.lang.String prefix)
Sets the prefix of this DacObject's fully qualified name.

Parameters:
prefix - the prefix of this DacObject's fully qualified name.

getParent

protected DacObject getParent()
Returns the parent of this DacObject in the containment heirarchy.

Returns:
the parent of this DacObject in the containment heirarchy.

setParent

protected void setParent(DacObject parent)
Sets the parent of this DacObject in the containment heirarchy.

Returns:
nuParent the parent of this DacObject in the containment heirarchy.

getChildren

protected DacObject[] getChildren()
Returns an array of the child objects for this DacObject.

Returns:
an array of the child objects for this DacObject.

getChildIndex

protected int getChildIndex(java.lang.String childName)
Returns the index of this DacObject's specified child.

Returns:
the 0-based index of the given child.
Throws:
java.lang.IllegalArgumentException - if the specified child cannot be found.

setChildren

protected void setChildren(DacObject[] kids)
Sets a set of DacObjects as child objects for this DacObject.

Parameters:
kids - an array listing all of the child objects for this DacObject.

removeChildren

protected void removeChildren()
Removes all children from this DacObject.


getNumOfChildren

protected int getNumOfChildren()
Returns the number of child objects for this DacObject.

Returns:
the number of child objects for this DacObject.

getChild

protected DacObject getChild(java.lang.String name)
Returns the specified child of the DacObject if that DacObject is a child. This method returns only an immediate child object. To descend more than one "generation", use findDescendant.

Returns:
the specified child of the DacObject or null if the named DacObject is not a child.
See Also:
findDescendant(String name)

addChild

protected void addChild(DacObject child)
Adds a child to this DacObject.

Parameters:
child - the child to be added.

insertChildAt

protected void insertChildAt(DacObject child,
                             int index)
Adds a child to this DacObject at a specific index position.

Parameters:
child - the child to be added.
index - the 0-based index of the new child.

removeChild

protected void removeChild(DacObject child)
Removes a child from this DacObject.

Parameters:
child - the child to be removed.

Oracle Data-aware Controls Reference

 

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