com.sibvisions.rad.persist
Class StorageDataBook

java.lang.Object
  extended by com.sibvisions.rad.model.mem.DataRow
      extended by com.sibvisions.rad.model.mem.ChangeableDataRow
          extended by com.sibvisions.rad.model.mem.MemDataBook
              extended by com.sibvisions.rad.model.remote.RemoteDataBook
                  extended by com.sibvisions.rad.persist.StorageDataBook
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<IDataRow>, IChangeableDataRow, IDataBook, IDataPage, IDataRow, INamedObject

public class StorageDataBook
extends RemoteDataBook

The StorageDataBook is a RemoteDataBook directly connected to an IStorage.

See Also:
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.MemDataBook
bMemFilter, bMemSort, rootDataBook, rowInstance1, rowInstance2
 
Fields inherited from class com.sibvisions.rad.model.mem.ChangeableDataRow
DELETING, DETAILS_CHANGED, dpDataPage, INSERTING, INTERNAL_OFFSET, iRowIndex, UPDATING, WRITABLE_COLUMN_CHANGED
 
Fields inherited from class com.sibvisions.rad.model.mem.DataRow
oaStorage, rdRowDefinition
 
Constructor Summary
StorageDataBook()
          Creates a new instance of StorageDataBook.
StorageDataBook(IStorage pStorage)
          Creates a new instance of StorageDataBook for the given storage.
StorageDataBook(StorageDataBook pBook, IStorage pStorage)
          Creates a new instance of StorageDataBook for the given storage.
 
Method Summary
 void close()
          Closes this IDataBook.
 IStorage getStorageImpl()
          Gets the configured storage implementation.
 void open()
          Opens this IDataBook.
 void setDataSource(IDataSource pDataSource)
          Sets the IDataSource to use, which allows the IDataBook to retrieve and set data.
 void setName(java.lang.String pName)
          Sets the name to use.
 void setStorageImpl(IStorage pStorage)
          Sets the storage implementation which should be used to access data.
 
Methods inherited from class com.sibvisions.rad.model.remote.RemoteDataBook
createDataPage, executeDelete, executeInsert, executeLockAndRefetch, executeRefresh, executeRefreshDataPage, executeUpdate, getBlockFetchColumnNames, getConnection, getDataSource, getFetchColumnIndexes, getFetchedRowsForBlock, getMasterColumnIndexesForBlock, getMetaDataColumnNames, isCachingStorage, isDataPageRefetchPossible, isFetchEnabled, isMemFilter, isMemSort, isMetaDataCacheEnabled, isWritebackEnabled, setBlockFetchColumnNames, setFetchedRowsForBlock, setFetchEnabled, setMemFilter, setMemSort, setMetaDataCacheEnabled, setWritebackEnabled
 
Methods inherited from class com.sibvisions.rad.model.mem.MemDataBook
addControl, addDetailDataBook, calculateRow, cancelEditingControls, clear, clearCurrentDataPage, clearFilterSortInCurrentMemDataPage, clearFilterSortInMemDataPages, createAndCacheDataPage, createDataRow, createReadOnlyChecker, createRowCalculator, delete, deleteAllDataRows, deleteAllRows, eventAfterColumnSelected, eventAfterDeleted, eventAfterDeleting, eventAfterFilterChanged, eventAfterInserted, eventAfterInserting, eventAfterReload, eventAfterRestore, eventAfterRowSelected, eventAfterSortChanged, eventAfterUpdated, eventAfterUpdating, eventBeforeColumnSelected, eventBeforeDeleted, eventBeforeDeleting, eventBeforeFilterChanged, eventBeforeInserted, eventBeforeInserting, eventBeforeReload, eventBeforeRestore, eventBeforeRowSelected, eventBeforeSortChanged, eventBeforeUpdated, eventBeforeUpdating, fetchAll, finalize, getAdditionalDataRow, getChangedDataRows, getChangedRows, getDataBook, getDataPage, getDataPage, getDataPage, getDataPage, getDataPageWithRootRow, getDataRow, getDetailDataBooks, getEstimatedRowCount, getFilter, getMasterDataRow, getMasterReference, getName, getOriginalDataRow, getReadAhead, getReadOnlyChecker, getRootDataBook, getRootDataBookIntern, getRootReference, getRowCalculator, getRowCount, getRowDefinition, getRowIndex, getSelectedColumn, getSelectedDataPageRow, getSelectedRow, getSelectionMode, getSort, getTreePath, getUID, getValue, getValue, getValues, getWritebackIsolationLevel, hasChanges, hasDataPage, hasDataPage, insert, invokeTreeCancelEditingControls, invokeTreeSaveEditingControls, isAdditionalDataRowVisible, isAllFetched, isDeleteAllowed, isDeleteCascade, isDeleteEnabled, isDeleting, isDetailChanged, isInsertAllowed, isInsertEnabled, isInserting, isLockAndRefetchEnabled, isOpen, isOutOfSync, isReadOnly, isSelfJoined, isSortDataRowOnSave, isUpdateAllowed, isUpdateEnabled, isUpdating, isWritableColumnChanged, keepSortableColumns, notifyDetailChanged, notifyMasterChanged, notifyRepaintControls, reload, reload, reloadDataPage, reloadIntern, removeDataPage, removeDetailDataBook, restoreAllRows, restoreDataPage, restoreSelectedRow, saveAllRows, saveDataPage, saveEditingControls, saveSelectedRow, searchNext, searchNext, searchPrevious, searchPrevious, setAdditionalDataRowVisible, setDeleteCascade, setDeleteEnabled, setFilter, setInsertEnabled, setLockAndRefetchEnabled, setMasterReference, setReadAhead, setReadOnly, setReadOnlyChecker, setReadOnlyChecker, setReadOnlyWithoutSave, setRootReference, setRowCalculator, setRowCalculator, setRowDefinition, setSelectedColumn, setSelectedDataPageRow, setSelectedRow, setSelectedRowInternal, setSelectionMode, setSort, setSortDataRowOnSave, setTreePath, setUpdateEnabled, setValue, setValues, setWritebackIsolationLevel, store, toString, update
 
Methods inherited from class com.sibvisions.rad.model.mem.ChangeableDataRow
getOriginalRow, restore, setDeleting, setDetailChanged, setInserting, setUID, setUpdating, setValueIntern
 
Methods inherited from class com.sibvisions.rad.model.mem.DataRow
compareTo, compareTo, createEmptyDataRow, createEmptyRow, equals, equals, eventValuesChanged, eventValuesChanged, getControls, getValueAsString, getValuesAsString, hasControls, hashCode, invokeCancelEditingControls, invokeRepaintListeners, invokeSaveEditingControls, removeControl, setDefaultValues, setValuesIntern
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.model.IChangeableDataRow
getOriginalRow
 
Methods inherited from interface javax.rad.model.IDataRow
compareTo, createEmptyDataRow, createEmptyRow, equals, eventValuesChanged, eventValuesChanged, getControls, getValueAsString, getValuesAsString, removeControl
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

StorageDataBook

public StorageDataBook()
Creates a new instance of StorageDataBook.


StorageDataBook

public StorageDataBook(IStorage pStorage)
Creates a new instance of StorageDataBook for the given storage.

Parameters:
pStorage - the storage

StorageDataBook

public StorageDataBook(StorageDataBook pBook,
                       IStorage pStorage)
Creates a new instance of StorageDataBook for the given storage.

Parameters:
pBook - the configuration to use or null to use a new configuration
pStorage - the storage
Method Detail

open

public void open()
          throws ModelException
Opens this IDataBook.

"Open" means that all actions are performed which are needed to deliver data to the user, an IDataBook that is open can be used for querying and changing data.

Implementations should perform all needed set up work in this method (like reading metadata from the storage).

Specified by:
open in interface IDataBook
Overrides:
open in class RemoteDataBook
Throws:
ModelException - if there is no name set, or if there is no column in the row definition, or if there is no IDataBook.getDataSource() set.

close

public void close()
Closes this IDataBook.

A closed IDataBook has the same state as an not open IDataBook. It can't be used to query or change data, but it can be reopened.

Implementations should performs all clean up in this method and the (cached) data can be discarded at this point.

Specified by:
close in interface IDataBook
Overrides:
close in class RemoteDataBook

setName

public void setName(java.lang.String pName)
Sets the name to use.

The name can only be set if the IDataBook is not already open.

Specified by:
setName in interface IDataBook
Specified by:
setName in interface INamedObject
Overrides:
setName in class MemDataBook
Parameters:
pName - the name to use.
See Also:
IDataBook.getName()

setDataSource

public void setDataSource(IDataSource pDataSource)
Sets the IDataSource to use, which allows the IDataBook to retrieve and set data.

The IDataSource can only be set if the IDataBook is not already open.

Specified by:
setDataSource in interface IDataBook
Overrides:
setDataSource in class RemoteDataBook
Parameters:
pDataSource - the IDataSource to use.
See Also:
IDataBook.getDataSource(), IDataSource

setStorageImpl

public void setStorageImpl(IStorage pStorage)
Sets the storage implementation which should be used to access data.

Parameters:
pStorage - the storage
Throws:
java.lang.IllegalArgumentException - if storage is null

getStorageImpl

public IStorage getStorageImpl()
Gets the configured storage implementation.

Returns:
the storage


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.