HEADER

biouml.standard.type.access
Class TitleSqlIndex

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.HashMap
              |
              +--biouml.standard.type.access.TitleSqlIndex

public class TitleSqlIndex
extends HashMap
implements ComboBoxModel, DataCollectionListener, Index, ListModel

TitleSqlIndex is map where key is Base#title and value Base#name. The index is loaded during DataCollection initialisation and updates itself using DataCollectionEvents. Additionally titles are stores in sorted list (titleList). This list is used by ListModel and ComboBoxModel, thus TitleSqlIndex can be easily used by JList and JComboBox controls.

pending it is suggested that title is unique, update index when element name is changed.

Constructor Summary
TitleSqlIndex(DataCollection dc)
           

Method Summary
 voidaddListDataListener(ListDataListener l)
           
 voidclose()
           
 voidelementAdded(DataCollectionEvent e)
           
 voidelementChanged(DataCollectionEvent e)
           
 voidelementRemoved(DataCollectionEvent e)
           
 voidelementWillAdd(DataCollectionEvent e)
           
 voidelementWillChange(DataCollectionEvent e)
           
 voidelementWillRemove(DataCollectionEvent e)
           
 StringgetCompositeName(Object title, Object id)
           
 ObjectgetElementAt(int index)
           
 FilegetIndexFile()
           
 ObjectgetSelectedItem()
           
 intgetSize()
           
 booleanisValid()
           
 IteratornodeIterator(Key key)
           
 Objectput(Object title, Object id)
           
 voidremoveListDataListener(ListDataListener l)
           
 voidsetSelectedItem(Object anItem)
           

Methods inherited from class java.util.HashMap
size, isEmpty, containsValue, containsKey, get, remove, putAll, clear, clone, keySet, values, entrySet

Methods inherited from class java.util.AbstractMap
equals, hashCode, toString

Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

TitleSqlIndex

public TitleSqlIndex(DataCollection dc)
throws java.lang.Exception,
java.sql.SQLException
Method Detail

addListDataListener

public void addListDataListener(ListDataListener l)

close

public void close()

elementAdded

public void elementAdded(DataCollectionEvent e)
throws java.lang.Exception

elementChanged

public void elementChanged(DataCollectionEvent e)
throws java.lang.Exception

elementRemoved

public void elementRemoved(DataCollectionEvent e)
throws java.lang.Exception

elementWillAdd

public void elementWillAdd(DataCollectionEvent e)
throws ru.biosoft.access.DataCollectionVetoException,
java.lang.Exception

elementWillChange

public void elementWillChange(DataCollectionEvent e)
throws ru.biosoft.access.DataCollectionVetoException,
java.lang.Exception

elementWillRemove

public void elementWillRemove(DataCollectionEvent e)
throws ru.biosoft.access.DataCollectionVetoException,
java.lang.Exception

getCompositeName

public String getCompositeName(Object title, Object id)

getElementAt

public Object getElementAt(int index)

getIndexFile

public File getIndexFile()

getSelectedItem

public Object getSelectedItem()

getSize

public int getSize()

isValid

public boolean isValid()

nodeIterator

public Iterator nodeIterator(Key key)

put

public Object put(Object title, Object id)

removeListDataListener

public void removeListDataListener(ListDataListener l)

setSelectedItem

public void setSelectedItem(Object anItem)

Association Links

to Class org.apache.log4j.Category

to Class ru.biosoft.access.SqlDataCollection

to Class java.util.List

to Class javax.swing.event.EventListenerList


FOOTER

BOTTOM