Oracle Warehouse Builder Java API Reference
10g Release 1 (10.1)

B12155-01

oracle.owb.mapping
Class MappingPropertyOwnerList

java.lang.Object
  |
  +--oracle.owb.mapping.MappingPropertyOwnerList

public class MappingPropertyOwnerList
extends java.lang.Object

MappingPropertyOwnerList implements a list of "named" PropertyOwners. By "named," we mean each property owner in the list not only fulfils its role as a property owner, it also possesses a name. So we may search the list by name or by position/index.

Named Property owner list is needed because some mapping properties may return lists of property owners as compound values. One example is the SOURCE_DATA_FILE physical property on a SQL*Loader map. The value of this property has to be a list of named property owners. The "name" on each element in the list is a file name String. And the element itself is a property owner.

OWB public API user can use the methods in MappingPropertyOwnerList to retrieve each property owner in the list. Once retrived, the properties on a property owner can be queried and set, as usual, using the methods in PropertyOwner public interface.

Programmers can also use the method in MappingPropertyOwnerList to add new property owners into the list. In the example of SOURCE_DATA_FILE, user can add more property owners if information about more data files needs to be specified.


Constructor Summary
MappingPropertyOwnerList(java.lang.String parentKey, java.lang.String miscType, oracle.wh.repos.sdk.properties.WBPropertyOwner parentPropOwner, oracle.wh.repos.sdk.properties.WBPropertyValueOwner parentValOwner, oracle.wh.repos.sdk.mapping.WBStageComponent component, java.util.Vector childPOs)
          Constructor.

 

Method Summary
 void changeElementName(java.lang.String fromName, java.lang.String toName)
          Change the name to "toName" on the first element whose name matches "fromName".
 PropertyOwner createNewElement(java.lang.String name)
          Create a new property owner at the end of the list, and return the new property owner.
 PropertyOwner findElementByName(java.lang.String name)
          Find a property owner having the specified name.
 PropertyOwner[] getAllElements()
          Retrieve all property owners in the list.
 PropertyOwner getElementAt(int index)
          Retrieve one property owner at the specified index in the list.
 java.lang.String getElementNameAt(int index)
          Find and return the name of the property owner at the specified index.
 int indexOf(PropertyOwner po)
          Find index of a property owner in this list.
 void removeAllElements()
          Remove all elements in this list.
 void removeElement(PropertyOwner po)
          Remove one property owner.
 void removeElementAt(int index)
          Remove one property owner at the specified index.
 void removeElementByName(java.lang.String name)
          Remove the first property owner having the specified name.
 void setElementNameAt(int index, java.lang.String name)
          Set the name of the property owner at the specified index with the new name.
 int size()
          Find the number of elements in this list.

 

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

 

Constructor Detail

MappingPropertyOwnerList

public MappingPropertyOwnerList(java.lang.String parentKey,
                                java.lang.String miscType,
                                oracle.wh.repos.sdk.properties.WBPropertyOwner parentPropOwner,
                                oracle.wh.repos.sdk.properties.WBPropertyValueOwner parentValOwner,
                                oracle.wh.repos.sdk.mapping.WBStageComponent component,
                                java.util.Vector childPOs)
Constructor.
Parameters:
parentKey - Property key owned by the parent object.
miscType - Miscellaneous property type string.
parentPropOwner - Parent property owner.
parentValOwner - Parent value owner.
component - Stage component.
childPOs - A vector of all child property owners.
Method Detail

getAllElements

public PropertyOwner[] getAllElements()
Retrieve all property owners in the list.
Returns:
All elements in this list in the form of array of PropertyOwner.

getElementAt

public PropertyOwner getElementAt(int index)
Retrieve one property owner at the specified index in the list.
Parameters:
index - An index in the list.
Returns:
The property owner at the specified index.

indexOf

public int indexOf(PropertyOwner po)
Find index of a property owner in this list.
Parameters:
po - A property owner instance to be searched.
Returns:
An int value for the index of the property owner in the list. Return -1 if the object does not exist in the list.

size

public int size()
Find the number of elements in this list.
Returns:
An int value for the number of elements in the list.

removeElementAt

public void removeElementAt(int index)
Remove one property owner at the specified index.
Parameters:
index - An index to the list.

removeElement

public void removeElement(PropertyOwner po)
Remove one property owner.
Parameters:
po - A property owner instance supposedly in this list. There will be no effect if the list doesn't contain this object.

removeElementByName

public void removeElementByName(java.lang.String name)
Remove the first property owner having the specified name.
Parameters:
name - The name of the property owner that will be removed.

removeAllElements

public void removeAllElements()
Remove all elements in this list.

createNewElement

public PropertyOwner createNewElement(java.lang.String name)
Create a new property owner at the end of the list, and return the new property owner. The new property owner is assigned the name provided by the input argument.
Parameters:
name - The name to be assigned to the newly created property owner.
Returns:
The element having the given name.

getElementNameAt

public java.lang.String getElementNameAt(int index)
Find and return the name of the property owner at the specified index.
Parameters:
index - An index of a property owner.
Returns:
The name of the property owner at that index.
See Also:
setElementNameAt(int, java.lang.String)

setElementNameAt

public void setElementNameAt(int index,
                             java.lang.String name)
Set the name of the property owner at the specified index with the new name. There is no effect if the property owner does not exist in the list.
Parameters:
index - An index of a property owner.
name - A new name of the property owner.
See Also:
getElementNameAt(int)

findElementByName

public PropertyOwner findElementByName(java.lang.String name)
Find a property owner having the specified name.
Parameters:
name - The name of a property owner.
Returns:
The first property owner in the list having the specified name.

changeElementName

public void changeElementName(java.lang.String fromName,
                              java.lang.String toName)
Change the name to "toName" on the first element whose name matches "fromName".
Parameters:
fromName - The name of the element to be changed.
toName - The new name for the element.

Oracle Warehouse Builder Java API Reference
10g Release 1 (10.1)

B12155-01

Copyright © 2003, Oracle. All Rights Reserved.