|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sibvisions.rad.model.mem.MemDataPage
public class MemDataPage
A MemDataPage
is the memory implementation for a data page of an
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).
IDataBook
,
IDataPage
,
IChangeableDataRow
Constructor Summary | |
---|---|
MemDataPage(MemDataBook pDataBook,
IDataRow pMasterDataRow)
Construct a new MemDataPage for the specified IDataBook and the corresponding master row. |
Method Summary | |
---|---|
protected void |
addFetchedRow(Object[] pValues)
It adds an new IDataRow to the DataPage in the object[] storage. |
protected void |
clear()
It clears the mem filter and sort in the MemDataPage. |
boolean |
delete(int pDataRowIndex)
Marks the specified row as Deleted with the given index in the MemDataPage. |
void |
fetchAll()
It fetches all IDataRow 's from the storage. |
void |
fetchToRow(int pRowIndex)
Will/should be overridden in the derived Classes to fetch data 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. |
protected Object[] |
getDataRowStorage(int pDataRowIndex)
Returns the internal storage for the specified DataRow Object[]. |
int |
getEstimatedRowCount()
Returns -1. |
IDataRow |
getMasterDataRow()
Returns the corresponding master row to this IDataPage in the master DataBook. |
int |
getRowCount()
Returns the size. |
protected int |
getRowCountInternal()
Returns the row count of this MemDataPage. |
void |
insert(int pDataRowIndex)
It inserts a new IChangeableDataRow in the MemDataPage at the specified index. |
boolean |
isAllFetched()
Returns true if all rows are loaded. |
void |
restore(int pDataRowIndex)
Restores the specified row in the MemDataPage. |
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. |
protected void |
setAllFetched(boolean pAllFetched)
Sets that the MemDataPage has all fetched. |
protected void |
setDataRow(int pDataRowIndex,
ChangeableDataRow pRow)
Sets the internal storage for the specified DataRow Object[]. |
protected void |
setDetailChanged(int pDataRowIndex,
boolean bDetailChanged)
Set that the details to this row are changed. |
protected void |
setMasterDataRow(IDataRow pMasterDataRow)
Sets a new Master DataRow, if it changes. |
protected boolean |
store(int pDataRowIndex)
Stores the specified row in the MemDataPage. |
String |
toString()
|
void |
update(int pDataRowIndex)
Sets the specified row as Updating with the given index in the MemDataPage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MemDataPage(MemDataBook pDataBook, IDataRow pMasterDataRow)
pDataBook
- the IDataBook which uses this MemDataPagepMasterDataRow
- the corresponding master row of the master IDataBook of the
above specified IDataBookMethod Detail |
---|
public IDataBook getDataBook()
IDataBook
of the IDataPage
.
getDataBook
in interface IDataPage
IDataBook
of the IDataPage
.public IDataRow getMasterDataRow()
getMasterDataRow
in interface IDataPage
public IChangeableDataRow getDataRow(int pDataRowIndex) throws ModelException
IDataRow
of the specified index.
getDataRow
in interface IDataPage
pDataRowIndex
- the index of the requested row
IDataRow
of the specified index.
ModelException
- if a exception occur during the fetch.public void fetchAll() throws ModelException
IDataRow
's from the storage.
fetchAll
in interface IDataPage
ModelException
- if an DataSourceException
happens during get all rowspublic boolean isAllFetched() throws ModelException
isAllFetched
in interface IDataPage
ModelException
- if the DataBook
isn't openpublic int getRowCount() throws ModelException
getRowCount
in interface IDataPage
ModelException
- if a exception occurs during synchronize.public int[] getChangedDataRows()
getChangedDataRows
in interface IDataPage
public int searchNext(ICondition pCondition) throws ModelException
searchNext
in interface IDataPage
pCondition
- the condition.
ModelException
- if a ModelException occurs.public int searchNext(ICondition pCondition, int pRowNum) throws ModelException
searchNext
in interface IDataPage
pCondition
- the condition.pRowNum
- the starting row.
ModelException
- if a ModelException occurs.public int searchPrevious(ICondition pCondition) throws ModelException
searchPrevious
in interface IDataPage
pCondition
- the condition.
ModelException
- if a ModelException occurs.public int searchPrevious(ICondition pCondition, int pRowNum) throws ModelException
searchPrevious
in interface IDataPage
pCondition
- the condition.pRowNum
- the starting row.
ModelException
- if a ModelException occurs.public String toString()
toString
in class Object
protected void setAllFetched(boolean pAllFetched)
pAllFetched
- the boolean with the fetch state.protected void addFetchedRow(Object[] pValues) throws ModelException
pValues
- the values.
ModelException
- if the IDataRow couldn't add to the storage.public void insert(int pDataRowIndex) throws ModelException
IChangeableDataRow
in the MemDataPage at the specified index.
pDataRowIndex
- the row index to use.
ModelException
- if the Filter/Sort couldn't initialized.public boolean delete(int pDataRowIndex) throws ModelException
pDataRowIndex
- the row index to use.
ModelException
- if the delete operation fails.public void update(int pDataRowIndex) throws ModelException
pDataRowIndex
- the row index to use.
ModelException
- if the updating operation fails.public void restore(int pDataRowIndex) throws ModelException
pDataRowIndex
- the row index to use.
ModelException
- if the updating operation fails.protected boolean store(int pDataRowIndex) throws ModelException
pDataRowIndex
- the row index to use.
ModelException
- if the updating operation fails.protected void setDetailChanged(int pDataRowIndex, boolean bDetailChanged) throws ModelException
pDataRowIndex
- the row index to use.bDetailChanged
- true if the details changed, otherwise false.
ModelException
- if the set detail changed operation fails.protected Object[] getDataRowStorage(int pDataRowIndex) throws ModelException
pDataRowIndex
- the row index.
ModelException
- if the mem sort and/or filter fails.protected void setMasterDataRow(IDataRow pMasterDataRow) throws ModelException
pMasterDataRow
- the new master DataRow
ModelException
- if the column value couldn't convertedpublic int getEstimatedRowCount() throws ModelException
ModelException
- see derived classes.public void fetchToRow(int pRowIndex) throws ModelException
pRowIndex
- the row index to use.
ModelException
- see derived classes.protected int getRowCountInternal()
protected void setDataRow(int pDataRowIndex, ChangeableDataRow pRow) throws ModelException
pDataRowIndex
- the row index.pRow
- the ChangeableDataRow to use.
ModelException
- if the mem sort and/or filter fails.protected void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |