JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.datasource
Class Store

java.lang.Object
  |
  +--com.klg.jclass.datasource.Store
All Implemented Interfaces:
Serializable, StoreModel

public class Store
extends Object
implements StoreModel, Serializable

Provides storage and retrieval for DataTableData. Maps between bookmarks and row indexes.

See Also:
Serialized Form

Field Summary
protected  Vector idxToBookmarkMap
           
protected  Hashtable rowCache
           
 
Constructor Summary
Store()
           
 
Method Summary
 void addRow(long bookmark, Object row)
          Add a row.
 void addRow(long bookmark, Object row, int ordinal)
          Insert a row.
 void clear()
          Clear all rows.
 long getBookmark(int ordinal)
          Return the bookmark of the row at ordinal.
 int getIndex(long bookmark)
          Get index.
 Object getRow(long bookmark)
          Given a bookmark, return the row
 int getRowCount()
          Return the number of rows in this store
 void removeRow(long bookmark)
          Remove a row.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

idxToBookmarkMap

protected Vector idxToBookmarkMap

rowCache

protected Hashtable rowCache
Constructor Detail

Store

public Store()
Method Detail

getRowCount

public int getRowCount()
Return the number of rows in this store

Specified by:
getRowCount in interface StoreModel
Returns:
an int which is the number of rows in this store

getRow

public Object getRow(long bookmark)
Given a bookmark, return the row

Specified by:
getRow in interface StoreModel
Parameters:
bookmark - the long which uniquely identifies a row
Returns:
the row object for this bookmark

addRow

public void addRow(long bookmark,
                   Object row)
Add a row.

Specified by:
addRow in interface StoreModel

addRow

public void addRow(long bookmark,
                   Object row,
                   int ordinal)
Insert a row.

Specified by:
addRow in interface StoreModel

removeRow

public void removeRow(long bookmark)
Remove a row.

Specified by:
removeRow in interface StoreModel
Parameters:
bookmark - the long bookmark of the row to be removed

getIndex

public int getIndex(long bookmark)
Get index.

Specified by:
getIndex in interface StoreModel
Parameters:
bookmark - a long which uniquely identifies a row
Returns:
its ordinal position

getBookmark

public long getBookmark(int ordinal)
Return the bookmark of the row at ordinal.

Specified by:
getBookmark in interface StoreModel
Returns:
the long bookmark of the row at ordinal

clear

public void clear()
Clear all rows.

Specified by:
clear in interface StoreModel

Copyright © 2004 Quest Software Inc..
All rights reserved.