javax.rad.model
Interface IDataPage

All Known Subinterfaces:
IDataBook
All Known Implementing Classes:
MemDataBook, MemDataPage, RemoteDataBook, RemoteDataPage

public interface IDataPage

A IDataPage is the interface for one data page of a IDataBook.
A master IDataBook has one IDataPage for itself. If the IDataBook is (also) a detail IDataBook it stores all IDataPage's for each loaded master row (parent master).

See Also:
IDataBook, IChangeableDataRow

Method Summary
 void fetchAll()
          It fetches all IDataRow's from the storage.
 int[] getChangedDataRows()
          Returns an int array with all changed rows.
 IDataBook getDataBook()
          Returns the IDataBook of the IDataPage.
 IChangeableDataRow getDataRow(int pDataRowIndex)
          Returns a copy of the IDataRow of the specified index.
 IDataRow getMasterDataRow()
          Returns the corresponding master row to this IDataPage in the master DataBook.
 int getRowCount()
          Returns the size.
 boolean isAllFetched()
          Returns true if all rows are loaded.
 int searchNext(ICondition pCondition)
          Searches the given condition.
 int searchNext(ICondition pCondition, int pRowNum)
          Searches the given condition starting at the given position.
 int searchPrevious(ICondition pCondition)
          Searches the given condition.
 int searchPrevious(ICondition pCondition, int pRowNum)
          Searches the given condition starting at the given position.
 

Method Detail

getDataBook

IDataBook getDataBook()
Returns the IDataBook of the IDataPage.

Returns:
the IDataBook of the IDataPage.

getMasterDataRow

IDataRow getMasterDataRow()
                          throws ModelException
Returns the corresponding master row to this IDataPage in the master DataBook.

Returns:
the corresponding master row to this IDataPage in the master DataBook.
Throws:
ModelException - if a exception occurs during synchronize.

getDataRow

IChangeableDataRow getDataRow(int pDataRowIndex)
                              throws ModelException
Returns a copy of the IDataRow of the specified index.
If the requested row not in memory it will be fetched from the storage. If the row is also not existing on the storage, it returns null.

Parameters:
pDataRowIndex - the index of the requested row
Returns:
a copy of the IDataRow of the specified index.
Throws:
ModelException - if a exception occur during the fetch.

getRowCount

int getRowCount()
                throws ModelException
Returns the size.

Returns:
the size.
Throws:
ModelException - if a exception occurs during synchronize.

fetchAll

void fetchAll()
              throws ModelException
It fetches all IDataRow's from the storage.

Throws:
ModelException - if an DataSourceException happens during get all rows

isAllFetched

boolean isAllFetched()
                     throws ModelException
Returns true if all rows are loaded.

Returns:
true if all rows are loaded.
Throws:
ModelException - if the DataBook isn't open

getChangedDataRows

int[] getChangedDataRows()
                         throws ModelException
Returns an int array with all changed rows.

Returns:
an int array with all changed rows.
Throws:
ModelException - if a exception occurs during synchronize.

searchNext

int searchNext(ICondition pCondition)
               throws ModelException
Searches the given condition. It returns -1 if the condition can not be found.

Parameters:
pCondition - the condition.
Returns:
the row number or -1 if the condition can not be found.
Throws:
ModelException - if a ModelException occurs.

searchNext

int searchNext(ICondition pCondition,
               int pRowNum)
               throws ModelException
Searches the given condition starting at the given position. It returns -1 if the condition can not be found.

Parameters:
pCondition - the condition.
pRowNum - the starting row.
Returns:
the row number or -1 if the condition can not be found.
Throws:
ModelException - if a ModelException occurs.

searchPrevious

int searchPrevious(ICondition pCondition)
                   throws ModelException
Searches the given condition. It returns -1 if the condition can not be found.

Parameters:
pCondition - the condition.
Returns:
the row number or -1 if the condition can not be found.
Throws:
ModelException - if a ModelException occurs.

searchPrevious

int searchPrevious(ICondition pCondition,
                   int pRowNum)
                   throws ModelException
Searches the given condition starting at the given position. It returns -1 if the condition can not be found.

Parameters:
pCondition - the condition.
pRowNum - the starting row.
Returns:
the row number or -1 if the condition can not be found.
Throws:
ModelException - if a ModelException occurs.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.