com.azalient.api.a.store
Interface IStore<I extends StoreRecordRW>

All Superinterfaces:
ComboBoxModel, ITable, ITableType, Iterable<I>, ListModel, Table, TableR, TableRW, TableW
All Known Subinterfaces:
IPastableStore<I>

public interface IStore<I extends StoreRecordRW>
extends Iterable<I>, TableRW, ListModel, ComboBoxModel

An interface to a store of primitive objects, exposing a set of methods that can be applied. This ia s front end to some type of store, such as a Hashtable.


Method Summary
 I add(I object)
          Add the given object to the store, return any previous entry of the same name, or null if none
 I add(int i, I object)
          Add the given object to the store at index i, return any previous entry of the same name, or null if none
 void addStoreChangeListener(StoreChangeListener lcl)
          Add a listener to changes in the store
 void clear()
          Clear all objects from store
 Collection<I> collection()
          Get a collection interface
 I createPerm(String name)
          Create a new object, put it in the backing store
 I createPermCopy(String name, I pattern)
          Create a new object as a copy of the given object, put it in the backing store
 I createTemp(String name)
          Create a new object, don't put it in the backing store (see replace) - commonly used by editor before changes are OK'd
 I createTempCopy(String name, I pattern)
          Create a new object, don't put it in the backing store (see replace) - commonly used by editor before changes are OK'd
 I get(int index)
          retrieve the i'th object
 int index(String name)
          return the index of the named object
 List<I> list()
          Get a list interface
 I lookup(int name)
          lookup the object in the internal store, assuming the name is an integer
 I lookup(String name)
          lookup the object in the internal store
 I lookup(String name, boolean caseSensitive)
          lookup the object in the internal store
 Object lookupObject(String name)
          lookup the object in the internal store (pre 1.5 compatible for DXF code)
 String pageName()
          Get the name of the page on which this table is stored
 I remove(I object)
          Remove the given object from the store, return the object if succesful, or null if unsuccessful
 I remove(int index)
          Remove the object at the given index from the store, return the object if succesful, or null if unsuccessful
 I remove(String name)
          Remove any object with the given name from the store, return the object if succesful, or null if unsuccessful
 boolean rename(String oldName, String newName)
          rename an object, changing the hash table
 void replace(IList<I> list)
          replace the contents of the internal store with a new list - commonly used when user presses OK on editor
 void save(SavingStatus ss, IResultsPage resultsPage, Object[] saveCols)
           
 int size()
          Get the number of objects in the store
 I[] toArray(I[] ta)
          return elements as an array
 int uniqueName()
          Get an integer name that is unique in the store
 int uniqueName(int start)
          Get an integer name that is unique in the store, starting at given value
 String uniqueName(String prefix)
          Get a name that is unique in the store, starting with a prefix and ending with an integer
 
Methods inherited from interface java.lang.Iterable
iterator
 
Methods inherited from interface com.azalient.api.file.TableR
columnNameObject, finishedR, invalidate, notFound, open, open, row, rowExists
 
Methods inherited from interface com.azalient.api.file.TableW
columnName, finishedW, format, newPage, recordArray, save, save, width
 
Methods inherited from interface com.azalient.api.file.Table
destroy, headerRows, keyTypes
 
Methods inherited from interface com.azalient.api.a.tables.ITable
page
 
Methods inherited from interface com.azalient.api.a.tables.ITableType
colNameObjects, pageType, tableName
 
Methods inherited from interface javax.swing.ComboBoxModel
getSelectedItem, setSelectedItem
 
Methods inherited from interface javax.swing.ListModel
addListDataListener, getElementAt, getSize, removeListDataListener
 

Method Detail

createPerm

I createPerm(String name)
Create a new object, put it in the backing store


createPermCopy

I createPermCopy(String name,
                 I pattern)
Create a new object as a copy of the given object, put it in the backing store


createTemp

I createTemp(String name)
Create a new object, don't put it in the backing store (see replace) - commonly used by editor before changes are OK'd


createTempCopy

I createTempCopy(String name,
                 I pattern)
Create a new object, don't put it in the backing store (see replace) - commonly used by editor before changes are OK'd


size

int size()
Get the number of objects in the store


collection

Collection<I> collection()
Get a collection interface


list

List<I> list()
Get a list interface


index

int index(String name)
return the index of the named object


lookup

I lookup(String name)
lookup the object in the internal store


lookup

I lookup(String name,
         boolean caseSensitive)
lookup the object in the internal store


lookupObject

Object lookupObject(String name)
lookup the object in the internal store (pre 1.5 compatible for DXF code)


lookup

I lookup(int name)
lookup the object in the internal store, assuming the name is an integer


rename

boolean rename(String oldName,
               String newName)
rename an object, changing the hash table


get

I get(int index)
retrieve the i'th object


add

I add(I object)
Add the given object to the store, return any previous entry of the same name, or null if none


add

I add(int i,
      I object)
Add the given object to the store at index i, return any previous entry of the same name, or null if none


remove

I remove(I object)
Remove the given object from the store, return the object if succesful, or null if unsuccessful


remove

I remove(String name)
Remove any object with the given name from the store, return the object if succesful, or null if unsuccessful


remove

I remove(int index)
Remove the object at the given index from the store, return the object if succesful, or null if unsuccessful


toArray

I[] toArray(I[] ta)
return elements as an array


clear

void clear()
Clear all objects from store


replace

void replace(IList<I> list)
replace the contents of the internal store with a new list - commonly used when user presses OK on editor


pageName

String pageName()
Get the name of the page on which this table is stored

Specified by:
pageName in interface ITable

uniqueName

String uniqueName(String prefix)
Get a name that is unique in the store, starting with a prefix and ending with an integer


uniqueName

int uniqueName()
Get an integer name that is unique in the store


uniqueName

int uniqueName(int start)
Get an integer name that is unique in the store, starting at given value


addStoreChangeListener

void addStoreChangeListener(StoreChangeListener lcl)
Add a listener to changes in the store


save

void save(SavingStatus ss,
          IResultsPage resultsPage,
          Object[] saveCols)