|
||||||||||
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 FormNested 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 MemDataBook
protected MemDataPage createDataPage(IDataRow pMasterDataRow)
createDataPage
in class MemDataBook
pMasterDataRow
- 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 IDataBook
setDataSource
in class MemDataBook
pDataSource
- the IDataSource
to use for load/save data
ModelException
- if the IDataBook
is already opened. -> Not allowedIDataSource
public RemoteDataSource getDataSource()
IDataSource
for this IDataBook
.
getDataSource
in interface IDataBook
getDataSource
in class MemDataBook
IDataSource
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 IDataBook
open
in class MemDataBook
ModelException
- 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 IDataBook
close
in class MemDataBook
protected void executeLockAndRefetch() throws ModelException
executeLockAndRefetch
in class MemDataBook
ModelException
- if an ModelException occur during insert.protected void executeInsert() throws ModelException
executeInsert
in class MemDataBook
ModelException
- if an ModelException occur during insert.protected void executeUpdate() throws ModelException
executeUpdate
in class MemDataBook
ModelException
- if an ModelException occur during update.protected void executeDelete() throws ModelException
executeDelete
in class MemDataBook
ModelException
- if an ModelException occur during delete.protected void executeRefresh() throws ModelException
executeRefresh
in class MemDataBook
ModelException
- if an ModelExcpetion happen during refreshpublic void setMemSort(boolean pMemSort)
setMemSort
in class MemDataBook
pMemSort
- true if the sort is handled in memory.public boolean isMemSort()
isMemSort
in class MemDataBook
public void setMemFilter(boolean pMemFilter)
setMemFilter
in class MemDataBook
pMemFilter
- true if the filter is handled in memory.public boolean isMemFilter()
isMemFilter
in class MemDataBook
public void setWritebackEnabled(boolean pWritebackEnabled)
setWritebackEnabled
in class MemDataBook
pWritebackEnabled
- determines if changes should be written to the store.public boolean isWritebackEnabled()
isWritebackEnabled
in class MemDataBook
public 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 |