|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.rad.model.mem.DataRow
com.sibvisions.rad.model.mem.ChangeableDataRow
com.sibvisions.rad.model.mem.MemDataBook
com.sibvisions.rad.model.remote.RemoteDataBook
public class RemoteDataBook
The RemoteDataBook is a storage independent table, and handles all operations
based on the the MemDatabook base class.
It communicates to the IStorage and uses the storage methods to fetch, insert
update, delete the data on server.
MemDataBook,
IDataPage,
IDataBook,
IRowDefinition,
IChangeableDataRow,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface javax.rad.model.IDataBook |
|---|
IDataBook.SelectionMode, IDataBook.WriteBackIsolationLevel |
| Field Summary |
|---|
| Fields inherited from class com.sibvisions.rad.model.mem.ChangeableDataRow |
|---|
DELETING, DETAILS_CHANGED, INSERTING, INTERNAL_OFFSET, UPDATING, WRITABLE_COLUMN_CHANGED |
| Fields inherited from class com.sibvisions.rad.model.mem.DataRow |
|---|
oaStorage, rdRowDefinition |
| Constructor Summary | |
|---|---|
RemoteDataBook()
Creates a new instance of RemoteDataBook. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the IDataBook. |
protected MemDataPage |
createDataPage(IDataRow pMasterDataRow)
It constructs a new MemDataPage. |
protected void |
executeDelete()
Its called when the deleting DataRow (delete row) should be deleted. |
protected void |
executeInsert()
Its called when the inserting DataRow (new row) should be inserted. |
protected void |
executeLockAndRefetch()
Its called before the DataRow (existing row) will be changed. |
protected void |
executeRefresh()
It will be called, when the MemDataBook will be completely refreshed. |
protected void |
executeUpdate()
Its called when the updating DataRow (changed row) should be updated Derived classed should override this to implemented the needed functionality. |
String[] |
getBlockFetchColumnNames()
Returns the block fetch columns. |
protected AbstractConnection |
getConnection()
Returns the AbstractConnection of the RemoteDataSource for this StorageDataSource. |
RemoteDataSource |
getDataSource()
Returns the IDataSource for this IDataBook. |
protected int[] |
getFetchColumnIndexes()
Returns the correct column indexes of the fetched data, after opening the data book. |
protected int |
getFetchedRowsForBlock(IDataRow pMasterDataRow)
Returns the amount of fetched rows per block. |
protected int[] |
getMasterColumnIndexesForBlock()
Returns the correct master column indexes of the fetched data, after opening the data book. |
protected String[] |
getMetaDataColumnNames()
Returns the server meta data column names. |
protected boolean |
isCachingStorage()
Returns whether the server storage is a cached storage or a storage without cache. |
protected boolean |
isDataPageRefetchPossible()
This function is used for rehashing data pages after insert of the master row. |
boolean |
isMemFilter()
Returns true if the filter is handled in memory. |
boolean |
isMemSort()
Returns true if the sort is handled in memory. |
boolean |
isMetaDataCacheEnabled()
Gets whether metadata cache is enabled. |
boolean |
isWritebackEnabled()
Returns true if this data book should write its changes to the storage. |
void |
open()
Opens the IDataBook. |
void |
setBlockFetchColumnNames(String[] pBlockFetchColumnNames)
Sets the block fetch columns. |
void |
setDataSource(IDataSource pDataSource)
Sets the IDataSource for this IDataBook. |
protected void |
setFetchedRowsForBlock(IDataRow pMasterDataRow,
int pFetchedRows)
Sets the amount of fetched rows per block. |
void |
setMemFilter(boolean pMemFilter)
Sets if the sort is handled in memory. |
void |
setMemSort(boolean pMemSort)
Sets if the sort is handled in memory. |
void |
setMetaDataCacheEnabled(boolean pCacheEnabled)
Sets the metadata cache enabled. |
void |
setWritebackEnabled(boolean pWritebackEnabled)
Sets if this data book should write back its changes to the storage. |
| Methods inherited from class com.sibvisions.rad.model.mem.ChangeableDataRow |
|---|
restore, setDeleting, setDetailChanged, setInserting, setUID, setUpdating, setValueDRInternal |
| Methods inherited from class com.sibvisions.rad.model.mem.DataRow |
|---|
addControl, cancelEditingControls, compareTo, compareTo, createDataRow, createEmptyRow, equals, equals, eventValuesChanged, getControls, getRowDefinition, getValue, getValueAsString, getValuesAsString, hashCode, invokeCancelEditingControls, invokeRepaintListeners, invokeSaveEditingControls, notifyRepaintControls, removeControl, saveEditingControls, setDefaultValues |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.rad.model.IDataRow |
|---|
addControl, compareTo, createDataRow, createEmptyRow, equals, eventValuesChanged, getControls, getRowDefinition, getValue, getValueAsString, getValuesAsString, removeControl |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Constructor Detail |
|---|
public RemoteDataBook()
RemoteDataBook.
| Method Detail |
|---|
protected boolean isDataPageRefetchPossible()
isDataPageRefetchPossible in class MemDataBookprotected MemDataPage createDataPage(IDataRow pMasterDataRow)
createDataPage in class MemDataBookpMasterDataRow - the master IDataRow for this IDataPage.
public void setDataSource(IDataSource pDataSource)
throws ModelException
IDataSource for this IDataBook.IDataSource defines the access to the storage like DB, XML, ...
setDataSource in interface IDataBooksetDataSource in class MemDataBookpDataSource - the IDataSource to use for load/save data
ModelException - if the IDataBook is already opened. -> Not allowedIDataSourcepublic RemoteDataSource getDataSource()
IDataSource for this IDataBook.
getDataSource in interface IDataBookgetDataSource in class MemDataBookIDataSource for this IDataBook.
public void open()
throws ModelException
IDataBook. AbstractStorage oriented implementations should open
the storage (DB, XML, File) and load the Meta data/defaulting
the RowDefinition.
open in interface IDataBookopen in class MemDataBookModelException - if the IDataBook couldn't be opened, because of
empty storage unit name, empty IDataSource,
missing RowDefinition or failed DataPage creationpublic void close()
IDataBook. AbstractStorage oriented implementations should close
the storage (DB, XML, file).
close in interface IDataBookclose in class MemDataBook
protected void executeLockAndRefetch()
throws ModelException
executeLockAndRefetch in class MemDataBookModelException - if an ModelException occur during insert.
protected void executeInsert()
throws ModelException
executeInsert in class MemDataBookModelException - if an ModelException occur during insert.
protected void executeUpdate()
throws ModelException
executeUpdate in class MemDataBookModelException - if an ModelException occur during update.
protected void executeDelete()
throws ModelException
executeDelete in class MemDataBookModelException - if an ModelException occur during delete.
protected void executeRefresh()
throws ModelException
executeRefresh in class MemDataBookModelException - if an ModelExcpetion happen during refreshpublic void setMemSort(boolean pMemSort)
setMemSort in class MemDataBookpMemSort - true if the sort is handled in memory.public boolean isMemSort()
isMemSort in class MemDataBookpublic void setMemFilter(boolean pMemFilter)
setMemFilter in class MemDataBookpMemFilter - true if the filter is handled in memory.public boolean isMemFilter()
isMemFilter in class MemDataBookpublic void setWritebackEnabled(boolean pWritebackEnabled)
setWritebackEnabled in class MemDataBookpWritebackEnabled - determines if changes should be written to the store.public boolean isWritebackEnabled()
isWritebackEnabled in class MemDataBookpublic String[] getBlockFetchColumnNames()
public void setBlockFetchColumnNames(String[] pBlockFetchColumnNames)
throws ModelException
pBlockFetchColumnNames - the block fetch columns.
ModelException - if the data book is already open.public void setMetaDataCacheEnabled(boolean pCacheEnabled)
pCacheEnabled - true to enable the cachepublic boolean isMetaDataCacheEnabled()
true if the cache is enabled, false otherwiseprotected String[] getMetaDataColumnNames()
protected int[] getFetchColumnIndexes()
protected int[] getMasterColumnIndexesForBlock()
protected int getFetchedRowsForBlock(IDataRow pMasterDataRow)
throws ModelException
pMasterDataRow - the master data row.
ModelException - if it fails.
protected void setFetchedRowsForBlock(IDataRow pMasterDataRow,
int pFetchedRows)
throws ModelException
pMasterDataRow - the master data row.pFetchedRows - the amount of fetched rows per block.
ModelException - if it fails.protected AbstractConnection getConnection()
protected boolean isCachingStorage()
true if the server storage uses a cache, false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||