com.ibm.commons.iloader.node.lookups
Class DataNodeLookup

java.lang.Object
  extended by com.ibm.commons.iloader.node.lookups.api.AbstractLookup
      extended by com.ibm.commons.iloader.node.lookups.DataNodeLookup
All Implemented Interfaces:
ILookup

public class DataNodeLookup
extends com.ibm.commons.iloader.node.lookups.api.AbstractLookup

A lookup that returns a list of labels and codes based on a datanode. The lookup is refreshed each time the data node changes.


Constructor Summary
DataNodeLookup(DataNode dataNode, java.lang.String codeName, java.lang.String labelName)
          Creates a new instance of this class.
 
Method Summary
protected  void addNotify()
           
 java.lang.String getCode(int index)
          Return the code or model value for this index.
 java.lang.String getLabel(int index)
          Return the label displayed to the user for this index.
protected  java.lang.String getValue(int index, IAttribute attr)
           
protected  void removeNotify()
           
 int size()
          Return the number of items in this lookup.
 
Methods inherited from class com.ibm.commons.iloader.node.lookups.api.AbstractLookup
addLookupListener, getImage, getLabelFromCode, getLabelFromCodeIgnoreCase, notifyLookupChanged, removeLookupListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataNodeLookup

public DataNodeLookup(DataNode dataNode,
                      java.lang.String codeName,
                      java.lang.String labelName)
Creates a new instance of this class. The codeName and labelName parameters are used to lookup attributes that correspond to their values in the datanode model.

Parameters:
dataNode - the datanode upon which the lookup is based
codeName - an attribute name that is to be looked up in the model
labelName - an attribute name that is to be looked up in the model
Method Detail

size

public int size()
Description copied from interface: ILookup
Return the number of items in this lookup.


getCode

public java.lang.String getCode(int index)
Description copied from interface: ILookup
Return the code or model value for this index.


getLabel

public java.lang.String getLabel(int index)
Description copied from interface: ILookup
Return the label displayed to the user for this index.


getValue

protected java.lang.String getValue(int index,
                                    IAttribute attr)

addNotify

protected void addNotify()
Overrides:
addNotify in class com.ibm.commons.iloader.node.lookups.api.AbstractLookup

removeNotify

protected void removeNotify()
Overrides:
removeNotify in class com.ibm.commons.iloader.node.lookups.api.AbstractLookup