public interface BrowseModel
Modifier and Type | Method and Description |
---|---|
int |
getCurrentRow()
Get current row in the model.
|
WidgetConfig[] |
getEditorsConfigs()
Get configurations of editors (fill-ins, toggle-boxes or combo-boxes) used for in-browse
editing.
|
int |
getRowCount()
Get the number of rows iterated by the query (for preselect queries - matches result size,
for adaptive queries - matches the size of the part of the result set the query has already
iterated over).
|
int |
getRowCount(int startRow)
Get number of available rows starting from the given one.
|
BrowseRow[] |
getRows(char searchChar,
int searchColumn,
int viewportTopRow,
int viewportBottomRow,
int rowDisplayTriggerId,
ScreenBuffer[] sb)
This function is used when search by key is performed in a browse.
|
BrowseRow[] |
getRows(int startRowIndex,
int count,
boolean forward,
int rowDisplayTriggerId,
ScreenBuffer[] sb,
RowDisplayStrategy displayStrategy)
Retrieves several subsequent rows from the database.
|
boolean |
isRowAvailable(int rowIndex)
Determines if the specified browse row is "available", i.e.
|
void |
moveColumn(int src,
int dest)
Implements the MOVE-COLUMN() widget method.
|
int |
setCurrentRow(int rowIndex)
Inform server about current row in the browse.
|
void |
updateRow(int rowIndex,
int[] cellIndices,
BaseDataType[] cellValues,
boolean onlyNotifyRowReleased)
Updates selected cells in the given row.
|
WidgetConfig[] getEditorsConfigs()
null
if the
column is not editable. Return value is null
if the browse is
read-only.int getRowCount()
int getRowCount(int startRow)
startRow
- Initial row to start count rows from.BrowseRow[] getRows(int startRowIndex, int count, boolean forward, int rowDisplayTriggerId, ScreenBuffer[] sb, RowDisplayStrategy displayStrategy)
startRowIndex
- Index of the first row to retrieve (0-based).count
- Maximum count of rows to return. -1
for no limit.forward
- true
if rows are retrieved in the forward direction,
false
if rows are retrieved in the backward direction.rowDisplayTriggerId
- Trigger ID of the ROW-DISPLAY trigger. -1
if there is no ROW-DISPLAY
trigger for this browse.sb
- Screen buffer for the ROW-DISPLAY trigger. null
if there is no
ROW-DISPLAY trigger for this browse.displayStrategy
- Specifies type of action for which rows are fetched and defines how rows are
iterated / displayed.null
is returned.BrowseRow[] getRows(char searchChar, int searchColumn, int viewportTopRow, int viewportBottomRow, int rowDisplayTriggerId, ScreenBuffer[] sb)
searchChar
- Character to be searched for. Search is performed using only the first character
(in the visual data representation) in the current column. Specifying a character
puts this function in the search mode. This parameter is null
for
non-search mode.searchColumn
- For search mode: 0-based index of the column to be searched.viewportTopRow
- For search mode: 0-based index (in the result set) of the top row in the current
view.viewportBottomRow
- For search mode: 0-based index (in the result set) of the bottom row in the
current view.rowDisplayTriggerId
- Trigger ID of the ROW-DISPLAY trigger. -1
if there is no ROW-DISPLAY
trigger for this browse.sb
- Screen buffer for the ROW-DISPLAY trigger. null
if there is no
ROW-DISPLAY trigger for this browse.null
is returned.void updateRow(int rowIndex, int[] cellIndices, BaseDataType[] cellValues, boolean onlyNotifyRowReleased) throws DataValidationException
rowIndex
- Index of the row to update.cellIndices
- Cells for update indexes.cellValues
- Cells for update new values.onlyNotifyRowReleased
- Only notify server that the row has been released. Data is not updated.DataValidationException
- New values don't passed database validation rules.int setCurrentRow(int rowIndex)
rowIndex
- 0-based index of the current row.int getCurrentRow()
boolean isRowAvailable(int rowIndex)
rowIndex
- 0-base index of the target row in the browse model.true
if the row is "available", i.e. it is not deleted.void moveColumn(int src, int dest)
Repositions a column in the browse widget.
src
- 0-based position of the column to be moved.dest
- 0-based position to which the column is moved.